libfizmo-0.7.15/0000755000175000017500000000000013153330676013574 5ustar chrenderchrenderlibfizmo-0.7.15/missing0000755000175000017500000001533013153330676015175 0ustar chrenderchrender#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written 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, see . # 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 case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libfizmo-0.7.15/config-conds.m40000644000175000017500000000177313153330674016415 0ustar chrenderchrender AM_CONDITIONAL([ENABLE_BABEL], [test "$enable_babel" != "no"]) AM_CONDITIONAL([ENABLE_STRICT_Z], [test "$enable_strict_z" = "yes"]) AM_CONDITIONAL([ENABLE_SEGFAULT_ON_ERROR], [test "$enable_segfault-on-error" = "yes"]) AM_CONDITIONAL([ENABLE_FILELIST], [test "$enable_filelist" != "no"]) AM_CONDITIONAL([ENABLE_BLOCKBUFFER], [test "$enable_blockbuffer" != "no"]) AM_CONDITIONAL([ENABLE_COMMAND_HISTORY], [test "$enable_command_history" != "no"]) AM_CONDITIONAL([ENABLE_OUTPUT_HISTORY], [test "$enable_output_history" != "no"]) AM_CONDITIONAL([ENABLE_CONFIG_FILES], [test "$enable_config_files" != "no"]) AM_CONDITIONAL([ENABLE_PREFIX_COMMANDS], [test "$enable_prefix_commands" != "no"]) AM_CONDITIONAL([ENABLE_DEBUGGER], [test "$enable_debugger" = "yes"]) AM_CONDITIONAL([FIZMO_DIST_VERSION], [test "x$fizmo_dist_version" != "x"]) libfizmo-0.7.15/libfizmo-initialization.txt0000644000175000017500000000416113153330676021177 0ustar chrenderchrender libfizmo initialization 2011-08-23 OVERVIEW There are six initialization steps: - “fizmo_register_screen_interface” - “fizmo_register_sound_interface” - optional: “parse_fizmo_config_files” - “fizmo_start” - “parse_fizmo_config_files” if not happened before - implicit: “link_active_interface_to_story” fizmo config files: - “/etc/fizmo.conf”, always parsed. - All “fizmo/config” files in all directories from colon-spearated “XDG_CONFIG_DIRS” path. - “$HOME/.config.fizmo” --- COLOR INITIALIZATION The screen default colors are stored in variables “default_foreground_colour” and “default_background_colour” inside “output.c”. By default, the foreground is initialized as white, the background as black. Initialization is as follows: 1. By default, the foreground color is set to white, the background to black in “output.c”. 2. The screen interface's functions “get_default_foreground_colour” and “get_default_background_colour” are evaluated. In case these return valid z_colour values, these are used as the default colors. That means that by returning -1 for one or both of the functions, the screen interface may choose not to alter the interpreter's default values. 3. The “foreground-color” and “background-color” config variables are evaluated from the configuration file(s). 4. The “fizmo-start” function's variables “screen_default_foreground_color” and “screen_default_background_colour” are evaluated. In case these contains valid z_colour values, they're used as the new default. As in step 2, that means that the default, as evaluated up to this step, may be kept by setting one or both of the values to -1. Why the additional step 4? While it's already possible to read color information from the screen interface in step 2, step 4 ensures that it's possible to still override the information parsed from the config files in step 3 from the screen interface. libfizmo-0.7.15/configure0000755000175000017500000055115613153330676015520 0ustar chrenderchrender#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for libfizmo 0.7.15. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: fizmo@spellbreaker.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # 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'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libfizmo' PACKAGE_TARNAME='libfizmo' PACKAGE_VERSION='0.7.15' PACKAGE_STRING='libfizmo 0.7.15' PACKAGE_BUGREPORT='fizmo@spellbreaker.org' PACKAGE_URL='' ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS FIZMO_DIST_VERSION_FALSE FIZMO_DIST_VERSION_TRUE ENABLE_DEBUGGER_FALSE ENABLE_DEBUGGER_TRUE ENABLE_PREFIX_COMMANDS_FALSE ENABLE_PREFIX_COMMANDS_TRUE ENABLE_CONFIG_FILES_FALSE ENABLE_CONFIG_FILES_TRUE ENABLE_OUTPUT_HISTORY_FALSE ENABLE_OUTPUT_HISTORY_TRUE ENABLE_COMMAND_HISTORY_FALSE ENABLE_COMMAND_HISTORY_TRUE ENABLE_BLOCKBUFFER_FALSE ENABLE_BLOCKBUFFER_TRUE ENABLE_FILELIST_FALSE ENABLE_FILELIST_TRUE ENABLE_SEGFAULT_ON_ERROR_FALSE ENABLE_SEGFAULT_ON_ERROR_TRUE ENABLE_STRICT_Z_FALSE ENABLE_STRICT_Z_TRUE ENABLE_BABEL_FALSE ENABLE_BABEL_TRUE ENABLE_TRACING_FALSE ENABLE_TRACING_TRUE FIZMO_DIST_BUILD_FALSE FIZMO_DIST_BUILD_TRUE LIBXML2_NONPKG_LIBS LIBXML2_NONPKG_CFLAGS LIBFIZMO_REQS ac_ct_AR AR RANLIB AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC libxml2_LIBS libxml2_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_tracing enable_babel enable_strict_z enable_segfault_on_error enable_filelist enable_blockbuffer enable_command_history enable_output_history enable_config_files enable_prefix_commands enable_debugger with_libxml2_includedir with_libxml2_libdir enable_dependency_tracking enable_silent_rules ' ac_precious_vars='build_alias host_alias target_alias PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR libxml2_CFLAGS libxml2_LIBS CC CFLAGS LDFLAGS LIBS CPPFLAGS' # 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' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures libfizmo 0.7.15 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] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --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/libfizmo] --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 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] --enable-tracing enable tracelog for debugging --disable-babel disable babel functionality which means that libxml2 will not be required for building --enable-strict-z enforce strict Z-Machine handling --enable-segfault-on-error deprecated debug helper --disable-filelist disable story-list-keeping functionality --disable-blockbuffer disable buffering ability for upper window --disable-command-history disable history of previously entered commands --disable-output-history disable history of recent screen output --disable-config-files disable parsing of configuration files --disable-prefix-commands disable in-game interpreter commands --enable-debugger enable experimental debugging functionality _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of libfizmo 0.7.15:";; esac cat <<\_ACEOF --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-libxml2-includedir Specify include directory to use for libxml2 --with-libxml2-libdir Specify library directory for libxml2 Some influential environment variables: PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path libxml2_CFLAGS C compiler flags for libxml2, overriding pkg-config libxml2_LIBS linker flags for libxml2, overriding pkg-config 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 (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory 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 libfizmo configure 0.7.15 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link 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 libfizmo $as_me 0.7.15, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in . "$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_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x$enable_babel" != "xno"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml2" >&5 $as_echo_n "checking for libxml2... " >&6; } if test -n "$libxml2_CFLAGS"; then pkg_cv_libxml2_CFLAGS="$libxml2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libxml2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libxml2_LIBS"; then pkg_cv_libxml2_LIBS="$libxml2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libxml2_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libxml2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1` else libxml2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libxml2_PKG_ERRORS" >&5 for dir in $with_libxml2_includedir /usr/include/libxml2 /usr/local/include/libxml2 /opt/local/include/libxml2 ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml/tree.h in $dir" >&5 $as_echo_n "checking for libxml/tree.h in $dir... " >&6; } if test -e $dir/libxml/tree.h ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } libxml2_h_dir=$dir break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi done if test "x$libxml2_h_dir" == "x" ; then echo "Could not find libxml/tree.h." echo "Try setting the location using --with-libxml2-includedir." exit fi libxml2_nonpkg_cflags+="-I$libxml2_h_dir" libxml2_CFLAGS="-I$libxml2_h_dir" CFLAGS_SAVED=$CFLAGS LIBS_SAVED=$LIBS LDFLAGS_SAVED=$LDFLAGS LIBS="-lxml2" CFLAGS="-I$libxml2_h_dir" for dir in $with_libxml2_libdir /usr/lib /usr/local/lib /opt/local/lib ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml2 in $dir" >&5 $as_echo_n "checking for libxml2 in $dir... " >&6; } LDFLAGS="-L$dir" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { xmlDocPtr doc; doc = xmlNewDoc("1.0"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } libxml2_l_dir=$dir break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done if test "x$libxml2_l_dir" == "x" ; then echo "Could not find libxml2." echo "Try setting the location using --with-libxml2-libdir." exit fi LIBS=$LIBS_SAVED LDFLAGS=$LDFLAGS_SAVED CFLAGS=$CFLAGS_SAVED libxml2_nonpkg_libs="-L$libxml2_l_dir -lxml2" libxml2_LIBS="-L$libxml2_l_dir -lxml2" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } for dir in $with_libxml2_includedir /usr/include/libxml2 /usr/local/include/libxml2 /opt/local/include/libxml2 ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml/tree.h in $dir" >&5 $as_echo_n "checking for libxml/tree.h in $dir... " >&6; } if test -e $dir/libxml/tree.h ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } libxml2_h_dir=$dir break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi done if test "x$libxml2_h_dir" == "x" ; then echo "Could not find libxml/tree.h." echo "Try setting the location using --with-libxml2-includedir." exit fi libxml2_nonpkg_cflags+="-I$libxml2_h_dir" libxml2_CFLAGS="-I$libxml2_h_dir" CFLAGS_SAVED=$CFLAGS LIBS_SAVED=$LIBS LDFLAGS_SAVED=$LDFLAGS LIBS="-lxml2" CFLAGS="-I$libxml2_h_dir" for dir in $with_libxml2_libdir /usr/lib /usr/local/lib /opt/local/lib ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml2 in $dir" >&5 $as_echo_n "checking for libxml2 in $dir... " >&6; } LDFLAGS="-L$dir" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { xmlDocPtr doc; doc = xmlNewDoc("1.0"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } libxml2_l_dir=$dir break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done if test "x$libxml2_l_dir" == "x" ; then echo "Could not find libxml2." echo "Try setting the location using --with-libxml2-libdir." exit fi LIBS=$LIBS_SAVED LDFLAGS=$LDFLAGS_SAVED CFLAGS=$CFLAGS_SAVED libxml2_nonpkg_libs="-L$libxml2_l_dir -lxml2" libxml2_LIBS="-L$libxml2_l_dir -lxml2" else libxml2_CFLAGS=$pkg_cv_libxml2_CFLAGS libxml2_LIBS=$pkg_cv_libxml2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } libfizmo_reqs="libxml-2.0" fi fi am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file 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"` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='libfizmo' VERSION='0.7.15' 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"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 $as_echo_n "checking the archiver ($AR) interface... " >&6; } if ${am_cv_ar_interface+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 $as_echo "$am_cv_ar_interface" >&6; } case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) as_fn_error $? "could not determine $AR interface" "$LINENO" 5 ;; esac LIBFIZMO_REQS=$libfizmo_reqs LIBXML2_NONPKG_CFLAGS=$libxml2_nonpkg_cflags LIBXML2_NONPKG_LIBS=$libxml2_nonpkg_libs if test "x" = ""; then FIZMO_DIST_BUILD_TRUE= FIZMO_DIST_BUILD_FALSE='#' else FIZMO_DIST_BUILD_TRUE='#' FIZMO_DIST_BUILD_FALSE= fi if test "$enable_tracing" = "yes"; then ENABLE_TRACING_TRUE= ENABLE_TRACING_FALSE='#' else ENABLE_TRACING_TRUE='#' ENABLE_TRACING_FALSE= fi if test "$enable_babel" != "no"; then ENABLE_BABEL_TRUE= ENABLE_BABEL_FALSE='#' else ENABLE_BABEL_TRUE='#' ENABLE_BABEL_FALSE= fi if test "$enable_strict_z" = "yes"; then ENABLE_STRICT_Z_TRUE= ENABLE_STRICT_Z_FALSE='#' else ENABLE_STRICT_Z_TRUE='#' ENABLE_STRICT_Z_FALSE= fi if test "$enable_segfault-on-error" = "yes"; then ENABLE_SEGFAULT_ON_ERROR_TRUE= ENABLE_SEGFAULT_ON_ERROR_FALSE='#' else ENABLE_SEGFAULT_ON_ERROR_TRUE='#' ENABLE_SEGFAULT_ON_ERROR_FALSE= fi if test "$enable_filelist" != "no"; then ENABLE_FILELIST_TRUE= ENABLE_FILELIST_FALSE='#' else ENABLE_FILELIST_TRUE='#' ENABLE_FILELIST_FALSE= fi if test "$enable_blockbuffer" != "no"; then ENABLE_BLOCKBUFFER_TRUE= ENABLE_BLOCKBUFFER_FALSE='#' else ENABLE_BLOCKBUFFER_TRUE='#' ENABLE_BLOCKBUFFER_FALSE= fi if test "$enable_command_history" != "no"; then ENABLE_COMMAND_HISTORY_TRUE= ENABLE_COMMAND_HISTORY_FALSE='#' else ENABLE_COMMAND_HISTORY_TRUE='#' ENABLE_COMMAND_HISTORY_FALSE= fi if test "$enable_output_history" != "no"; then ENABLE_OUTPUT_HISTORY_TRUE= ENABLE_OUTPUT_HISTORY_FALSE='#' else ENABLE_OUTPUT_HISTORY_TRUE='#' ENABLE_OUTPUT_HISTORY_FALSE= fi if test "$enable_config_files" != "no"; then ENABLE_CONFIG_FILES_TRUE= ENABLE_CONFIG_FILES_FALSE='#' else ENABLE_CONFIG_FILES_TRUE='#' ENABLE_CONFIG_FILES_FALSE= fi if test "$enable_prefix_commands" != "no"; then ENABLE_PREFIX_COMMANDS_TRUE= ENABLE_PREFIX_COMMANDS_FALSE='#' else ENABLE_PREFIX_COMMANDS_TRUE='#' ENABLE_PREFIX_COMMANDS_FALSE= fi if test "$enable_debugger" = "yes"; then ENABLE_DEBUGGER_TRUE= ENABLE_DEBUGGER_FALSE='#' else ENABLE_DEBUGGER_TRUE='#' ENABLE_DEBUGGER_FALSE= fi if test "x$fizmo_dist_version" != "x"; then FIZMO_DIST_VERSION_TRUE= FIZMO_DIST_VERSION_FALSE='#' else FIZMO_DIST_VERSION_TRUE='#' FIZMO_DIST_VERSION_FALSE= fi ac_config_files="$ac_config_files Makefile src/tools/Makefile src/interpreter/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:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${FIZMO_DIST_BUILD_TRUE}" && test -z "${FIZMO_DIST_BUILD_FALSE}"; then as_fn_error $? "conditional \"FIZMO_DIST_BUILD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_TRACING_TRUE}" && test -z "${ENABLE_TRACING_FALSE}"; then as_fn_error $? "conditional \"ENABLE_TRACING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_BABEL_TRUE}" && test -z "${ENABLE_BABEL_FALSE}"; then as_fn_error $? "conditional \"ENABLE_BABEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_STRICT_Z_TRUE}" && test -z "${ENABLE_STRICT_Z_FALSE}"; then as_fn_error $? "conditional \"ENABLE_STRICT_Z\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_SEGFAULT_ON_ERROR_TRUE}" && test -z "${ENABLE_SEGFAULT_ON_ERROR_FALSE}"; then as_fn_error $? "conditional \"ENABLE_SEGFAULT_ON_ERROR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_FILELIST_TRUE}" && test -z "${ENABLE_FILELIST_FALSE}"; then as_fn_error $? "conditional \"ENABLE_FILELIST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_BLOCKBUFFER_TRUE}" && test -z "${ENABLE_BLOCKBUFFER_FALSE}"; then as_fn_error $? "conditional \"ENABLE_BLOCKBUFFER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_COMMAND_HISTORY_TRUE}" && test -z "${ENABLE_COMMAND_HISTORY_FALSE}"; then as_fn_error $? "conditional \"ENABLE_COMMAND_HISTORY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_OUTPUT_HISTORY_TRUE}" && test -z "${ENABLE_OUTPUT_HISTORY_FALSE}"; then as_fn_error $? "conditional \"ENABLE_OUTPUT_HISTORY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_CONFIG_FILES_TRUE}" && test -z "${ENABLE_CONFIG_FILES_FALSE}"; then as_fn_error $? "conditional \"ENABLE_CONFIG_FILES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_PREFIX_COMMANDS_TRUE}" && test -z "${ENABLE_PREFIX_COMMANDS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_PREFIX_COMMANDS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_DEBUGGER_TRUE}" && test -z "${ENABLE_DEBUGGER_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DEBUGGER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FIZMO_DIST_VERSION_TRUE}" && test -z "${FIZMO_DIST_VERSION_FALSE}"; then as_fn_error $? "conditional \"FIZMO_DIST_VERSION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by libfizmo $as_me 0.7.15, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ libfizmo config.status 0.7.15 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _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 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/tools/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;; "src/interpreter/Makefile") CONFIG_FILES="$CONFIG_FILES src/interpreter/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi libfizmo-0.7.15/aclocal.m40000644000175000017500000015215713153330676015447 0ustar chrenderchrender# generated automatically by aclocal 1.15.1 -*- Autoconf -*- # Copyright (C) 1996-2017 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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. 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'.])]) dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- dnl serial 11 (pkg-config-0.29) dnl dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR # Copyright (C) 2002-2017 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.15' 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.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Copyright (C) 2011-2017 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_AR([ACT-IF-FAIL]) # ------------------------- # Try to determine the archiver interface, and trigger the ar-lib wrapper # if it is needed. If the detection of archiver interface fails, run # ACT-IF-FAIL (default is to abort configure with a proper error message). AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], [AC_LANG_PUSH([C]) am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a ]) AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) m4_default([$1], [AC_MSG_ERROR([could not determine $AR interface])]) ;; esac AC_SUBST([AR])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2017 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], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2017 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_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2017 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. # 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", "OBJC", "OBJCXX", "UPC", or "GJC". # 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 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" 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". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2017 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_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2017 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # 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.65])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], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) 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], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2017 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2017 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_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2017 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_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 is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2017 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_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2017 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_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2017 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_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2017 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_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2017 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_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2017 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-2017 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]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2017 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_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. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} 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 libfizmo-0.7.15/compile0000755000175000017500000001624513153330676015162 0ustar chrenderchrender#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 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, see . # 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 # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libfizmo-0.7.15/ar-lib0000755000175000017500000001330213153330676014667 0ustar chrenderchrender#! /bin/sh # Wrapper for Microsoft lib.exe me=ar-lib scriptversion=2012-03-01.08; # UTC # Copyright (C) 2010-2017 Free Software Foundation, Inc. # Written by Peter Rosin . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # 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 # . # func_error message func_error () { echo "$me: $1" 1>&2 exit 1 } file_conv= # func_file_conv build_file # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv in mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin) file=`cygpath -m "$file" || echo "$file"` ;; wine) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_at_file at_file operation archive # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE # for each of them. # When interpreting the content of the @FILE, do NOT use func_file_conv, # since the user would need to supply preconverted file names to # binutils ar, at least for MinGW. func_at_file () { operation=$2 archive=$3 at_file_contents=`cat "$1"` eval set x "$at_file_contents" shift for member do $AR -NOLOGO $operation:"$member" "$archive" || exit $? done } case $1 in '') func_error "no command. Try '$0 --help' for more information." ;; -h | --h*) cat <. libfizmo.a:: cd src/tools ; make cd src/interpreter ; make mkdir -p "$(tmplibdir)" ; \ cd "$(tmplibdir)" ; \ "$(AR)" x ../src/tools/libtools.a ; \ "$(AR)" x ../src/interpreter/libinterpreter.a ; \ find . -name '*.o' -print0 | LC_ALL=C sort -z | xargs -0 "$(AR)" $(ARFLAGS) ../libfizmo.a ; \ "$(RANLIB)" ../libfizmo.a ; \ cd .. ; \ rm -r "$(tmplibdir)" install-dev:: libfizmo.a mkdir -p "$(dev_prefix)/lib/fizmo" cp libfizmo.a "$(dev_prefix)/lib/fizmo" mkdir -p "$(dev_prefix)/include/fizmo/interpreter" cp src/interpreter/*.h \ "$(dev_prefix)/include/fizmo/interpreter" mkdir -p "$(dev_prefix)/include/fizmo/tools" cp src/tools/*.h "$(dev_prefix)/include/fizmo/tools" mkdir -p "$(dev_prefix)/include/fizmo/screen_interface" cp src/screen_interface/*.h \ "$(dev_prefix)/include/fizmo/screen_interface" cp src/screen_interface/*.cpp \ "$(dev_prefix)/include/fizmo/screen_interface" cp -r src/sound_interface "$(dev_prefix)/include/fizmo/" cp -r src/filesys_interface "$(dev_prefix)/include/fizmo/" cp -r src/blorb_interface "$(dev_prefix)/include/fizmo/" mkdir -p "$(pkg_dir)" echo 'prefix=$(pkg_prefix)' >"$(pkgfile)" echo 'exec_prefix=$${prefix}' >>"$(pkgfile)" echo 'libdir=$${exec_prefix}/lib/fizmo' >>"$(pkgfile)" echo 'includedir=$${prefix}/include/fizmo' >>"$(pkgfile)" echo >>"$(pkgfile)" echo 'Name: libfizmo' >>"$(pkgfile)" echo 'Description: libfizmo' >>"$(pkgfile)" echo 'Version: 0.7.15' >>"$(pkgfile)" echo "Requires: $(LIBFIZMO_REQS)" >>"$(pkgfile)" echo 'Requires.private:' >>"$(pkgfile)" echo 'Cflags: -I$(pkg_prefix)/include/fizmo' >>"$(pkgfile)" echo 'Libs: -L$(pkg_prefix)/lib/fizmo -lfizmo $(LIBXML2_NONPKG_LIBS) -lm' >>"$(pkgfile)" echo 'Libs.private:' >>"$(pkgfile)" echo >>"$(pkgfile)" install-data-local:: mkdir -p "$(DESTDIR)$(localedir)" for l in `cd src/locales ; ls -d ??_??`; \ do \ mkdir -p "$(DESTDIR)$(localedir)/$$l" ; \ cp src/locales/$$l/*.txt "$(DESTDIR)$(localedir)/$$l" ; \ done # About "-rmdir": make ignores errors of commands which are prefixed with # a - sign. rmdir may fail in clean-dev in case other libs have installed # development files, or in case clean-dev has been run before. clean-dev:: -rm "$(dev_prefix)/lib/fizmo/libfizmo.a" -rmdir "$(dev_prefix)/lib/fizmo" rm -rf "$(dev_prefix)/include/fizmo/interpreter" rm -rf "$(dev_prefix)/include/fizmo/tools" rm -rf "$(dev_prefix)/include/fizmo/sound_interface" rm -rf "$(dev_prefix)/include/fizmo/filesys_interface" rm -rf "$(dev_prefix)/include/fizmo/blorb_interface" -rm "$(dev_prefix)/include/fizmo/screen_interface/ScreenInterface.cpp" -rm "$(dev_prefix)/include/fizmo/screen_interface/ScreenInterface.h" -rm "$(dev_prefix)/include/fizmo/screen_interface/screen_interface.h" -rmdir "$(dev_prefix)/include/fizmo/screen_interface" -rmdir "$(dev_prefix)/include/fizmo" -rm "$(pkgfile)" libfizmo-0.7.15/config-subst.m40000644000175000017500000000063013153330674016436 0ustar chrenderchrender # This is included from fizmo-dist and not required by libfizmo's own # configuration. It nevertheless needs to be maintained so fizmo-dist # will still work. # # The $build_prefix, $build_prefix_cflags and $build_prefix_libs are # pre-defined by fizmo-dist. AC_SUBST([libfizmo_CFLAGS], "-I$build_prefix_cflags $libxml2_CFLAGS") AC_SUBST([libfizmo_LIBS], "-L$build_prefix_libs -lfizmo $libxml2_LIBS -lm") libfizmo-0.7.15/LICENSE.txt0000644000175000017500000000305213153330676015417 0ustar chrenderchrender Copyright (c) 2009-2017, Christoph Ender All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. libfizmo-0.7.15/configure.ac0000644000175000017500000000776613153330674016100 0ustar chrenderchrender # configure.ac # # This file is part of fizmo. # # Copyright (c) 2009-2017 Christoph Ender. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. AC_ARG_ENABLE([tracing], [AS_HELP_STRING([--enable-tracing], [enable tracelog for debugging])], [], [enable_tracing=no]) AC_ARG_ENABLE([babel], [AS_HELP_STRING([--disable-babel], [disable babel functionality which means that libxml2 will \ not be required for building])], [], [enable_babel=yes]) AC_ARG_ENABLE([strict-z], [AS_HELP_STRING([--enable-strict-z], [enforce strict Z-Machine handling])], [], [enable_strict_z=no]) AC_ARG_ENABLE([segfault-on-error], [AS_HELP_STRING([--enable-segfault-on-error], [deprecated debug helper])], [], [enable_segfault-on-error=no]) AC_ARG_ENABLE([filelist], [AS_HELP_STRING([--disable-filelist], [disable story-list-keeping functionality])], [], [enable_filelist=yes]) AC_ARG_ENABLE([blockbuffer], [AS_HELP_STRING([--disable-blockbuffer], [disable buffering ability for upper window])], [], [enable_blockbuffer=yes]) AC_ARG_ENABLE([command-history], [AS_HELP_STRING([--disable-command-history], [disable history of previously entered commands])], [], [enable_command_history=yes]) AC_ARG_ENABLE([output-history], [AS_HELP_STRING([--disable-output-history], [disable history of recent screen output])], [], [enable_output_history=yes]) AC_ARG_ENABLE([config-files], [AS_HELP_STRING([--disable-config-files], [disable parsing of configuration files])], [], [enable_config_files=yes]) AC_ARG_ENABLE([prefix-commands], [AS_HELP_STRING([--disable-prefix-commands], [disable in-game interpreter commands])], [], [enable_prefix_commands=yes]) AC_ARG_ENABLE([debugger], [AS_HELP_STRING([--enable-debugger], [enable experimental debugging functionality])], [], [enable_debugger=no]) m4_include(config-flags.m4) AC_INIT( [libfizmo], [0.7.15], fizmo@spellbreaker.org, libfizmo) AC_CONFIG_AUX_DIR([.]) m4_include(config-libs.m4) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC AC_PROG_RANLIB AM_PROG_AR AC_SUBST([LIBFIZMO_REQS], $libfizmo_reqs) AC_SUBST([LIBXML2_NONPKG_CFLAGS], $libxml2_nonpkg_cflags) AC_SUBST([LIBXML2_NONPKG_LIBS], $libxml2_nonpkg_libs) AM_CONDITIONAL([FIZMO_DIST_BUILD], [test "x" = ""]) AM_CONDITIONAL([ENABLE_TRACING], [test "$enable_tracing" = "yes"]) m4_include(config-conds.m4) AC_CONFIG_FILES([Makefile src/tools/Makefile src/interpreter/Makefile]) AC_OUTPUT libfizmo-0.7.15/install-sh0000755000175000017500000003546313153330676015613 0ustar chrenderchrender#!/bin/sh # install - install a program, script, or datafile scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) # $RANDOM is not portable (e.g. dash); use it when possible to # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so # create the $tmpdir first (and fail if unsuccessful) to make sure # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libfizmo-0.7.15/CHANGELOG.txt0000644000175000017500000015503213153330676015632 0ustar chrenderchrender Version 0.7.15 -- September 3, 2017 - Fix superfluous libraries and includes during install when using $DESTDIR, addressing github issue #21. - Made screen size functions use 16-bit instead of 8-bit values, allowing version 5+ games to work with screen dimensions > 255. - In case of screen dimensions > 255, write 255 into the byte-sized header entries $20 and $21. - Fix compile-time error which occurred when --disable-output-history was set. Thanks to Jared Reisinger for the patch. - Added missing contributor phrasing to BSD-3 clause. The resulting license now exactly matches the wording used on Github and so also makes the license detection work. Version 0.7.14 -- April 8, 2017 - User input for read_char is now supported in stream 4. Thanks to Michael Baltes for the initial implementation. - Fix for crashes on startup when loading hyphenation patterns und localiazation data for machines which have chars as unsigned types. Thanks to Lewis Gentry for the patch. - Fixed possible crash when invoking read_char with a non-zero verification routine address. Thanks to Stephen Gutknecht for reporting the problem. - Replaced en_US locale with en_GB due to license issues with the US hyphenation patterns from the "hyph-utf8" package for the time being. Adapted localization aliases so any current configuration should be still working without problems. - Fixed missing repeat-paragraph-output in case buffer back was encountered in output history. This fixes the initial missing line of text in "eliza.z5". - Added detection whether supplied story file is a valid Z-Machine file or a blorb file containing a "ZCOD" chunk and show error message if it's not the case. - Added "is_history_empty" method as helper for libpixelif. - Fixed "delete_list_and_get_null_terminated_ptrs" for empty lists. Version 0.7.13 -- October 8, 2016 - Fixed a crash which occurred after entering an invalid filename for the /fileinput command and then re-invoking the same command. Thanks to Michael Baltes for reporting the problem. - Improved build system for separate library and interface builds. Version 0.7.12 -- August 31, 2016 - In the context of the Debian Reproducible Builds, building libfizmo is now reproducible, see https://wiki.debian.org/ReproducibleBuilds. Thanks to Sascha Steinbiss for the patch. - Use tiny-xml-doc-tools for documentation files. - Cleaned up versioning mess a little bit: Removed FIZMO_VERSION, use LIBFIZMO_VERSION instead, since this is more helpful if libfizmo is used stand-alone. Version 0.7.11 -- July 28, 2016 - Fix segfault in case metadata is written to output history when screen interface is not open. - Added write/read of last paragraph_attributes. - Implement init for config default values. Version 0.7.10 -- October 9, 2015 - Adapted print_table opcode to work in lower window. This fixes output errors in "Sherlock". - Fix for Debian bug #795800: When the ncurses screen is resized when Inform's menu library displays hints or instructions fizmo will no longer exit and complain about an error in the "output_rewind_paragraph" function. Thanks to Lewis Gentry for reporting this problem. - Implemented "flush-output-on-newline" configuration option. This will ensure that any output is flushed to history and interface before a newline. This allows interfaces to store paragraph-relevant attributes in the history with minor fuzz (which is used by fizmo-sdl). - Added new metadata-type "paragraph attribute" for the purpose described above, along with auxiliary callbacks "paragraph_attribute_function" and "paragraph_removal_function" which are invoked from the history. - Minor changes in processing when converting font 3 to unicode. - Fixed possible garbled upper window after erase_window(-1) invocation. - Minor fixes for lib detection, will remove some warnings and possible some build issues on linux. - Fix in history/remove_chars_from_history. - Fix for missing prompt after interpreter commands. - Implemented "alter_last_paragraph_attributes". - Implemented backwards-history reading. - Minor extensions and bugfixes to history. - Fix for erroneous upper window text in history. Version 0.7.9 -- May 25, 2014 - Fixed conflicting array-size in zpu.h / zpu.c which could result in invalid memory assumptions by the compiler. Thanks to Michael Tautschnig. Version 0.7.8 -- March 19, 2014 - Fixed missing lowering of input case for versions >= 5, thanks to irb. - Adapted to automake v1.14 and fixed compiler warning. - Fixed "encode_text" and tokenizing for cases in which the "unrecognized"-flag is set. This fixes a bug with the "name" spell in Beyond Zork, thanks to irb. - Fixed "AC_CONFIG_AUX_DIR" invocation. - Fixed wrapping of long lines without spaces as in ASCII art. Thanks to David Batchelder for pointing out the problem. - Made output_rewind_paragraph count rewound chars. This makes refereshing the screen a bit easier for the ncursesw interface. - After a restore, the current screensize is now written into the header. This should correct upper windows display problems after loading of savegames. - Added "clean-dev" build target for better cleanup of installed development files, which helps debian packaging. - When breaking long lines, multiple spaces are now skipped at the linebreak point to avoid superfluous spaces at the start of the next line. Thanks to Lewis Gentry. - Fixed UTF-8 for input from file. Thanks to Mikko Torvinen for reporting the bug. Version 0.7.7 -- June 5, 2013 - Fixed wordwrapper for cases in which text was written on the same line as read_char was invoked. This makes output of multiline-hints in PRIZM's Invisiclues work. Thanks to David Batchelder. - Renamed getchar, getchars and ungetchars from the file system interface to readchar, readchars and unreadchars. This makes fizmo compile on systems where getchar() is implemented as a macro. - Added missing evalation of fixed-pitch font flag in the flags2 header. - Altered close_interface function to allow z_mem access during shutdown. - Fixed several compiler warnings. - Invoking "/config" without setting color defaults will no longer crash the interpreter. - Added z_rgb_colour datatype. - Renamed "install-locales" into "install-data-local" build target. - Other minor bugfixes. Version 0.7.6 -- December 27, 2012 - Reparied "math.h" name collision, fixing missing "rint" function declaration. - Fixed universal builds on Mac OS X. - Fixed warning in "cmd_hst" compilation. - Searching for z-code files will now automatically create ~/.config/fizmo so that search results are no longer lost, thanks to B. Watson. Version 0.7.5 -- November 30, 2012 - Fix for preloaded input removal, thanks to Lewis Gentry. - Fixed missing characters in transcripts. - Fixed swallowing of dots, commas and quotation marks at line starts in case hyphenation is disabled -- thanks to Lewis Gentry. - Fixed crash which occurred when invoking fizmo-ncursesw with the "-fi" flag, also thanks to Lewis Gentry. - Colors are now correctly set for all windows on screen in case no window is specified for @set_colour. - Re-implemented line-wrapper, fixing several issues. - Fix for memory corruption in command-history, thanks to Lewis Gentry. Version 0.7.4 -- August 17, 2012 - Implemented new build system based on autoconf/automake. Version 0.7.3 -- August 1, 2012 - Merged Andrew Plotkin's iOS-fizmo changes: No more raw exit() calls, added screeninterface-specific filename prompt, new screeninterface-specific filename prompt replaces fizmo_register_ask_user_for_file_function, fixed autosave-functionality, added "disable-stream-2-wrap" and "max-undo-steps" config option and fix for an overlong property issue that made "Heist" crash. - Implemented memory-cleanup and fixed variable states after story end to allow fizmo_start() to be called repeatedly. - Fixed some minor memory leaks. - Fixed segfault which would occur after storing 10240 undo steps. - Added new option to set number of maximum stored undo steps. - Changed blockbuffer initialization to allow for output at any time, made fizmo_new_screen_size adapt blockbuffer size correctly. - Fixed a buffer overflow during tokenization, thanks for Andrew Plotkin. - Implemented binary chop dictionary search. Version 0.7.2 -- March 9, 2012 - Made fizmo comply to "praxix.z5" test. - Merged zarf's DISABLE_PREFIX_COMMANDS functionality. - Fixed missing $(DESTDIR) variable -- should already have been present since version 0.7.1. - Fixed an error which would occur for empty pathnames when starting up a game on 32-bit platforms, thanks to Samuel Verschelde. - The transcription and fixed font bits will now correctly survive a restore, as defined in the Z-Maschine standard. Version 0.7.1 -- November 6, 2011 - Fixed missing "override" statments for CFLAGS in Makefiles. - Fixed $(DESTDIR) evaluation in config.[default|macports].mk. - Adapted Makefiles and configuration to use standard GNU Makefile variables instead of INSTALL_PATH and FIZMO_BIN_DIR. - Fixed an error in the stack restoration in "opcode_restore_undo". Thanks to Lewis Gentry for reporting this bug. - Implemented first debugger stubs. The debugger is available via network socket and will currently only dump PC, locals and stack contents. Version 0.7.0 -- September 18, 2011 - Module name change: The ncursesw- and console-interface, the sdl-sound interface and the X11-specific code have been moved into separate modules named "fizmo-ncursesw", "fizmo-console", "libsndifsdl" and "libdrilbo". This module has been renamed from "fizmo" to "libfizmo", providing only the base interpreter functionality without any interface. - Implemented Frank Liangs TeX hy-phen-a-tion algorithm into the wordwrapper. Patterns were taken from the "hyph-utf8" project at http://www.ctan.org/tex-archive/language/hyph-utf8/. Re-implemented the word wrapper. - Rebuilt locales system. So far, all available locales were directly compiled into the binary and stored using a rather inflexible method which wasted some memory. Version 0.7.0 now stores the locales on the disk, reading only those languages and modules which are currently required. All i18n-invocations do now directly accept a module identifier, make the old switch functionality obsolete. Adapted all i18n calls to new method. - Rebuilt output history storage. This has been reimplemented using a single memory stream instead of storing text and metadata separately. - Moved "i18n", "tracelog", "z_ucs" and "types" into a new "tools" package adding "stringmap", "list" and "tools_test" on the way. The tools package is supposed to be used by interpreter-related tools which don't require the interpreter itself. - Rebuilt the interpreter core of fizmo into a set of static libraries. - Implemented saving of text history using a non-standard chunk type "TxHs" in quetzal savegames. - Added configuration variable "save-text-history-paragraphs" which defines the maximum number of paragraphs to store in a savegame. - Added variable interpretation -- so far, only $(HOME) is implemented -- for config files. - Re-implemented the entire build process. Libraries may now be compiled and installed on their own, pkg-config is used whereever possible to ease compilation and installation. Version 0.6.9 -- April 24, 2011 - Bugfix release: Fixed negative count for unsorted dictionaries in the tokenise opcode. This fixed the crash in "Beyond Zork" which occurred while executing "i" after an item was name, thanks to irb. - Fixed "get_utf8_code_length". This fixes output of non-latin1 output codes in the transcript file, thanks to Lewis Gentry, closes debian issue #617714. - Increased maximum allowed option size to 512 to allow for longer filenames. - Added NCURSESW_INCLUDE_FROM_W_DIRNAME to configs to allow usage of Apple's ncurses implementation, added GDKPIXBUF_INC_DIR configuration variable. Version 0.6.8 -- January 12, 2010 - Bugfix release: Interpreter and interface information is now correctly written into the header after restarting, additionally the input length for transcript and command input/output-stream filenames has been fixed. Thanks to Samuel Verschelde. - Added "sync-transcript" option: When enabled, it'll flush the wordwrapper and file output buffer as soon as possible. Version 0.6.7 -- December 14, 2009 - Fixed trunction of babel data input. So far, the last byte was cut off from the input, resulting in an error if the file was encoded using unix newlines, but no errors as long as DOS newlines were used. This fixes missing metadata issues in the story browser. Thanks again to Zachary Kline. Version 0.6.6 -- December 14, 2009 - Fixed story browser to remove ".zblorb" suffixes from story titles which are not backed by babel information and evaluated from the filename. This will only work for new stories which are added to the list, to re-index your current story-list the old file has to be removed and re-built. "rm $HOME/.config/fizmo/story-list.txt" should be run first, followed by the command "fizmo -u". Thanks to Zachary Kline. - Minimal changes to the seeding of math.c's "srand" and "init_by_array" in hopes of increasing input entropy. Version 0.6.5 -- October 13, 2009 - Bugfix release: Recommend for MacPorts, will make compiling work for parallel builds in MacPorts version 1.8.0+. - Transcription will be kept active after restarts, thanks to Samuel Verschelde. - Fixed Makefiles for parallel builds (make -j). Version 0.6.4 -- May 24, 2009 - Bugfix release: Definitely recommend for read_char fix. - Fixed interface to supply default colors in case ncurses' "pair_content" returned invalid colors (thanks to Samuel Verschelde). - Input from read_char is no longer re-echoed to the screen (thanks to Samnuel Verschelde). Version 0.6.3 -- April 26, 2009 - The top-level Makefile may now be invoked with "CONFIG_FILE=". - Adapted "config.macos.mk" to MacPorts portfiles and ports-filesystem so that fizmo is now easily MacPorts-buildable. - Added license information to every file. - Improved GNU coding compliance: install now goes to "($DESTDIR)/usr". Version 0.6.2 -- April 25, 2009 - Bugfix release: Corrected save opcode and prepared for debianization. - Adapted manpage to make lintian work. - Corrected "src/c/interface.h". - Fixed typo in manpage. - Fixed save opcode to not wrap data into IFF and to disable compression when only a table from memory is saved (operands 2 and 3 for address and length are set). This fixes "Comp96.z5". Version 0.6.1 -- March 30, 2009 - Bugfix release: minor addition of several features (may now compile without libsndfile and libSDL alone, implemented XDG base directory specification). - Removed unused references to SDL-mixer (which isn't used for anything anymore). - Improved and documented default "config.*.mk" files and added config default for cygwin with sound support (to my own great surprise, sound really works under Cygwin). - Added more information to "INSTALL.txt". - Implemented new ENABLE_AIFF_FOR_SOUND_SDL variable in config files. This allows the sound-sdl-interface to at least play Infocom .snd files when no libsndfile is available. - Added config-file options to manpage. - Changed location of fizmo config directory from fixed "$HOME/.fizmo" to XDG_CONFIG_HOME standard and implemented use of XDG_CONFIG_DIRS. Thanks for suggestions and debugging help from Eric Forgeot. Specifications and more information found at http://freedesktop.org/wiki/Software/xdg-user-dirs. - Fixed broken space allocation, forgotten NULL-checks and fixed some issues to make frontispiece work better on GenToo. Thanks for these patches from David Leverton (see also line #50 in "src/ncursesw/Makefile"). This fixes possible startup crashes. - Added FIZMO_BIN_DIR variable to Makefile. Version 0.6.0 -- March 25, 2009 - (find c cgi cpp fizmo ncursesw simple-c simple-cpp single-turn sound-sdl -type f -name '*.c' -or -name '*.cpp' -or -name '*.h' | xargs cat | wc -l resulted in 29953 lines of output) - This marks the point for the first public beta release. Killed all known bugs as far as I could find them and made fizmo work on Linux -- tested with a 64-bit distribution of Debian/Lenny -- and Mac OS X 10.5 with a 32-bit Intel machine and MacPorts for SDL. New features since version 0.5 include an SDL-based sound interface, support for charachter font via unicode translation, partial (z)blorb-support -- runs code from blorbs, can display frontispiece images in XTerms and play AIFF-sounds, a story file navigator, interface margins, restore from command line, a much improved streams implementation, a manpage and many other small features as well as a large amount of bugfixes. - Implemented conversion of font 3 (charachter font) to unicode. This appears to make Beyond Zork's map appear at least readable. - All directories in the "ZCODE_ROOT_PATH" are now recursively searched for Z-machine games. - Implemented recording and replaying of timed input. - Implemented new "*.snd" search method: Generalized for all files, not only Lurking Horror and Sherlock, tries upper- and lowercase. - Fixed scan_table opcode. This fixes Beyond Zork window output. - The filename input for save and restore may now be cancelled using the escape key. - Pressing arrow up/down during filename input no longer displays the command history. - Implemented wordwrapper / ncursesw margins. - Flags are now correctly restored during undo and restore opcodes. - Added progress indicator for story-list update. - Fixed a bug that would damage the story list in case a game had a release code with a length equal 5. - Fixed an issue that would cause bits > 0xffff from routine address to be lost on timed-routine-calls. - Implemented "no-update" command line flag and config option to avoid long startup scan times (for example on slow notebook drivers with many story files). - Implemented "--search" and "--recursively-search" command line invocations. - Fixed bug in scrollback parapgraph position cache. - Fixed a memory leak from getcwd(NULL, 0) in "filelist.c". - Fixed scroll-down display for scrolling to bottom. - Fixed crash that occured when a read-instruction was recursively called from a timed input verification-routine. - Modified LOADB / LOADW opcodes to store 0 in target instead of doing nothing when trying to read from an illegal address. This appears to make the russian version of "All Roads" ("AllRoadsR.z5") work. - Fixed a bug in the story-title evaluation from filename when the story name did not contain any slashes. - Fixed display error on refresh of preloaded input from history. - Implemented IGNORE_TOO_LONG_PROPERTIES_ERROR config define which makes "property.c" ignore too long properties (fixes "HugeCave.z8"). - Implemented forced predictable mode (ignores seeding random generator). - Fixed story-list for directly invoked files with relative pathname. - Many, many other minor fixes and extensions. Version 0.5.3 -- March 11, 2009 - (find c cgi cpp fizmo ncursesw simple-c simple-cpp single-turn sound-sdl -type f -name '*.c' -or -name '*.cpp' -or -name '*.h' | xargs cat | wc -l resulted in 28499 lines of output) - Re-built SDL-Sound system (implemented sound effect stack, better sound-has-finished-detection and many, many fixes). - Re-wrote Makefile system. Releveant module defaults are now kept in separate .mk-files. - Added support for AIFF-sounds in blorb files. - Added support for extra-blorb files (these are specified on the command line directly after the story file name). - Added "-Wextra" flag to CFLAGS and cleaned up new warnings caused by the new flag. - Cleaned up config file, fixed a minor bug and made boolean vars work "more" correctly. - Fixed "VERIFY" opcode. - Several fixes: Patched "savegame.c" to re-enable use of "CMem" save method, removed a superfluous free in streams.c which tried to free a static string. - Many minor fixes (option system, running X11-enabled fizmo in text-only console, etc). Version 0.5.2 -- January 17, 2009 - (find c cgi cpp fizmo ncursesw simple-c simple-cpp single-turn sound-sdl -type f -name '*.c' -or -name '*.cpp' -or -name '*.h' | xargs cat | wc -l resulted in 27123 lines of output) - Implemented filelist (which remembers all files invoked and files in searched directories). - Added use of libxml2 to parse metadata from the babel XML file. - Implemented story selection menu in ncursesw interface. - Implemented parsing of rc file. - Added bold-for-bright-foreground and blink-for-bright-background terminal options. - Implemented dont-use-color and force-color option. - Fixed interface for > 121 colors. - Added "help" command. - Implemented "savegame-path" configuration option which specifies the directory for savegames. - Implemented text paragraph position cache to speed up scrollback for large amounts of text (not elegant, but works). - Savegames are no longer restored in case serial, release or checksum don't match. - Removed non-standard "FILE" chunk again, the storyfiles for directly invoked savegames (from the command line) are now located via the filelist. - Implemened "force-quetzal-umem" config option from the command line. - Added manpage. - Fixed "verify" opcode. - Basic implementation of input stream 1. - Implemented basic blorb support (meaning that blorb files are detected, information about pictures and sound is parsed and the first found "ZCOD" chunk is executed). - Fizmo now always keeps a FILE* to the story file open, eliminating the need for a lot of open / close calls (and simplyfing blorb handling). - Stories may now be started from the command line using their "real name" in case they are stored in the story-list. Example: "fizmo sorcerer". - Many, many small fixes (scrollback, winch-redisplay, negative score, Version 0.5.1 -- November 4, 2008 - (find fizmo simple-c simple-cpp c cgi single-turn cpp ncursesw qzinspect snd2aiff sound-sdl -type f -name '*.c' -or -name '*.cpp' -or -name '*.h' | xargs cat | wc -l resulted in 23265 lines of output) - Implemented SDL-sound-interface. To make SDL work in Mac OS X I've used MacPorts to install SDL ("port install libsdl"), on Debian I've been using "apt-get install libsdl-sound1.2-dev" (maybe "apt-get install alsa-base alsa-utils" is also required). - Fixed scrollback and i18n-exit-translation. - Fixed libfizmo to also use setitimer/sigaction (makes fizmo work better on linux). - Implemented foreground/background color command line parameters for ncursesw interface. - Fixed get-cursor-[column|row] for ncursesw (makes PRINT_TABLE and Sherlock work). - Added "UMem" support for quetzal. - Added "snd2aiff" commandline utility (this was the basis for the first sound interface experiments). - Added "qzinspect", a simple commandlinetool which uses libfizmo to list the contents of a quetzal savegame. - Added non-standard "FILE" chunk to savegames which contains the absolute file name of the story file which saved the game. - Implemented restore from the command line: In case a quetzal-savegame containing the non-standard-chunk "FILE" is given on the command line, fizmo will try to restore the savegame using the story filename stored in this chunk. Version 0.5.0 -- October 30, 2008 - (find fizmo simple-c simple-cpp c cgi single-turn cpp ncursesw -type f -name '*.c' -or -name '*.cpp' -or -name '*.h' | xargs cat | wc -l resulted in 21963 lines of output) - This version is now definitely usable to play all non-v6 games. Did extensive testing using Borderzone, "LostPig.z8", "Zokoban.z5", "crashme.z5", "etude.z5", "paint.z5", "random.z5", "reverzi.z5" and "unicode.z5". Only two minor known bugs remain: Scrollback sometimes miscalculates the current row after a lot of scrolling back and forth (which is always "fixable" to pressing any-key which correctly rebuilds the current output page, and a display anomaly on the frontpage of "vampire.z8" which I intended to keep after a lot of code-inspection (since fizmo appears to be implementing the screen modell correctly and fixing this display problem breaks a lot of other games). This version has been tested on Linux, Darwin (Mac Os X) and a little bit on XP/Cygwin (using a self-built ncursesw). - Added "z_ucs_rchar" to "z_ucs.c". - Re-implemented word-wrapper to not compress multiple spaces, keep spaces after newlines and buffer more than on line. The fixes the map display problem in "Enchanter". - Changed opcode_restore to read dynamic memory and stack of the restored game into a freshly allocated memory block instead of directly into the game data. This makes it possible to now continue the current game instead of dropping back to the command line. - Fixed opcode_save to not exit in case an errors occurs during saving, but to merely give a warning (and correctly evaluate the branch). Now the currently active game isn't lost anymore in case a save goes wrong. - Added a LOT of error checking in "iff.c" and "savegame.c". There's possibly a better way, but checking every single return value also works. - Added table-saving extensions to save- and restore-opcodes. - Fixed tokenizing for version 5+. - Fixed timed-input detection for "read" opcode. This fixes the crash in ZTUU when the lantern goes out. - Ran fizmo through (sp)lint, fixed memory leaks, minor bugs, many typecasts, some double and inconsistent definitions, cleanup up code. - Fixed Makefile dependencies. - Fixed a possible SIGSEV when using fprintf with "%ls" output format. This tended to crash when used on wchar_t on darwin. - Implemened scrollback for ncursesw interface, added support method for scrollback in "history.c". - Added last missing v5 opcodes. - Fixed end-of-stack detection so that stack is now correctly enlarged when required. - Added module-based localization, removed unused localization entries. - Fixed space detection in wordwrapper. - Fixed metadata-handling (memcpy) in history.c - Added "single-turn" interface. - Fixed operand handling in zpu. - Added configuration system. - Re-built save/restore, should be finally 100% quetzal compatible. - Implemented output stream 4. - Fixed output stream 2. - Some split-window / set_window / set_cursor fixed for ncursesw-interface. - Substitued ualarm/signal with setitimer/sigaction since the first one won't catch SIGALRM on linux and manpage says that ualarm is obsolete. - Fixed color management so that ncurses color pair is avaiable for reading. - Many, many minor bugfixes. Version 0.4.1 -- November 14, 2007 - (16373 lines in *.h and *.c files) - Fixed a bug in "parse_utf_8_char", this fixes i18n-messages. - Added C++ wrapper. - Implemented demo C++ screen interface. - Separated code in core, interface, c and cpp interfaces. - Improved upper window handling (trinity sundial) and blockbuffer (zork1.z5). Version 0.4.0 -- March 20, 2007 - (13718 lines in *.h and *.c files) - Moved to this new version on March 3, 2007. The old version has been lying around untouched since November 15, 2006. - Abandoned the internal use of UTF-8. It is just much too complicated to handle in the interface. I'm not even sure that with all the code necessary to handle UTF-8 handling that there is much space wasted. The important point for me is that using UCS-4 -- fixed, 32-bit sized characters -- is much more easier, and thus safer to use. - Re-implemented everything using wchar_t. The barebones C-Interface is the first converted. Everything took only a few hours. - Compacted code a little bit (tracelog.h, etc.). - Re-implemented the history-buffer in "streams.c". It is controlled by the Z_HISTORY_INCREMENT_SIZE and Z_HISTORY_MAXIMUM_SIZE constants in file "config.h". The buffer is re-alloced until it reaches the given maximum size. At that time, wrap-around is used to keep the buffer up to date. A debug function named "log_history" exists. - Converted the error handling to wchar_t. - Implemented SIGWINCH-handler for interfaces and associated handling in "ncrws-if.c". - Implemented metadata (color and style) storage for the history. - Implemented set_font opcode. - Fixed two minor issues in the wordwrapper. - Fixed a missing string-terminator in the zchar_to_ucs_4-function. Over two years that thing was working without it ... unbelievable. - Fixed a token-length problem in parsing. - Implemented correct UTF8-filename-handling for savefiles. - Implemented CATCH and THROW opcodes, both untested. - Re-built interpreter commands with new wchar-base, prompt-repetition from history and user-configurable prefix. - Re-implemented scripting with UCS-4. - Implemented buffering of metadata -- colour, styles and font -- in the history buffer. Windows may now be resized and keep their styles intact. - Fixes in property-management for version 4 games. - The sound-effect opcode is accepted now for effects 1 and 2, although it doesn't do anything yet. - Improved split-screen in ncurses-interface: In case the upper window becomes smaller, its content is copied over into the lower window (making reading the sundial in trinity.z4 working). - Fixed set_window to set cursor to (0,0) when selection upper window (this makes the sonarscope in Seastalker work). - Fixed wordwrapper to accomodate for styles which are sent after normal text which is followed by a space -- so far the style was activated before the space was output. - Implemented command history. - Fixed a bug that would cause screen resizes in versions before 5 try to set colours. - Implemented specialized blockbuffer for upper window. - Threw away wchar_t- and locale.h-usage. The problem is that they are not suported on older compilers, embedded systems or in emulations like cygwin. According to specifications, wchar_t may even only have 8 bits width and is compiler-implementation dependant, so it's practically not useable to store unicode-data. So i've implemented a z_ucs type which is always used for internal processing of characters. Thus every interface gets its output in z_ucs chars (which are simple int32_t types) and can happily typecast it into wchar_t if desired. Interfaces may still use wchar_t (in fact, ncursesw does), but the core is now completely autonomous. - Fizmo now compiles fine without warning on Cygwin. Both the c- and the ncursesw-interfaces seem to work nicely. - Fixed a bug in the wordwrapper which caused the zchar-converter-state and the linebuffer to overlay in a single byte. - Added "z" parameter to i18n string, representing z_ucs-strings. - Fixed stream-3-output: Current length is now always updated, not only when closing the stream. - Fixed input to make it work all across the screen and not only on the last line. - Fixed cursor movements and screen splits for version 4 and 5. - Splitted files into fizmo-core and interfaces. The interpreter itself is now put into a static library and linked in from the interfaces. - Moved "extern" statements into header files. Version 0.3.1 - (12276 lines in *.h and *.c files) - Added a few ZSCII/ASCII/ISO-8859-1/UTF-8 conversion functions in "text.c". - Improved the ncursesw-interface to handle US-ASCII and UTF-8 directly. - Implemented detection if a character has a suitable ZSCII representation before adding it to the input line. - Fixed a bug which prevented correct assembly of multi-Z-characters. - Fixed a bug that caused multi-Z-character constructions to have a wrong word length. - Extended ncurses interface to handle scrolling on the input line. - Once input of a new line is finished, it is erase and then output again using the interface's output_utf8 function. This allows output which is longer than a single line to be word-wrapped. - Implemented correct delete and insert in the ncurses interface. Version 0.3.0 -- November 10, 2006 - (13302 lines in *.h and *.c files) - Abandoned the concept to pack absolutely everything in UTF8f. Having to think though the fork-8f is simply more complicated than necessary. In the name of "Keep it simple, stupid" I'll revert to my old idea of having a function in the interface for every output function like color setting, changing font style and so on. - Removed wordwrapper, pager, decoder, utf8conv, fork8f and fpipe. Reverted the system to the plain-style-C interface. I'll use the break in the development chain to clean up the code and take a second look at most things which has proven quite benefical in similar occasions. - Cleaned up most of the code. I've now got a clean, simple version without any real interface around running again. Better yet, since my last tries with ncursesw I've finally found out how to reliably produce UTF-8 output: By simply calling the setlocale function from #include and setting LC_ALL to "". Once the system locale is now set to something using UTF-8, ncurses delivers correct output. - Implemented a new, much simpler wordwrapper that should now also wrap UTF-8 correctly. - Fixed quetzal saving. The main FORM chunk has now the correct length so that both frotz and Zoom now correctly load savegame files. - Implemented a whole new wordwrapper. This one correctly wraps UTF-8 and is capable of storing "metadata" -- colors and styles -- into the text. This allows color and style changes in the middle of a word without having to flush buffers. - Implemented colors. - Implemented text style. - The etude.z5-test is running again. So far I've got everything working except the character output. - Implemented v3 window handling. - The random.z5 test is now running okay. - Implemented [More] prompt. Version 0.2.1 - Improved command line parameter handling. - Fixed a REAL nasty bug in the line-history resulting in buffer overflows in very rare cases. - Fixed another minor bug that would let the word wrapper start a new line after input with a space (Wishbringer's "read message and move leaves") by added the wordwrap_reset_wrapper method (which correctly reset the number of consecutive spaces). - Fixed a bug that would cause a crash when games were saved in a restarted game (forgotten store_empty_stack_frame). - (Successfully completed Wishbringer -- 96/100 points, one wish used. I just have to find a way to unlock the chains down in the tower...) - Fixed paging module, long lines causing wrap-arounds are now correctly accounted for. Modified the module to keep one more line than required on the screen to ease continued reading. - Tested compatibility to Zork I, Z-Machine version 1, release 2, serial number AS000C. This version appears to have a bug at $585b. It occurs when the command "open mailbox and read leaflet" is executed right at the beginning. To circumvent this, a skip-underflow-check can be enabled in variable.c. - I've posted a related newsgroup-message at http://groups.google.de/group/rec.arts.int-fiction/browse_frm/thread/c77652b28be69f2d/a52b9f652fc75928#a52b9f652fc75928 - Added the "@info" command. - Added automatic detection of "problem" games. This way, the "AS000C" hack is automatically activated at start-up. - Activated hacks are displayed using the "@info" command. - (0.20.1 finished) - Enchanhed the pipe/filter system. Each filter will now receive the destination function (and "object-struct") directly. Thus, no more extra forwarding functions are required. - Rebulid the windowing system in the curses interface. - No more flushes are sent from the fizmo "core" any longer. The interface will flush it's filters by itself if required (sending a flush into the first filter in case input is required or the interface is closed). - ABSOLUTELY FASCINATING to discover how many can bugs can still reside in a program just to creep up occassionally ... or is that just a sign of a bad programming style? Now I begin to grasp even more the significance of Java's Array-out-of-bounds-exception. I found a bug in the utf8x-buffer (forgot a multiplation by factor 3, resulting in a much too small buffer. I must have had a lot of overflows without ever noticing them in the past). Found another bug in the UTF8x-Converter where I simply referenced the wrong variable. - Fixed a forgotton "converter->utf8f_parameter_bytes_to_copy = 0" in utf8conv.c which SOMETIMES (grrr!) caused an error which caused the screen output to vanish. - Reorganized piping in the curses interface. Every window now has its own combination of wordwrapper, converter, pager and decoder. General window commands like split_window or erase_window are caught by a enhanced type of decoder named fork8f and passed along to the correct window structure. The random.z5 seems to work fine and I hope it's sufficiently correct to finally try my luck with Seastalker. - (0.20.2 finished) - Fixed status line display. - Fixed ncurses color recycling. Version 0.2.0 -- April 15, 2006 - (12794 lines in *.h and *.c files) - Version 0.2.0 adds an unix interface, allowing for timed intput, and an [n]curses interface including color, better wordwrapping and accented characters. Zinc now runs random.z5 and passes all of the etude tests. I completed Moonmist without encountering any strange behaviour. - Put the conversion of UTF-8 to [ASCII|ISO-8859-1|UTF-8] in utf8conv.[c|h]. That way, c_if.c is now down to a minimum size, and all it's "outsourced" functions -- wordwrapping and UTF-8-conversion -- can now be used without any problems by other functions or interfaces. - Cleaned up Makefile. - Implemented call_vs2 and call_vn2 opcodes. - Made PRINT_NUM output signed instead of unsigned numbers (found it thanks to etude.z5). - Corrected OPCODE_MOD to correctly handle signed operand 0 values (etude again). - Corrected a REAL nasty mistake: Replaced sizeof() in a utf8conv.c malloc-call with a simple . This made the system crash under OS X PPC (though not on linux and some other unix-variant). - Re-organised the makefile a bit. Interface dependencies are now correctly resolved and build dependencies are in order again. - Renamed the interpreter from the project name "zint" -- meaning Z-Machine-Interpreter -- to "ZInC", meaning Z-INterpreter-Code. - Corrected the Makefile again. - Implemented the Unix-Interface. This one assumes that it's running on a unix machine terminal without any specials (not even curses). It uses select and tc[g|s]etattr to implement timed and preloaded input and a get_char implementation. - Fixed a bug in unix_if.c that would cause a segfault on startup. - Some more i18n, cleaner tc[g|s]etattr in unix_if.c - Implmented correct input line restoration after timed-input output. - Modified text.c so that the streams_echo_input command is executed no matter whether the first word could be found in the vocabluary or not. - Implemented preloaded input in the Unix-Interface. - Implemented correct READ_CHAR in Unix-Interface. - Fixed a LOT of tiny bugs and itches. - Implemented [MORE] paging via additional pager module. - Fixed german translation of i18n messages. - Fixed ZSCII-to-UTF8 encoding, ZInC now passes etude's accented character test. - Implemented a curses interface. At the moment raw constructs for the upper and lower window and a status line. Basic color management. Adapted wordwrap.c a little bit in order to achieve corrent linebreaks. - Completely re-wrote wordwrapping in order to get rid of trailing spaces and other problems evident when using curses. - Completely re-wrote the entire output stream system. It turned out that the usage of flags caused problems buffering text: In order for everything to work correctly the flags would have to be buffered along with the text output. Text-relevant formatting data like color is now passed directly along with the UTF-8 text: Internally I'm now using an encoding that can encode special formatting sequences into the UTF-8 stream -- see UTF8X.txt for more information. These conversions added the utf8x.* and decoder.* files. Although quite a major change, the encoding helps to make the whole system a lot cleaner. - Numerous fixes to the [n]curses interface, addition of status line, better color management with careful consideration of availiable color pairs. - Using the ncurses interface, the interpreter now passes the etude.z5 test with the exception of the text styles and undo capability. - Modified the i18n_translate_and_exit and close_streams functions to support a message-on-exit. This way, error messages are supported without regard for what's left in the UTF8x output pipe and error output can be seperated from the other valid stream output. This way, the ncurses interface can correctly endwin() and output the message to read on stderr. - So far, multiple invocations of READ or READ_CHAR with timed input casued a "nested timed input not availiable" error. This is a problem for the random.z5 test which appears to use this feature. The nested behaviour has been altered to an overwrite behaviour. In case a second timed input is requested, the old timer and routine are erased from memory and replaced with the new data. - Fixed interface commandline choice. - The random.z5 tests now apperas to run correctly. - Fixed a tiny bug in wordwrapping directly after read_line, fixed command line parsing, i18n-string-length and a few tiny localization issues. - Added text styles to the curses interface. - Finally added modifiable names for game saving and restoring. - (Successfully completed the red storyline of Moonmist). - Renamed ZinC (name already exists) to fizmo: Fizmo Interprets Z-Machine Opcodes. Version 0.1.4 -- December 9, 2005 - (8848 lines in *.h and *.c files) - The 0.1.4 complies to the strictz.z5 test, allows transcripting (even on startup via command line switch). A few minor bugs were fixed and a history of the last output is kept, allowing for a faithfully original prompt after an interpreter command has been finished. - Compacted locate_dictionary_entry (so that the zscii_string_length function is no longer needed) and adapted it to version 4+ files. - Implemented the object-number-unequal-zero-checks (in order to run strict.z5). - Adapted read opcode to version 4+. - Renamed c_iface.c to c_if.c in order to gain more space for other interface names. - Fixed zchar_to_utf_8 so that multibyte-characters are handeled correctly between two zchar_to_utf_8 function calls (when continuing on the first call's source string due to output buffer shortage). - Implemented basic transcipting in streams.c and moved the trace functions there. All output is now channeled from text.c through stream.c into the active interface. The input is seperately written to to the streams, in order to be able to distinguish it from regular output (and to write it only to the streams requested). - Implemented "-s" / "--start-script" startup option to start scripting right away. This allows to capture really all input emitted by the game. - Implemented input of file name (supplying a default filename) for transcripts. - Fixed a bug in the parsed word position which would cause the following garbeled Moonmist-output: - Implemented CALL_VN opcode. - Added STRICT_Z definition in config.h and implemented a lot of checks in object.c together with a warning mechanism in i18n.c in order to make this interpreter compliant to strictz.z5. - Fixed a bug in the length-code-size determination in properties.c (replaced "& 80" with "& 0x80"). - Added a lot of STRICT_Z tests to properties.c. - Implemented READ_CHAR opcode (not very well, since in stanard C without any Operating-System-specific calls there's no single read of a char, thus you still have to press enter). - Zinc now passes the strictz.z5 test and looks close enough to the frotz output stored at http://www.ifarchive.org/if-archive/infocom/interpreters/old/frotz/frotz_zstrict_result (with other warning messages, of course). - Implemented wordwrapping as a seperate re-usable module in wordwrap.[c|h]. The C-interface and the function for output to stream 2 currently use it both. - Implemented line_history_buffer, a circular buffer that will record the last output sent to the streams. It's supposed to be used for reconstruction of the current prompt in case an interpreter command is entered an the original prompt should be restored after executing it and later for easier handling of preloaded input. - Interpreter commands will now prompt with the last line that was output by the Z-program after finishing command processing. Version 0.1.3 -- November 27, 2005 - (6013 lines in *.h and *.c files) - This 0.1.3 version adds localization for error- and startup messages, corrects a few minor bugs abd adds UTF-8 support. - Made mod (remainder-after-divison) signed (due to 2.2.1). - Corrected opcode_div so that the divisor, not the dividend, is verified not to be 0. Added divisor-not-0-check to mod. - A few paranoid sanity checks in opcode_read. - Modified opcode_read so that the whole line of input is always read, no matter how much can actually be stored so that the next line of input does not begin with left-over-text. The non-used input is discarded. - Removed use of input_to_zscii-function in text.c, since the input does not have to be converted. - Extended store_ZSCII_as_zchar in text.c to accept not only characters in the current alphabet, but also to encode other chars as multi-z-chars, thus also allowing the '@' as input which I want to use to identify interpreter commands. - Implemented the "@predictable" command to switch interpreter in or out of predicatable random mode as suggested in the spec. - Made random generator more spec conforming by using negative values to seed the generator to this value. - Implemented parsing of command line options. Currently only used to start up interpreter in predictable random mode. - Implemented UTF-8 handling. The data traffic between the core interpreter and the interface(s) has been modified to use exclusively UTF-8. It is now also possible to output a whole string via the utf_8_output function. - The C interface can now be put in three output modes -- ASCII, ISO-8859-1 and UTF-8. Characters that cannot be printed in the ASCII and ISO-8859-1 modes are substituted by a '?'. - Implemented UTF-8 output as defined by the Z-Machine specification v1. So far only implemented without testing. - Implemented loclization. In order to avoid special cases in which it is not possible to tell the user that the localized files cannot be loaded since the files have not been loaded yet in his own language :-) I'm using the prepi18n binary to convert the locales/xx_XX.txt into the file locales.c which can be directly complied into the interpreter binary. - The localization files are supposed to be encoded in UTF-8 so they can be easily output using the usual interface functions. - Split the activate_interface function into activate_interface and link_active_interface_to_story. The first call actually initializes the interface which is used to make output possible (in case the story file can't be loaded), the second call performs the necessary initializations with the story file's header. - Extended localization to use parameters the like "Could not open \{0}.". - So far, parameters are only allowed to contain ASCII values. - Moved last remaining function in output.c, read_zscii_string, into text.c. - Implemented forgotten lowering of case after reading input from the keyboard. Now it's possible to answer "YES" to Moonmist when it asks for "YES or NO". - Cleaned up stack.c a bit and fixed a bug that would have caused the stack not to enlarge in case it was supposed to. - Extended localization to use type identifiers. In the beginning I decided to skip them, but to make error messages useful to the user and handier in the code I decided to give it a shot. Parameters are now specified by using \{0s} for a string and \{0d} for a decimal. Together with a few supporting wrapper functions, the main file already looks much cleaner. Due to the buffering of the Z-Machine output, messages are even correctly word-wrapped. - Implemented switching between ASCII / ISO-8859-1 / UTF-8 into zinc.c. - Logically it would have been better to put it in to c_iface, but since it will be required more often and don't want any copied code I decided to leave it this way. - Implemented echo option in the C interface in order to be able to read the input from input piped into the interpreter. - Converted all current 51 conditions-to-translate from FATAL_ERROR and [s|f|]printf to i18n_translate[and_exit]. The FATAL_ERROR macro has been removed. - Compacted the zchar-storage-functions. - Completely replaced read_zscii_string with zscii_to_utf_8. The new functions will output z-char-strings of an arbitrary length into an limited-size output buffer. Multiple calls to this function for the same source string will continue with the output where the last call of the functions had to stop. Version 0.1.2 -- October 20, 2005 - (5094 lines) - 0.1.2 fixes my currently last known problems with playing the 840726 Zork I revision. Word wrapping makes it look a little bit nicer and the barebones-C-interface is now probably as good as it can get. Did quite a lot of code-cleanup. - Implemented NOT opcode. - Implemented NOP opcode. - Implemented RESTART opcode. - Implemented POP opcode. - Implemented SHOW_STATUS opcode. - Allowed output of tab -- ZSCII 9 -- for version 3 (due to the guidebook in the Dam Lobby). - Implemented VERIFY opcode. - Implemented PIRACY opcode (we're all honest, so an evaluate_branch(1) sounds okay, right?). - Fixed a bug in INC_CHK (wrong cast to unsigned value instead of signed). - Totally forgot about the 8.3-filename-limits on DOS machines, files were renamed and merged together -- /(.*)_opcodes.c/ joined /$1.c/. - Fixed a bug in the random opcode which allowed 0 as a minimum result value to the random call (should have been 1). Fighting with the thief now results in much less garbled text output. - Cleanly wrapped TRACE_LOG calls in curly braces, meaning disabling tracing now works correctly. The zinc binary now has a size of 82308 bytes with logging enabled, and 54700 bytes without logging. - Created Makfile-dependency for zinc.h from iface.h (by using the touch command, is the okay?). Made all and clean .PHONY targets. - Removed globals.c, moved globals into zinc.c and created "extern" references in other source files. - Moved globals to corresponding source files (which eliminates a lot of non-needed "extern" references). - The linux manpages tell me bzero is outdated. Faithfully replaced bzero with memset calls. - Replaced memcpy call with a loop that assembles uint16_t values byte by byte. This will avoid problems on little-endian machines (i386 and the like), since the Z-machine uses a big-endian model. - Used the Mersenne Twister as random generator. Only the genrand_int32 function is used, the rest of the functions, with exception of the two init calls, were deleted from the mt19937ar.c file. The generator is seeded by an init vector consisting of the number of seconds since 1970, a standard C random generator number, the number of milliseconds since 1970, followed by another standard C random generator number. - Splitted zinc.h in a header file for each .c file. Adjusted Makefile and #includes accordingly. - Changed **z_opcode_procedures into *z_opcode_functions and moved it from zinc.c to zpu.c (thus avoiding external reference and setup). Now z_opcode_functions is a one-dimenstional array indexed by the value instruction_form + instr_code. This allows saving the space for 32 pointers in the smaller opcode classes (with only 16 instead of 32 opcodes). - Implemented buffering / word-wrapping in the C Interface. With this change, the C interface should be complete. Comparing to everything else it's still very raw, but hey, it works. - Implemented BUFFER_MODE opcode. - Moved all the configuration options from zinc.h to config.h. Version 0.1.1 -- September 23, 2005 - 0.1.1 was the first version that was able to save and restore games. - Implemented OR opcode. - Implemented MOD opcode. - Changed get_prop_len so that get_prop_len(0) returns 0 (for 1.1 standard). - Updated property.c, splitted up property search in three functions in order to allow easier implementation of the GET_NEXT_PROP opcode. - Implemented GET_NEXT_PROP (you can now pick up the elven sword). - Implemented CALL_2S. - Implemented CALL_2N. - Implemented SET_COLOUR (but does not have no effect in c_interface). - Implemented all remaining 2OP-opcodes with the exception of THROW. - Implemented DEC opcode. - Implemented PRINT_ADDR opcode. - Implemented CALL_1S opcode. - Implemented REMOVE_OBJ opcode. - Implemented LOAD opcode. - Modified the tokenising routine to correctly return position and length of a word even if it was not found in the dictionary. - Implemented dummy stack frame storage for quetzal compatibility. - Implemented SAVE opcode. - Implemented RESTORE opcode. Version 0.1.0 -- September 14, 2005 - 0.1.0 is the first version that allows basic playing of version 3 games. The only game used for testing so far is Zork 1 which was drawn from the well-known site of Peter Scheyen. - Moving around the house, object movement (taking and dropping of the leaflet) all seems to work quite okay now. - Implementing more missing opcodes. - Fixing a few not-so-easy to find bugs (like the property addresses etc). - Fixed a bug in the branch-address calculation. - Fixed a bug in the object-unlinking mechanism that would not correctly remove the object-to-be-unlinked from an object further up the sibling line. Version 0.0.4 - Implemented the c_interface, which allows very bare-bone input / output provided by standard C facilities (meaning fprintf / fgets). - Implementing of user input, tokenising and dictionary parsing. Version 0.0.3 - Major cleanup of the code. - distribution of the old interpreter.c file into multiple .c files. - First appearance of the interpreter.h interface. Version 0.0.2 - Further implementation of the basic capabilities, including property management etc. Version 0.0.1 - First basic implementation of memory, variables, stack and primary opcodes. libfizmo-0.7.15/depcomp0000755000175000017500000005601713153330676015162 0ustar chrenderchrender#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2016-01-11.22; # UTC # Copyright (C) 1999-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## 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). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - 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 -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # 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. ## 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. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -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 -ne 0; then 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 ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # 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 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # 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 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: libfizmo-0.7.15/config-libs.m40000644000175000017500000000311613153330674016231 0ustar chrenderchrender AS_IF([test "x$enable_babel" != "xno"], [ PKG_CHECK_MODULES( [libxml2], [libxml-2.0], [libfizmo_reqs="libxml-2.0"], [for dir in $with_libxml2_includedir /usr/include/libxml2 /usr/local/include/libxml2 /opt/local/include/libxml2 ; do AC_MSG_CHECKING(for libxml/tree.h in $dir) if [ test -e $dir/libxml/tree.h ]; then AC_MSG_RESULT(yes) libxml2_h_dir=$dir break else AC_MSG_RESULT(no) fi done if [ test "x$libxml2_h_dir" == "x"] ; then echo "Could not find libxml/tree.h." echo "Try setting the location using --with-libxml2-includedir." exit fi libxml2_nonpkg_cflags+="-I$libxml2_h_dir" libxml2_CFLAGS="-I$libxml2_h_dir" CFLAGS_SAVED=$CFLAGS LIBS_SAVED=$LIBS LDFLAGS_SAVED=$LDFLAGS LIBS="-lxml2" CFLAGS="-I$libxml2_h_dir" for dir in $with_libxml2_libdir /usr/lib /usr/local/lib /opt/local/lib ; do AC_MSG_CHECKING(for libxml2 in $dir) LDFLAGS="-L$dir" AC_TRY_LINK( [#include ], [xmlDocPtr doc; doc = xmlNewDoc("1.0");], [AC_MSG_RESULT(yes) libxml2_l_dir=$dir break], [AC_MSG_RESULT(no)]) done if [ test "x$libxml2_l_dir" == "x"] ; then echo "Could not find libxml2." echo "Try setting the location using --with-libxml2-libdir." exit fi LIBS=$LIBS_SAVED LDFLAGS=$LDFLAGS_SAVED CFLAGS=$CFLAGS_SAVED libxml2_nonpkg_libs="-L$libxml2_l_dir -lxml2" libxml2_LIBS="-L$libxml2_l_dir -lxml2" ]) ]) libfizmo-0.7.15/Makefile.in0000644000175000017500000007546213153330676015657 0ustar chrenderchrender# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # Makefile.am # # This file is part of fizmo. # # Copyright (c) 2009-2017 Christoph Ender. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config-flags.m4 \ $(top_srcdir)/config-libs.m4 $(top_srcdir)/config-conds.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libfizmo_a_AR = $(AR) $(ARFLAGS) libfizmo_a_LIBADD = libfizmo_a_SOURCES = libfizmo.c libfizmo_a_OBJECTS = libfizmo.$(OBJEXT) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = libfizmo.c DIST_SOURCES = libfizmo.c RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in ar-lib compile depcomp \ install-sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBFIZMO_REQS = @LIBFIZMO_REQS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBXML2_NONPKG_CFLAGS = @LIBXML2_NONPKG_CFLAGS@ LIBXML2_NONPKG_LIBS = @LIBXML2_NONPKG_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_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ 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@ libxml2_CFLAGS = @libxml2_CFLAGS@ libxml2_LIBS = @libxml2_LIBS@ localedir = $(datarootdir)/fizmo/locales localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ AUTOMAKE_OPTIONS = -Wno-override tmplibdir = libfizmotmp @FIZMO_DIST_BUILD_FALSE@dev_prefix = $(DESTDIR)/$(prefix) @FIZMO_DIST_BUILD_TRUE@dev_prefix = $(FIZMO_DIST_BUILD_PREFIX) @FIZMO_DIST_BUILD_FALSE@pkg_prefix = $(prefix) @FIZMO_DIST_BUILD_TRUE@pkg_prefix = $(FIZMO_DIST_BUILD_PREFIX) fizmo_build_prefix = $(dev_prefix) pkg_dir = $(dev_prefix)/lib/pkgconfig pkgfile = $(pkg_dir)/libfizmo.pc SUBDIRS = src/tools src/interpreter . noinst_LIBRARIES = libfizmo.a all: all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign 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) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfizmo.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` # 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_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: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(LIBRARIES) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-noinstLIBRARIES 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-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -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: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-noinstLIBRARIES cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am .PRECIOUS: Makefile # Object files are stored in pre-defined order into the static library in # order to make the build reproducible for Debian's ReproducibleBuilds # project, see https://wiki.debian.org/ReproducibleBuilds # Patch provided by Sascha Steinbiss . libfizmo.a:: cd src/tools ; make cd src/interpreter ; make mkdir -p "$(tmplibdir)" ; \ cd "$(tmplibdir)" ; \ "$(AR)" x ../src/tools/libtools.a ; \ "$(AR)" x ../src/interpreter/libinterpreter.a ; \ find . -name '*.o' -print0 | LC_ALL=C sort -z | xargs -0 "$(AR)" $(ARFLAGS) ../libfizmo.a ; \ "$(RANLIB)" ../libfizmo.a ; \ cd .. ; \ rm -r "$(tmplibdir)" install-dev:: libfizmo.a mkdir -p "$(dev_prefix)/lib/fizmo" cp libfizmo.a "$(dev_prefix)/lib/fizmo" mkdir -p "$(dev_prefix)/include/fizmo/interpreter" cp src/interpreter/*.h \ "$(dev_prefix)/include/fizmo/interpreter" mkdir -p "$(dev_prefix)/include/fizmo/tools" cp src/tools/*.h "$(dev_prefix)/include/fizmo/tools" mkdir -p "$(dev_prefix)/include/fizmo/screen_interface" cp src/screen_interface/*.h \ "$(dev_prefix)/include/fizmo/screen_interface" cp src/screen_interface/*.cpp \ "$(dev_prefix)/include/fizmo/screen_interface" cp -r src/sound_interface "$(dev_prefix)/include/fizmo/" cp -r src/filesys_interface "$(dev_prefix)/include/fizmo/" cp -r src/blorb_interface "$(dev_prefix)/include/fizmo/" mkdir -p "$(pkg_dir)" echo 'prefix=$(pkg_prefix)' >"$(pkgfile)" echo 'exec_prefix=$${prefix}' >>"$(pkgfile)" echo 'libdir=$${exec_prefix}/lib/fizmo' >>"$(pkgfile)" echo 'includedir=$${prefix}/include/fizmo' >>"$(pkgfile)" echo >>"$(pkgfile)" echo 'Name: libfizmo' >>"$(pkgfile)" echo 'Description: libfizmo' >>"$(pkgfile)" echo 'Version: 0.7.15' >>"$(pkgfile)" echo "Requires: $(LIBFIZMO_REQS)" >>"$(pkgfile)" echo 'Requires.private:' >>"$(pkgfile)" echo 'Cflags: -I$(pkg_prefix)/include/fizmo' >>"$(pkgfile)" echo 'Libs: -L$(pkg_prefix)/lib/fizmo -lfizmo $(LIBXML2_NONPKG_LIBS) -lm' >>"$(pkgfile)" echo 'Libs.private:' >>"$(pkgfile)" echo >>"$(pkgfile)" install-data-local:: mkdir -p "$(DESTDIR)$(localedir)" for l in `cd src/locales ; ls -d ??_??`; \ do \ mkdir -p "$(DESTDIR)$(localedir)/$$l" ; \ cp src/locales/$$l/*.txt "$(DESTDIR)$(localedir)/$$l" ; \ done # About "-rmdir": make ignores errors of commands which are prefixed with # a - sign. rmdir may fail in clean-dev in case other libs have installed # development files, or in case clean-dev has been run before. clean-dev:: -rm "$(dev_prefix)/lib/fizmo/libfizmo.a" -rmdir "$(dev_prefix)/lib/fizmo" rm -rf "$(dev_prefix)/include/fizmo/interpreter" rm -rf "$(dev_prefix)/include/fizmo/tools" rm -rf "$(dev_prefix)/include/fizmo/sound_interface" rm -rf "$(dev_prefix)/include/fizmo/filesys_interface" rm -rf "$(dev_prefix)/include/fizmo/blorb_interface" -rm "$(dev_prefix)/include/fizmo/screen_interface/ScreenInterface.cpp" -rm "$(dev_prefix)/include/fizmo/screen_interface/ScreenInterface.h" -rm "$(dev_prefix)/include/fizmo/screen_interface/screen_interface.h" -rmdir "$(dev_prefix)/include/fizmo/screen_interface" -rmdir "$(dev_prefix)/include/fizmo" -rm "$(pkgfile)" # 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: libfizmo-0.7.15/src/0000755000175000017500000000000013153330674014361 5ustar chrenderchrenderlibfizmo-0.7.15/src/interpreter/0000755000175000017500000000000013153330676016726 5ustar chrenderchrenderlibfizmo-0.7.15/src/interpreter/blockbuf.c0000644000175000017500000002002613153330674020657 0ustar chrenderchrender /* blockbuf.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef blockbuf_c_INCLUDED #define blockbuf_c_INCLUDED #include #include #include "blockbuf.h" #include "fizmo.h" #include "../tools/types.h" #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "../tools/z_ucs.h" BLOCKBUF *create_blockbuffer(z_style default_style, z_font default_font, z_colour default_foreground_colour, z_colour default_background_colour) { BLOCKBUF *result; TRACE_LOG("New blockbuffer, foreground:%d, background: %d.\n", default_foreground_colour, default_background_colour); result = (BLOCKBUF*)fizmo_malloc(sizeof(BLOCKBUF)); result->width = 0; result->height = 0; result->xpos = 0; result->ypos = 0; result->content = NULL; result->default_style = default_style; result->default_font = default_font; result->default_foreground_colour = default_foreground_colour; result->default_background_colour = default_background_colour; result->current_style = default_style; result->current_font = default_font; result->current_foreground_colour = default_foreground_colour; result->current_background_colour = default_background_colour; return result; } void destroy_blockbuffer(BLOCKBUF *blockbuffer) { if (blockbuffer->content != NULL) free(blockbuffer->content); free(blockbuffer); } void store_z_ucs_output_in_blockbuffer(BLOCKBUF *buffer, z_ucs *z_ucs_output) { struct blockbuf_char *ptr = buffer->content + (buffer->ypos * buffer->width) + buffer->xpos; TRACE_LOG("Writing to blockbuffer at %d/%d: \"", buffer->xpos, buffer->ypos); TRACE_LOG_Z_UCS(z_ucs_output); TRACE_LOG("\"\n"); while (*z_ucs_output != 0) { if (*z_ucs_output == Z_UCS_NEWLINE) { buffer->xpos = 0; if (buffer->ypos < buffer->height - 1) { buffer->ypos++; } ptr = buffer->content + (buffer->ypos * buffer->width) + buffer->xpos; } else { if (buffer->xpos >= buffer->width) { TRACE_LOG("Terminating blockbuffer output prematurely at x:%d.\n", buffer->xpos); break; } ptr->character = *z_ucs_output; ptr->font = buffer->current_font; ptr->style = buffer->current_style; ptr->foreground_colour = buffer->current_foreground_colour; ptr->background_colour = buffer->current_background_colour; ptr++; buffer->xpos++; } z_ucs_output++; } } void set_blockbuf_cursor(BLOCKBUF *buffer, int x, int y) { TRACE_LOG("Set blockbuffer-cursor to x:%d, y:%d.\n", x, y); if (x < 0) buffer->xpos = 0; else if (x < buffer->width) buffer->xpos = x; else buffer->xpos = buffer->width - 1; if (y < 0) buffer->ypos = 0; else if (y < buffer->height) buffer->ypos = y; else buffer->ypos = buffer->height - 1; } void set_blockbuf_style(BLOCKBUF *buffer, z_style style) { TRACE_LOG("Set blockbuffer-style to %d.\n", style); buffer->current_style = style; } void set_blockbuf_foreground_colour(BLOCKBUF *buffer, z_colour new_colour) { TRACE_LOG("Set blockbuffer-foreground-colour to %d.\n", new_colour); buffer->current_foreground_colour = new_colour; } void set_blockbuf_background_colour(BLOCKBUF *buffer, z_colour new_colour) { TRACE_LOG("Set blockbuffer-background-colour to %d.\n", new_colour); buffer->current_background_colour = new_colour; } void set_blockbuf_font(BLOCKBUF *buffer, z_font font) { TRACE_LOG("Set blockbuffer-font to %d.\n", font); buffer->current_font= font; } // The buffer will only enlarge itself, but never shrink. This is due to // the fact that many older games are not designed for resizes, and will // keep printing into the old sized lines. If we only enlarge the buffer // we'll make sure we don't lose anything, and restoring the screen by // making the window larger will allow the user to see text the game has // just printed. void blockbuf_resize(BLOCKBUF *buffer, int new_width, int new_height) { int x,y; size_t new_buffer_size; struct blockbuf_char *ptr; if (new_width < buffer->width) { new_width = buffer->width; } if (new_height < buffer->height) { new_height = buffer->height; } if ((new_width == buffer->width) && (new_height == buffer->height)) { return; } new_buffer_size = sizeof(struct blockbuf_char) * new_width * new_height; TRACE_LOG("Resizing blockbuffer to %d*%d (%zd bytes).\n", new_width, new_height, new_buffer_size); buffer->content = (struct blockbuf_char*)fizmo_realloc( buffer->content, new_buffer_size); // Realign existing lines. if (buffer->width < new_width) { for (y=buffer->height-1; y>=0; y--) { TRACE_LOG("Copying %ld bytes from %p to %p (line %d/%d/%d).\n", sizeof(struct blockbuf_char) * (buffer->width), buffer->content + (y * buffer->width), buffer->content + (y * new_width), y, buffer->width, new_width); memmove( buffer->content + (y * new_width), buffer->content + (y * buffer->width), sizeof(struct blockbuf_char) * (buffer->width)); ptr = buffer->content + (y * new_width) + buffer->width; for (x=buffer->width; xcharacter = Z_UCS_SPACE; ptr->foreground_colour = buffer->default_foreground_colour; ptr->background_colour = buffer->default_background_colour; ptr->style = buffer->default_style; ptr->font = buffer->default_font; ptr++; } } } // Fill new lower lines if buffer got larger. ptr = buffer->content + (new_width * buffer->height); for (y=buffer->height; ycharacter = Z_UCS_SPACE; ptr->foreground_colour = buffer->default_foreground_colour; ptr->background_colour = buffer->default_background_colour; ptr->style = buffer->default_style; ptr->font = buffer->default_font; ptr++; } } if (new_width > buffer->width) { buffer->width = new_width; } if (new_height > buffer->height) { buffer->height = new_height; } TRACE_LOG("New blockbuffer dimensions: %d * %d.\n", buffer->width, buffer->height); } size_t count_allocated_blockbuf_memory(BLOCKBUF *buffer) { return sizeof(BLOCKBUF) + sizeof(struct blockbuf_char) * buffer->height * buffer->width; } #endif // blockbuf_c_INCLUDED libfizmo-0.7.15/src/interpreter/debugger.c0000644000175000017500000002257613153330674020670 0ustar chrenderchrender /* debugger.c * * This file is part of fizmo. * * Copyright (c) 2011-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef debugger_c_INCLUDED #define debugger_c_INCLUDED #define DEBUGGER_INPUT_BUFFER_SIZE 1024 #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../tools/tracelog.h" #include "../tools/list.h" #include "debugger.h" #include "zpu.h" #include "streams.h" #include "text.h" #include "fizmo.h" #include "variable.h" #include "config.h" #include "stack.h" #define BUFFER_SIZE 256 // Must not be set below 256. // Pure PCs are saved until the story is available, meaning until the // function "debugger_story_has_been_loaded" has been called. From then on, // breakspoints are stored as pointers relative to z_mem in order to // speed up searching. list *pcs = NULL; list *breakpoints = NULL; bool story_has_been_loaded = false; int sockfd; struct sockaddr_in serv_addr; int newsockfd = -1; struct sockaddr_in cli_addr; socklen_t clilen; char buffer[BUFFER_SIZE]; static void debugger_output(int socked_fd, char *text) { write(socked_fd, text, strlen(text)); } void add_breakpoint(uint32_t breakpoint_pc) { static uint32_t *new_element; if (story_has_been_loaded == false) { if (pcs == NULL) pcs = create_list(); new_element = malloc(sizeof(uint32_t)); *new_element = breakpoint_pc; add_list_element(pcs, new_element); } else { if (breakpoints == NULL) breakpoints = create_list(); add_list_element(breakpoints, z_mem + breakpoint_pc); } } void debugger_story_has_been_loaded() { size_t index, len; uint32_t *element; char prefix_string[] = { FIZMO_COMMAND_PREFIX, 0 }; int flags; //add_breakpoint(0x200d0); story_has_been_loaded = true; if (pcs != NULL) { len = get_list_size(pcs); breakpoints = create_list(); for (index=0; index= 0) break; if (errno != EINTR) { perror("accept"); exit(-1); } } flags = fcntl(newsockfd, F_GETFL, 0); fcntl(newsockfd, F_SETFL, flags | O_NONBLOCK); debugger_output(newsockfd, "\nFizmo debugger, libfizmo version "); debugger_output(newsockfd, LIBFIZMO_VERSION); debugger_output(newsockfd, ".\n"); debugger_output(newsockfd, "Enter \""); debugger_output(newsockfd, prefix_string); debugger_output(newsockfd, "debug\" as story input to start debugging.\n\n"); } void do_breakpoint_actions() { if (breakpoints == NULL) return; if (list_contains_element(breakpoints, pc) == false) return; //debugger_output("\nReached breakpoint.\n"); debugger(); } void debugger() { int n, i; fd_set input_set; uint8_t dbg_z_instr; uint8_t dbg_z_instr_form; uint8_t dbg_number_of_operands; uint8_t *dbg_pc = pc; debugger_output(newsockfd, "\nEntering debugger.\n"); for(;;) { parse_opcode( &dbg_z_instr, &dbg_z_instr_form, &dbg_number_of_operands, &dbg_pc); sprintf(buffer, "\n: %6lx: %d %d %d\n", (long)(pc - z_mem), dbg_z_instr, dbg_z_instr_form, dbg_number_of_operands); debugger_output(newsockfd, buffer); for (i=0; i 2) buffer[n-2]=0; else *buffer = 0; debugger_output(newsockfd, "\n"); if ( (strcmp(buffer, "exit") == 0) || (strcmp(buffer, "quit") == 0) ) { break; } else if (strcmp(buffer, "help") == 0) { debugger_output(newsockfd, "Valid commands:\n"); debugger_output(newsockfd, " - stack: Dump stack contents.\n"); debugger_output(newsockfd, " - story: Print story file information.\n"); debugger_output(newsockfd, " - exit, quit: Leave debugger.\n"); } else if (strcmp(buffer, "stack") == 0) { i = 0; n = z_stack_index - z_stack; while (i < n) { if ( (i % 8) == 0) { if (i > 0) { debugger_output(newsockfd, "\n"); } sprintf(buffer, "%06x:", i); debugger_output(newsockfd, buffer); } sprintf(buffer, " %04x", z_stack[i]); debugger_output(newsockfd, buffer); i++; } debugger_output(newsockfd, "\n"); } else if (strcmp(buffer, "story") == 0) { sprintf(buffer, "Z-Story version: %d.\n", active_z_story->version); debugger_output(newsockfd, buffer); sprintf(buffer, "Release code: %d.\n", active_z_story->release_code); debugger_output(newsockfd, buffer); sprintf(buffer, "Serial code: %s.\n", active_z_story->serial_code); debugger_output(newsockfd, buffer); sprintf(buffer, "Checksum: %d.\n", active_z_story->checksum); debugger_output(newsockfd, buffer); sprintf(buffer, "Dynamic memory end: $%lx.\n", (long)(active_z_story->dynamic_memory_end - z_mem)); debugger_output(newsockfd, buffer); sprintf(buffer, "Static memory end: $%lx.\n", (long)(active_z_story->static_memory_end - z_mem)); debugger_output(newsockfd, buffer); sprintf(buffer, "High memory: $%lx.\n", (long)(active_z_story->high_memory - z_mem)); debugger_output(newsockfd, buffer); sprintf(buffer, "High memory end: $%lx.\n", (long)(active_z_story->high_memory_end - z_mem)); debugger_output(newsockfd, buffer); } else { debugger_output(newsockfd, "Unknown command \""); debugger_output(newsockfd, buffer); debugger_output(newsockfd, "\".\n"); } } debugger_output(newsockfd, "Leaving debugger.\n"); //close(newsockfd); return; } void debugger_interpreter_stopped() { int nof_elements; uint32_t **elements; int i; close(newsockfd); close(sockfd); if (pcs != NULL) { nof_elements = get_list_size(pcs); elements = (uint32_t**)delete_list_and_get_ptrs(pcs); for (i=0; i #include #include #include "filelist.h" #include "fizmo.h" #include "babel.h" #include "iff.h" #include "config.h" #include "../tools/tracelog.h" #include "../tools/types.h" #include "../tools/unused.h" #include "../tools/filesys.h" static int nof_files_found; static int nof_files_searched; static int nof_directories_searched; static char *serial_input = NULL; static int serial_input_size = 0; static char *title_input = NULL; static int title_input_size = 0; static char *author_input = NULL; static int author_input_size = 0; static char *language_input = NULL; static int language_input_size = 0; static char *description_input = NULL; static int description_input_size = 0; static char *filename_input = NULL; static int filename_input_size = 0; static char *blorbfile_input = NULL; static int blorbfile_input_size = 0; static char *filetype_input = NULL; static int filetype_input_size = 0; static char *unquoted_serial_input = NULL; static char *unquoted_title_input = NULL; static char *unquoted_author_input = NULL; static char *unquoted_language_input = NULL; static char *unquoted_description_input = NULL; static char *unquoted_filename_input = NULL; static char *unquoted_blorbfile_input = NULL; static char *unquoted_filetype_input = NULL; static char filetype_raw[] = "raw"; static char filetype_zblorb[] = "zblorb"; static uint16_t release_input; static long storyfile_timestamp_input; static int length_input; static uint16_t checksum_input; static int version_input; static z_file *in; static bool in_zfile_open = false; static int nof_files_searched; static bool show_progress = false; // 1,268,210 files in 243,656 directories. void new_file_searched(char *filename, char *UNUSED(dirname)) { float percentage; if (filename != NULL) { nof_files_searched++; percentage = ((double)nof_files_searched / (double)nof_files_found) * 100; printf("\rUpdating story-list, scanning %d files, %3.0lf%% done.", nof_files_found, percentage); fflush(stdout); //printf("file:%s\n", filename); } else { nof_directories_searched++; //printf("%s (%d)\n", dirname, nof_directories_searched); } if ( (nof_files_searched != 0) && (nof_files_searched % 100 == 0) ) { //printf("%d files.\n", nof_files); } } void free_unquote_buffers() { if (unquoted_serial_input != NULL) { free(unquoted_serial_input); unquoted_serial_input = NULL; } if (unquoted_title_input != NULL) { free(unquoted_title_input); unquoted_title_input = NULL; } if (unquoted_author_input != NULL) { free(unquoted_author_input); unquoted_author_input = NULL; } if (unquoted_language_input != NULL) { free(unquoted_language_input); unquoted_language_input = NULL; } if (unquoted_description_input != NULL) { free(unquoted_description_input); unquoted_description_input = NULL; } if (unquoted_filename_input != NULL) { free(unquoted_filename_input); unquoted_filename_input = NULL; } if (unquoted_blorbfile_input != NULL) { free(unquoted_blorbfile_input); unquoted_blorbfile_input = NULL; } if (unquoted_filetype_input != NULL) { free(unquoted_filetype_input); unquoted_filetype_input = NULL; } } void abort_entry_input() { if (serial_input != NULL) { free(serial_input); serial_input = NULL; } serial_input_size = 0; if (title_input != NULL) { free(title_input); title_input = NULL; } title_input_size = 0; if (author_input != NULL) { free(author_input); author_input = NULL; } author_input_size = 0; if (language_input != NULL) { free(language_input); language_input = NULL; } language_input_size = 0; if (description_input != NULL) { free(description_input); description_input = NULL; } description_input_size = 0; if (filename_input != NULL) { free(filename_input); filename_input = NULL; } filename_input_size = 0; if (blorbfile_input != NULL) { free(blorbfile_input); blorbfile_input = NULL; } blorbfile_input_size = 0; if (filetype_input != NULL) { free(filetype_input); filetype_input = NULL; } filetype_input_size = 0; free_unquote_buffers(); if (in_zfile_open == true) { fsi->closefile(in); in_zfile_open = false; } } void free_z_story_list_entry(struct z_story_list_entry *entry) { if (entry->serial != NULL) free(entry->serial); if (entry->title != NULL) free(entry->title); if (entry->author != NULL) free(entry->author); if (entry->language != NULL) free(entry->language); if (entry->description != NULL) free(entry->description); if (entry->filename != NULL) free(entry->filename); if (entry->blorbfile != NULL) free(entry->blorbfile); if (entry->filetype != NULL) free(entry->filetype); free(entry); } void free_z_story_list(struct z_story_list *story_list) { if (story_list == NULL) return; while (story_list->nof_entries > 0) { free_z_story_list_entry(story_list->entries[story_list->nof_entries - 1]); story_list->nof_entries--; } free(story_list->entries); free(story_list); } int parse_next_story_entry() { int index; int data; long offset; long size; index = 0; release_input = 0; while (index < 5) { if ((data = fsi->readchar(in)) == EOF) { if (index == 0) break; else { abort_entry_input(); TRACE_LOG("#0\n"); return -1; } } if (data == '\t') break; if (isdigit(data) == 0) { break; } release_input *= 10; release_input += (data - '0'); index++; } if ( (index == 5) && (fsi->readchar(in) != '\t') ) { abort_entry_input(); TRACE_LOG("#1\n"); return -1; } offset = fsi->getfilepos(in); while ((data = fsi->readchar(in)) != '\t') if (data == EOF) { abort_entry_input(); TRACE_LOG("#2\n"); return -1; } size = fsi->getfilepos(in) - offset - 1; if (ensure_mem_size(&serial_input, &serial_input_size, size + 2) == -1) { abort_entry_input(); TRACE_LOG("#3\n"); return -1; } if (size > 0) { fsi->setfilepos(in, -(size+1), SEEK_CUR); if (fsi->readchars(serial_input, size+1, in) != (size_t)size+1) { abort_entry_input(); TRACE_LOG("#4\n"); return -1; } } serial_input[size] = '\0'; unquoted_serial_input = unquote_special_chars(serial_input); index = 0; length_input = 0; do { if ((data = fsi->readchar(in)) == EOF) { abort_entry_input(); TRACE_LOG("#5\n"); return -1; } if (data != '\t') { if (isdigit(data) == 0) { break; } length_input *= 10; length_input += (data - '0'); } } while (data != '\t'); index = 0; checksum_input = 0; while (index < 5) { if ((data = fsi->readchar(in)) == EOF) { abort_entry_input(); TRACE_LOG("#6\n"); return -1; } if (data == '\t') break; if (isdigit(data) == 0) { TRACE_LOG("#7\n"); return -1; } checksum_input *= 10; checksum_input += (data - '0'); index++; } TRACE_LOG("cs:%d\n", checksum_input); if ( (index == 5) && (fsi->readchar(in) != '\t') ) { abort_entry_input(); TRACE_LOG("#8\n"); return -1; } if ((data = fsi->readchar(in)) == EOF) { abort_entry_input(); TRACE_LOG("#9\n"); return -1; } TRACE_LOG("data:%c\n", data); if (isdigit(data) == 0) { abort_entry_input(); TRACE_LOG("#10\n"); return -1; } version_input = data - '0'; TRACE_LOG("versioninput:%c\n", version_input); if (fsi->readchar(in) != '\t') { abort_entry_input(); TRACE_LOG("#11\n"); return -1; } offset = fsi->getfilepos(in); while ((data = fsi->readchar(in)) != '\t') if (data == EOF) { abort_entry_input(); TRACE_LOG("#12\n"); return -1; } size = fsi->getfilepos(in) - offset - 1; if (ensure_mem_size(&title_input, &title_input_size, size + 2) == -1) { abort_entry_input(); TRACE_LOG("#13\n"); return -1; } if (size > 0) { fsi->setfilepos(in, -(size+1), SEEK_CUR); if (fsi->readchars(title_input, size+1, in) != (size_t)size+1) { abort_entry_input(); TRACE_LOG("#14\n"); return -1; } } title_input[size] = '\0'; unquoted_title_input = unquote_special_chars(title_input); //printf("title:[%s]\n", title_input); offset = fsi->getfilepos(in); while ((data = fsi->readchar(in)) != '\t') if (data == EOF) { abort_entry_input(); TRACE_LOG("#15\n"); return -1; } size = fsi->getfilepos(in) - offset - 1; if (ensure_mem_size(&author_input, &author_input_size, size + 2) == -1) { abort_entry_input(); TRACE_LOG("#16\n"); return -1; } if (size > 0) { fsi->setfilepos(in, -(size+1), SEEK_CUR); if (fsi->readchars(author_input, size+1, in) != (size_t)size+1) { abort_entry_input(); TRACE_LOG("#17\n"); return -1; } } author_input[size] = '\0'; unquoted_author_input = unquote_special_chars(author_input); //printf("author:[%s]\n", author_input); offset = fsi->getfilepos(in); while ((data = fsi->readchar(in)) != '\t') if (data == EOF) { abort_entry_input(); TRACE_LOG("#15\n"); return -1; } size = fsi->getfilepos(in) - offset - 1; if (ensure_mem_size(&language_input, &language_input_size, size + 2) == -1) { abort_entry_input(); TRACE_LOG("#16\n"); return -1; } if (size > 0) { fsi->setfilepos(in, -(size+1), SEEK_CUR); if (fsi->readchars(language_input, size+1, in) != (size_t)size+1) { abort_entry_input(); TRACE_LOG("#17\n"); return -1; } } language_input[size] = '\0'; unquoted_language_input = unquote_special_chars(language_input); //printf("language:[%s]\n", language_input); offset = fsi->getfilepos(in); while ((data = fsi->readchar(in)) != '\t') if (data == EOF) { abort_entry_input(); TRACE_LOG("#18\n"); return -1; } size = fsi->getfilepos(in) - offset - 1; if (ensure_mem_size(&description_input, &description_input_size, size+2)==-1) { abort_entry_input(); TRACE_LOG("#19\n"); return -1; } if (size > 0) { fsi->setfilepos(in, -(size+1), SEEK_CUR); if (fsi->readchars(description_input, size+1, in) != (size_t)size+1) { abort_entry_input(); TRACE_LOG("#20\n"); return -1; } } description_input[size] = '\0'; unquoted_description_input = unquote_special_chars(description_input); //printf("desc:[%s]\n", description_input); offset = fsi->getfilepos(in); while ((data = fsi->readchar(in)) != '\t') if (data == EOF) { abort_entry_input(); TRACE_LOG("#21\n"); return -1; } size = fsi->getfilepos(in) - offset - 1; if (ensure_mem_size(&filename_input, &filename_input_size, size + 2) == -1) { abort_entry_input(); TRACE_LOG("#22\n"); return -1; } if (size > 0) { fsi->setfilepos(in, -(size+1), SEEK_CUR); if (fsi->readchars(filename_input, size+1, in) != (size_t)size+1) { abort_entry_input(); TRACE_LOG("#23\n"); return -1; } } filename_input[size] = '\0'; unquoted_filename_input = unquote_special_chars(filename_input); offset = fsi->getfilepos(in); while ((data = fsi->readchar(in)) != '\t') if (data == EOF) { abort_entry_input(); TRACE_LOG("#24\n"); return -1; } size = fsi->getfilepos(in) - offset - 1; if (ensure_mem_size(&blorbfile_input, &blorbfile_input_size, size + 2) == -1) { abort_entry_input(); TRACE_LOG("#25\n"); return -1; } if (size > 0) { fsi->setfilepos(in, -(size+1), SEEK_CUR); if (fsi->readchars(blorbfile_input, size+1, in) != (size_t)size+1) { abort_entry_input(); TRACE_LOG("#26\n"); return -1; } } blorbfile_input[size] = '\0'; unquoted_blorbfile_input = unquote_special_chars(blorbfile_input); offset = fsi->getfilepos(in); while ((data = fsi->readchar(in)) != '\t') if (data == EOF) { abort_entry_input(); TRACE_LOG("#27\n"); return -1; } size = fsi->getfilepos(in) - offset - 1; if (ensure_mem_size(&filetype_input, &filetype_input_size, size + 2) == -1) { abort_entry_input(); TRACE_LOG("#28\n"); return -1; } if (size > 0) { fsi->setfilepos(in, -(size+1), SEEK_CUR); if (fsi->readchars(filetype_input, size+1, in) != (size_t)size+1) { abort_entry_input(); TRACE_LOG("#29\n"); return -1; } } filetype_input[size] = '\0'; unquoted_filetype_input = unquote_special_chars(filetype_input); index = 0; storyfile_timestamp_input = 0; while (index < 16) { if ((data = fsi->readchar(in)) == EOF) { abort_entry_input(); TRACE_LOG("#30\n"); return -1; } if (data == '\n') { fsi->unreadchar(data, in); break; } if (isdigit(data) == 0) { break; } storyfile_timestamp_input *= 10; storyfile_timestamp_input += (data - '0'); index++; } //printf("filename:[%s]\n", filename_input); /* printf("%d|%s|%d|%s|%s|%s|%s\n", release_input, serial_input, checksum_input, title_input, author_input, description_input, filename_input); */ while ((data = fsi->readchar(in)) != '\n') if (data == EOF) break; return 0; } static char *get_filelist_name() { char *dir_name = NULL; char *filename; #ifndef DISABLE_CONFIGFILES dir_name = get_fizmo_config_dir_name(); #endif // DISABLE_CONFIGFILES if (dir_name == NULL) return NULL; filename = malloc(strlen(dir_name) + 16); strcpy(filename, dir_name); strcat(filename, "/story-list.txt"); return filename; } static z_file *open_story_list(bool write_enabled) { char *filename; z_file *result; if ((filename = get_filelist_name()) == NULL) return NULL; result = fsi->openfile(filename, FILETYPE_DATA, write_enabled == true ? FILEACCESS_WRITE : FILEACCESS_READ); free(filename); return result; } struct z_story_list_entry *store_current_entry() { struct z_story_list_entry *result; if ((result = malloc(sizeof(struct z_story_list_entry))) == NULL) return NULL; //printf("storing %s, %d, %d\n", serial_input, release_input, length_input); result->release_number = release_input; result->serial = fizmo_strdup(unquoted_serial_input); result->z_code_version = version_input; result->length = length_input; result->checksum = checksum_input; result->title = fizmo_strdup(unquoted_title_input); result->author = fizmo_strdup(unquoted_author_input); result->language = fizmo_strdup(unquoted_language_input); result->description = fizmo_strdup(unquoted_description_input); result->filename = fizmo_strdup(unquoted_filename_input); result->blorbfile = fizmo_strdup(unquoted_blorbfile_input); result->filetype = fizmo_strdup(unquoted_filetype_input); //result->entry_line_index = line_index; result->storyfile_timestamp = storyfile_timestamp_input; return result; } struct z_story_list_entry *add_entry_to_story_list( struct z_story_list *story_list, char *title, char *author, char *language, char *description, char *serial, int version, int length, uint16_t checksum, uint16_t release, char *story_filename, char *story_blorbfile, char *story_filetype, long storyfile_timestamp) //, int line_index) { void *ptr; struct z_story_list_entry *result; int insert_index; //printf("Adding %d:%s\n", story_list->nof_entries, story_filename); TRACE_LOG("Adding new story entry #%d: %s, \"%s\".\n", story_list->nof_entries, story_filename, description != NULL ? description : ""); if (story_list->nof_entries == story_list->nof_entries_allocated) { if ((ptr = (struct z_story_list_entry**)fizmo_realloc( story_list->entries, sizeof(struct z_story_list_entry*) * (story_list->nof_entries_allocated + 10))) == NULL) { TRACE_LOG("Cannot realloc.\n"); return NULL; } story_list->entries = ptr; story_list->nof_entries_allocated += 10; } if ((result = malloc(sizeof(struct z_story_list_entry))) == NULL) { TRACE_LOG("Cannot malloc.\n"); return NULL; } result->release_number = release; result->serial = fizmo_strdup(serial); result->z_code_version = version; result->length = length; result->checksum = checksum; result->title = fizmo_strdup(title); result->author = fizmo_strdup(author); result->language = fizmo_strdup(language); result->description = fizmo_strdup(description); result->filename = fizmo_strdup(story_filename); result->blorbfile = (story_blorbfile != NULL ? fizmo_strdup(story_blorbfile) : NULL); result->filetype = fizmo_strdup(story_filetype); result->storyfile_timestamp = storyfile_timestamp; insert_index = 0; while (insert_index < story_list->nof_entries) { if (strcmp(result->title, story_list->entries[insert_index]->title) < 0) break; insert_index++; } TRACE_LOG("Insert index: %d.\n", insert_index); if (insert_index < story_list->nof_entries) { TRACE_LOG("Move to %p from %p.\n", story_list->entries + insert_index + 1, story_list->entries + insert_index); memmove( story_list->entries + insert_index + 1, story_list->entries + insert_index, (story_list->nof_entries - insert_index) * sizeof(struct z_story_list_entry*)); } story_list->entries[insert_index] = result; story_list->nof_entries++; return result; } struct z_story_list *get_empty_z_story_list() { struct z_story_list *result; if ((result = malloc(sizeof(struct z_story_list))) == NULL) return NULL; result->nof_entries_allocated = 0; result->nof_entries = 0; result->entries = NULL; return result; } struct z_story_list *get_z_story_list() { int data; struct z_story_list *result = get_empty_z_story_list(); if ((in = open_story_list(false)) == NULL) return result; in_zfile_open = true; for(;;) { if ((data = fsi->readchar(in)) == EOF) { abort_entry_input(); return result; } else fsi->unreadchar(data, in); if (parse_next_story_entry() == -1) { abort_entry_input(); return result; } add_entry_to_story_list( result, unquoted_title_input, unquoted_author_input, unquoted_language_input, unquoted_description_input, unquoted_serial_input, version_input, length_input, checksum_input, release_input, unquoted_filename_input, unquoted_blorbfile_input, unquoted_filetype_input, storyfile_timestamp_input); } } // This method reads story info from a parsed list. For other purposes, see // function "get_z_story_entry_from_list". static struct z_story_list_entry *get_z_story_entry(char *serial, uint16_t release, int length, struct z_story_list *story_list) { struct z_story_list_entry *entry; int i = 0; if (story_list == NULL) return NULL; //printf("looking for: %s, %d, %d\n", serial, release, length); while (i < story_list->nof_entries) { entry = story_list->entries[i]; /* printf("cmp(%d): %s/%s, %d/%d, %d/%d\n", i,entry->serial, serial, entry->release_number, release, entry->length, length); */ if ( (strcmp(entry->serial, serial) == 0) && (entry->release_number == release) && (entry->length == length) ) { //printf("Found\n"); return entry; } i++; } return NULL; } // This method will parse entries in the story-list until a matching one // has been found. It will discard all non-matches and return only a single // entry, making it useful for retrieving data about a single story when // the list is not needed. To get an entry from an already parsed list, see // "get_z_story_entry" instead. struct z_story_list_entry *get_z_story_entry_from_list(char *serial, uint16_t release, uint16_t checksum) { struct z_story_list_entry *result; int data; if ((in = open_story_list(false)) == NULL) return NULL; in_zfile_open = true; for(;;) { if ((data = fsi->readchar(in)) == EOF) { abort_entry_input(); return NULL; } else fsi->unreadchar(data, in); if (parse_next_story_entry() == -1) { abort_entry_input(); return NULL; } if ( (strcmp(serial_input, serial) == 0) && (release_input == release) && (checksum_input == checksum) ) { result = store_current_entry(); //line_index); abort_entry_input(); return result; } } } int remove_entry_from_list(struct z_story_list *story_list, struct z_story_list_entry *entry) { int entry_index = 0; while (entry_index < story_list->nof_entries) { if (story_list->entries[entry_index] == entry) break; entry_index++; } if (entry_index >= story_list->nof_entries) return -1; if (entry_index + 1 < story_list->nof_entries) { memmove( story_list->entries + entry_index, story_list->entries + entry_index + 1, sizeof(struct z_story_list_entry*) * (story_list->nof_entries - entry_index - 1)); } story_list->nof_entries--; return 0; } static int detect_and_add_z_file(char *filename, char *blorb_filename, struct babel_info *babel, struct z_story_list *story_list) { z_file *infile; uint8_t buf[30]; uint32_t val; char serial[7]; int version; uint16_t checksum; uint16_t release; struct babel_story_info *b_info = NULL; char *title; char *author; char *language; char *description; char *ptr, *ptr2; int length; time_t storyfile_timestamp; char *empty_string = ""; struct z_story_list_entry *entry; int chunk_length = -1; struct babel_info *file_babel = NULL; bool file_is_zblorb; char *cwd = NULL; char *abs_filename = NULL; if (filename == NULL) return -1; if (filename[0] != '/') { cwd = fsi->get_cwd(); abs_filename = fizmo_malloc(strlen(cwd) + strlen(filename) + 2); sprintf(abs_filename, "%s/%s", cwd, filename); } else abs_filename = filename; if ((infile = fsi->openfile(abs_filename, FILETYPE_DATA, FILEACCESS_READ)) == NULL) { if (cwd != NULL) { free(cwd); free(abs_filename); } return -1; } if ((storyfile_timestamp = fsi->get_last_file_mod_timestamp(infile)) < 0) { fsi->closefile(infile); if (cwd != NULL) { free(cwd); free(abs_filename); } return -1; } if (fsi->readchars(buf, 30, infile) != 30) { fsi->closefile(infile); if (cwd != NULL) { free(cwd); free(abs_filename); } return -1; } if (memcmp(buf, "FORM", 4) == 0) { // IFF file. if ( (is_form_type(infile, "IFRS") != true) || (find_chunk("ZCOD", infile) == -1) ) { fsi->closefile(infile); if (cwd != NULL) { free(cwd); free(abs_filename); } return -1; } file_is_zblorb = true; if (find_chunk("IFmd", infile) == 0) { read_chunk_length(infile); chunk_length = get_last_chunk_length(); file_babel = load_babel_info_from_blorb( infile, chunk_length, abs_filename, storyfile_timestamp); babel = file_babel; } find_chunk("ZCOD", infile); read_chunk_length(infile); length = get_last_chunk_length(); if (fsi->readchars(buf, 30, infile) != 30) { fsi->closefile(infile); if (cwd != NULL) { free(cwd); free(abs_filename); } return -1; } } else { fsi->setfilepos(infile, 0, SEEK_END); length = fsi->getfilepos(infile); file_is_zblorb = false; } fsi->closefile(infile); val = (buf[16] << 24) | (buf[17] << 16) | (buf[18] << 8) | (buf[19]); if ( ((val & 0xbe00f0f0) != 0x3030) || (*buf < 1) || (*buf > 8) ) { if (cwd != NULL) { free(cwd); free(abs_filename); } return -2; } version = *buf; memcpy(serial, buf + 0x12, 6); serial[6] = '\0'; checksum = (buf[0x1c] << 8) | buf[0x1d]; release = (buf[2] << 8) | buf[3]; if ((entry = get_z_story_entry(serial, release, length, story_list)) != NULL) { // We already have the story in our story-list. If we have a raw file // we can just quit if the support-blorbfilename is the same (raw files // don't contain metadata which might have changed). if ( (file_is_zblorb == false) && ( ( (entry->blorbfile == NULL) && (blorb_filename != NULL) ) // || (Don't delete blorb file) // ( (blorb_filename == NULL) && (entry->blorbfile != NULL) ) || ( (entry->blorbfile != NULL) && (blorb_filename != NULL) && (strcmp(blorb_filename, entry->blorbfile) == 0) ) ) ) { if (cwd != NULL) { free(cwd); free(abs_filename); } return -3; } //printf("%ld / %ld\n", storyfile_timestamp, entry->storyfile_timestamp); // In case new file is a zblorb and we have save a raw file, remove the // raw and keep the blorb (so we can get images and sound). We'll also // re-read the file contents if the file has changed (metadata might // have been altered). if ( (strcmp(entry->filetype, filetype_raw) == 0) || (storyfile_timestamp > entry->storyfile_timestamp) ) { remove_entry_from_list(story_list, entry); //printf("%s...\n", abs_filename); } else { if (cwd != NULL) { free(cwd); free(abs_filename); } return -4; } } ptr2 = NULL; if ((b_info = get_babel_story_info( release, serial, checksum, babel, file_is_zblorb)) != NULL) { title = (b_info->title == NULL ? empty_string : b_info->title); author = (b_info->author == NULL ? empty_string : b_info->author); language = (b_info->language == NULL ? empty_string : b_info->language); description = (b_info->description != NULL) ? b_info->description : empty_string; } else { if ((title = strrchr(abs_filename, '/')) == NULL) title = abs_filename; else title++; if ((ptr = strrchr(title, '.')) != NULL) { TRACE_LOG("strdup: %s\n", title); ptr2 = fizmo_strdup(title); ptr = strrchr(ptr2, '.'); if ( ( (strlen(ptr) == 3) && (ptr[1] == 'z') && (isdigit(ptr[2]) != 0) ) || (strcasecmp(ptr, ".dat") == 0) || (strcasecmp(ptr, ".zblorb") == 0) ) *ptr = '\0'; *ptr2 = toupper(*ptr2); title = ptr2; } author = empty_string; language = empty_string; description = empty_string; } add_entry_to_story_list( story_list, title, author, language, description, serial, version, length, checksum, release, abs_filename, file_is_zblorb ? NULL : blorb_filename, file_is_zblorb ? filetype_zblorb : filetype_raw, storyfile_timestamp); if (b_info != NULL) free_babel_story_info(b_info); if (ptr2 != NULL) free(ptr2); if (file_babel != NULL) free_babel_info(file_babel); if (cwd != NULL) { free(cwd); free(abs_filename); } return 0; } static int count_files(char *abs_dir_name, bool recursive) { z_dir *current_dir; struct z_dir_ent z_dir_entry; char *dirname = NULL; int dirname_size = 0; int len; int result = 0; char *cwd = fsi->get_cwd(NULL, 0); if ((fsi->ch_dir(abs_dir_name)) == -1) { free(cwd); return 0; } TRACE_LOG("Counting files for \"%s\".\n", abs_dir_name); if ((current_dir = fsi->open_dir(".")) == NULL) { printf("\"%s\":\n", abs_dir_name); perror("could not opendir"); fsi->ch_dir(cwd); free(cwd); return 0; } while (fsi->read_dir(&z_dir_entry, current_dir) == 0) { if ( (strcmp(z_dir_entry.d_name, ".") == 0) || (strcmp(z_dir_entry.d_name, "..") == 0) ) continue; len = strlen(abs_dir_name) + strlen(z_dir_entry.d_name) + 2; if (len > dirname_size) { dirname = (char*)fizmo_realloc(dirname, len); dirname_size = len; } strcpy(dirname, abs_dir_name); if (dirname[strlen(dirname) - 1] != '/') strcat(dirname, "/"); strcat(dirname, z_dir_entry.d_name); if (fsi->is_filename_directory(z_dir_entry.d_name) == true) { if (recursive == true) result += count_files(dirname, true); } else result++; } if (dirname != NULL) free(dirname); fsi->close_dir(current_dir); fsi->ch_dir(cwd); free(cwd); //printf("result:%d\n", result); TRACE_LOG("count-result: %d\n", result); return result; } static int search_dir(char *abs_dir_name, void (*update_func)(char *filename, char *dirname), struct z_story_list *story_list, bool recursive, struct babel_info *babel) { z_dir *current_dir; struct z_dir_ent z_dir_entry; char *dirname = NULL; int dirname_size = 0; int len; char *cwd = fsi->get_cwd(); TRACE_LOG("Trying to readdir \"%s\".\n", abs_dir_name); if ((fsi->ch_dir(abs_dir_name)) == -1) { return -1; } if ((current_dir = fsi->open_dir(".")) == NULL) { printf("\"%s\":\n", abs_dir_name); perror("could not opendir"); return -1; } if ( (show_progress == true) && (update_func != NULL) ) update_func(NULL, abs_dir_name); while (fsi->read_dir(&z_dir_entry, current_dir) == 0) { if ( (strcmp(z_dir_entry.d_name, ".") == 0) || (strcmp(z_dir_entry.d_name, "..") == 0) ) continue; len = strlen(abs_dir_name) + strlen(z_dir_entry.d_name) + 2; if (len > dirname_size) { dirname = (char*)fizmo_realloc(dirname, len); dirname_size = len; } strcpy(dirname, abs_dir_name); if (dirname[strlen(dirname) - 1] != '/') strcat(dirname, "/"); strcat(dirname, z_dir_entry.d_name); if (fsi->is_filename_directory(z_dir_entry.d_name) == true) { if (recursive == true) search_dir(dirname, update_func, story_list, true, babel); } else { if ( (show_progress == true) && (update_func != NULL) ) update_func(z_dir_entry.d_name, NULL); detect_and_add_z_file(dirname, NULL, babel, story_list); } } if (dirname != NULL) free(dirname); fsi->close_dir(current_dir); fsi->ch_dir(cwd); free(cwd); return 0; } void build_filelist(char *root_dir, struct z_story_list *story_list, bool recursive, struct babel_info *babel) { char *cwd = fsi->get_cwd(); char *absrootdir; if (root_dir == NULL) { TRACE_LOG("Building filelist for rootdir: \"/\".\n"); search_dir("/", &new_file_searched, story_list, recursive, babel); } else { TRACE_LOG("Building filelist for rootdir: \"%s\".\n", root_dir); if ((fsi->ch_dir(root_dir)) == -1) detect_and_add_z_file(root_dir, NULL, babel, story_list); else { // Avoid relative names like "./zork1.z3". absrootdir = fsi->get_cwd(NULL, 0); search_dir(absrootdir, &new_file_searched, story_list, recursive, babel); free(absrootdir); } } fsi->ch_dir(cwd); free(cwd); } void save_story_list(struct z_story_list *story_list) { z_file *out; struct z_story_list_entry *entry; int i = 0; char *quoted_serial = NULL; char *quoted_title = NULL; char *quoted_author = NULL; char *quoted_language = NULL; char *quoted_description = NULL; char *quoted_filename = NULL; char *quoted_blorbname = NULL; char *quoted_filetype= NULL; if ((out = open_story_list(true)) == NULL) return; while (i < story_list->nof_entries) { entry = story_list->entries[i++]; quoted_serial = quote_special_chars(entry->serial); quoted_title = quote_special_chars(entry->title); quoted_author = quote_special_chars(entry->author); quoted_language = quote_special_chars(entry->language); quoted_description = quote_special_chars(entry->description); quoted_filename = quote_special_chars(entry->filename); quoted_blorbname = quote_special_chars(entry->blorbfile); quoted_filetype = quote_special_chars(entry->filetype); //printf("%d/%d\n", i, story_list->nof_entries); fsi->fileprintf( out, "%d\t%s\t%d\t%d\t%d\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%ld\n", entry->release_number, quoted_serial, entry->length, entry->checksum, entry->z_code_version, (quoted_title == NULL ? "" : quoted_title), (quoted_author == NULL ? "" : quoted_author), (quoted_language == NULL ? "" : quoted_language), (quoted_description == NULL ? "" : quoted_description), quoted_filename, (quoted_blorbname == NULL ? "" : quoted_blorbname), quoted_filetype, entry->storyfile_timestamp); if (quoted_serial != NULL) free(quoted_serial); if (quoted_title != NULL) free(quoted_title); if (quoted_author != NULL) free(quoted_author); if (quoted_language != NULL) free(quoted_language); if (quoted_description != NULL) free(quoted_description); if (quoted_filename != NULL) free(quoted_filename); if (quoted_blorbname != NULL) free(quoted_blorbname); if (quoted_filetype != NULL) free(quoted_filetype); } fsi->closefile(out); } struct z_story_list *update_fizmo_story_list() { #ifdef DISABLE_CONFIGFILES return NULL; #else // DISABLE_CONFIGFILES struct z_story_list *result; struct z_story_list_entry *entry; char *str, *str_copy, *path; z_file *file; struct babel_info *babel; int i; nof_files_found = 0; nof_files_searched = 0; nof_directories_searched = 0; ensure_dot_fizmo_dir_exists(); babel = load_babel_info(); if (babel_files_have_changed(babel) == true) { // Don't load current list of story, rebuild index with the newly // changed babel data. result = get_empty_z_story_list(); store_babel_info_timestamps(babel); } else { // Babel data is the same, use pre-indexed story list. result = get_z_story_list(); i = 0; while (i < result->nof_entries) { entry = result->entries[i]; if ((file = fsi->openfile( entry->filename, FILETYPE_DATA, FILEACCESS_READ)) == NULL) remove_entry_from_list(result, entry); else { fsi->closefile(file); i++; } } } if ((str = getenv("ZCODE_PATH")) == NULL) str = getenv("INFOCOM_PATH"); if (str != NULL) set_configuration_value("z-code-path", str); if ((str = getenv("ZCODE_ROOT_PATH")) != NULL) set_configuration_value("z-code-root-path", str); if ((str = get_configuration_value("z-code-path")) != NULL) { path = strtok(str, ":"); while (path != NULL) { TRACE_LOG("Counting for token \"%s\".\n", path); nof_files_found += count_files(path, false); path = strtok(NULL, ":"); } } if ((str = get_configuration_value("z-code-root-path")) != NULL) { str_copy = strdup(str); path = strtok(str_copy, ":"); while (path != NULL) { TRACE_LOG("Counting for token \"%s\".\n", path); nof_files_found += count_files(path, true); path = strtok(NULL, ":"); } free(str_copy); } TRACE_LOG("nof_files_found: %d, %d\n", nof_files_found, NUMBER_OF_FILES_TO_SHOW_PROGRESS_FOR); if (nof_files_found >= NUMBER_OF_FILES_TO_SHOW_PROGRESS_FOR) show_progress = true; else show_progress = false; //printf("\n"); // newline for \r-progress indicator //build_filelist(".", result, false, babel); if ((str = get_configuration_value("z-code-path")) != NULL) { str_copy = strdup(str); path = strtok(str_copy, ":"); while (path != NULL) { build_filelist(path, result, false, babel); path = strtok(NULL, ":"); } free(str_copy); } if ((str = get_configuration_value("z-code-root-path")) != NULL) { str_copy = strdup(str); path = strtok(str_copy, ":"); while (path != NULL) { build_filelist(path, result, true, babel); path = strtok(NULL, ":"); } free(str_copy); } if (show_progress == true) printf("\n"); TRACE_LOG("noffiles: %d\n", result->nof_entries); save_story_list(result); store_babel_info_timestamps(babel); free_babel_info(babel); return result; #endif // DISABLE_CONFIGFILES } void detect_and_add_single_z_file(char *input_filename, char *blorb_filename) { struct z_story_list *z_story_list = get_z_story_list(); struct babel_info *babel = load_babel_info(); TRACE_LOG("noffiles: %d\n", z_story_list->nof_entries); detect_and_add_z_file(input_filename, blorb_filename, babel, z_story_list); TRACE_LOG("noffiles: %d\n", z_story_list->nof_entries); save_story_list(z_story_list); store_babel_info_timestamps(babel); free_z_story_list(z_story_list); free_babel_info(babel); } void search_directory(char *absolute_dirname, bool recursive) { struct z_story_list *z_story_list = get_z_story_list(); struct babel_info *babel = load_babel_info(); #ifndef DISABLE_CONFIGFILES ensure_dot_fizmo_dir_exists(); #endif // DISABLE_CONFIGFILES if ((nof_files_found = count_files(absolute_dirname, recursive)) > 0) { show_progress = true; nof_files_searched = 0; nof_directories_searched = 0; build_filelist(absolute_dirname, z_story_list, recursive, babel); } //printf("%d, %s\n", z_story_list->nof_entries, absolute_dirname); save_story_list(z_story_list); store_babel_info_timestamps(babel); free_z_story_list(z_story_list); free_babel_info(babel); } libfizmo-0.7.15/src/interpreter/cmd_hst.c0000644000175000017500000001053713153330674020517 0ustar chrenderchrender /* cmd_hst.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef cmd_hst_c_INCLUDED #define cmd_hst_c_INCLUDED #define _XOPEN_SOURCE_EXTENDED 1 #define _XOPEN_SOURCE 1 // __STDC_ISO_10646__ #include #include #include "cmd_hst.h" #include "fizmo.h" #include "../tools/tracelog.h" #include "../tools/types.h" #include "../tools/i18n.h" // The array "command_history_entries" stores pointer to the latest commands // entered by the user. In case the user has entered more commands than // NUMBER_OF_REMEMBERED_COMMANDS, pointers in the array are not copied, // instead the "start_index" and "end_index" are adjusted accordingly. static zscii *command_history_entries[NUMBER_OF_REMEMBERED_COMMANDS]; // If wrap_around_is_active == false, start_index == end_index means that // the buffer is empty, otherwise full. bool wrap_around_is_active = false; // "start_index" denotes the position of the oldest stored command. static unsigned int start_index = 0; // "end_index" is one step ahead of the latest stored command. static unsigned int end_index = 0; void store_command_in_history(zscii *new_command) { zscii *ptr = (zscii*)fizmo_strdup((char*)new_command); if (start_index == end_index) { if (wrap_around_is_active == true) { free(command_history_entries[start_index]); TRACE_LOG("Storing command %p at %d.\n", ptr, end_index); command_history_entries[end_index] = ptr; if (++end_index == NUMBER_OF_REMEMBERED_COMMANDS) { end_index = 0; } start_index = end_index; } else { // The buffer ist still empty. TRACE_LOG("Storing command %p at 0.\n"); command_history_entries[0] = ptr; end_index = 1; } } else { // There's still space to store new commands. TRACE_LOG("Storing command %p at %d.\n", ptr, end_index); command_history_entries[end_index] = ptr; if (++end_index == NUMBER_OF_REMEMBERED_COMMANDS) { end_index = 0; start_index = 0; wrap_around_is_active = true; } } TRACE_LOG("start_index: %d, end_index: %d.\n", start_index, end_index); } int get_number_of_stored_commands() { return wrap_around_is_active == false ? end_index - start_index : NUMBER_OF_REMEMBERED_COMMANDS; } zscii *get_command_from_history(unsigned int command_index) { unsigned int history_index; TRACE_LOG("requested: %d.\n", command_index); TRACE_LOG("stored: %d.\n", get_number_of_stored_commands()); if (command_index < end_index) { history_index = end_index - command_index - 1; } else if (wrap_around_is_active == true) { history_index = (NUMBER_OF_REMEMBERED_COMMANDS - (command_index - end_index)) - 1; } else { return NULL; } TRACE_LOG("history_index: %d.\n", history_index); return command_history_entries[history_index]; } #endif // cmd_hist_c_INCLUDED libfizmo-0.7.15/src/interpreter/mt19937ar.h0000644000175000017500000000417213153330674020461 0ustar chrenderchrender /* mt19937ar.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef mt19937ar_h_INCLUDED #define mt19937ar_h_INCLUDED #define GENRAND_INT32_MAX 0xffffffff /* initializes mt[N] with a seed */ void init_genrand(unsigned long s); /* initialize by an array with array-length */ /* init_key is the array for initializing keys */ /* key_length is its length */ /* slight change for C++, 2004/2/26 */ void init_by_array(unsigned long init_key[], int key_length); /* generates a random number on [0,0xffffffff]-interval */ unsigned long genrand_int32(void); #endif /* mt19937ar_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/routine.h0000644000175000017500000000466413153330674020574 0ustar chrenderchrender /* routine.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef routine_h_INCLUDED #define routine_h_INCLUDED #include "../tools/types.h" #ifndef routine_c_INCLUDED extern int16_t number_of_stack_frames; #endif /* routine_c_INCLUDED */ void return_from_routine(int16_t result_value); void call_routine(uint32_t target_routine_address, uint8_t result_variable_number, bool discard_result, uint8_t number_of_arguments); void opcode_call(void); void opcode_ret(void); void opcode_rfalse(void); void opcode_rtrue(void); void opcode_jump(void); void opcode_ret_popped(void); void opcode_quit(void); void opcode_call_2s(void); void opcode_call_2n(void); void opcode_call_1s(void); void opcode_call_1n(void); void opcode_nop(void); void opcode_call_vn(void); void opcode_throw(void); void opcode_catch(void); void opcode_call_vs2(void); void opcode_call_vn2(void); #endif /* routine_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/table.h0000644000175000017500000000341213153330674020164 0ustar chrenderchrender /* table.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef table_h_INCLUDED #define table_h_INCLUDED #include void opcode_scan_table(void); void opcode_copy_table(void); #endif /* table_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/babel.c0000644000175000017500000004652213153330674020146 0ustar chrenderchrender /* babel.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #ifndef DISABLE_BABEL #include #include #include #include #include #endif // DISABLE_BABEL #include "babel.h" #include "config.h" #include "fizmo.h" #include "../tools/tracelog.h" #include "../tools/filesys.h" #include "../tools/unused.h" static z_file *timestamp_file; static struct babel_timestamp_entry *babel_timestamp_entries; static char *timestamp_input = NULL; static int timestamp_input_size = 0; static char *filename_input = NULL; static int filename_input_size = 0; static char *unquoted_filename_input = NULL; void free_babel_story_info(struct babel_story_info *b_info) { free(b_info->serial); free(b_info->title); free(b_info->author); free(b_info->description); free(b_info->language); free(b_info); } void free_babel_doc_entry(struct babel_doc_entry *entry) { if (entry == NULL) return; #ifndef DISABLE_BABEL xmlFreeDoc(entry->babel_doc); #endif free(entry->filename); free(entry); } void free_babel_info(struct babel_info *babel) { int i; if (babel == NULL) return; for (i=0; inof_entries; i++) free_babel_doc_entry(babel->entries[i]); free(babel->entries); free(babel); } #ifndef DISABLE_BABEL static int add_doc_to_babel_info(xmlDocPtr new_babel_doc, struct babel_info *babel, time_t last_mod_timestamp, char *filename) { xmlXPathContextPtr xpathCtx; xmlXPathObjectPtr xpathObj; char *xmlExpr = "/ifindex"; char *xmlNamespacedExpr = "/if:ifindex"; bool uses_if_namespace; struct babel_doc_entry *new_entry; // Check contents xpathCtx = xmlXPathNewContext(new_babel_doc); if(xpathCtx == NULL) { fprintf(stderr,"Error: unable to create new XPath context\n"); return -1; } if (xmlXPathRegisterNs( xpathCtx, (xmlChar*)"if", (xmlChar*)"http://babel.ifarchive.org/protocol/iFiction/") == -1) { fprintf(stderr,"Error: unable to create new namespace\n"); xmlXPathFreeContext(xpathCtx); return -1; } xpathObj = xmlXPathEvalExpression((xmlChar*)xmlExpr, xpathCtx); if (xpathObj == NULL) { xmlXPathFreeContext(xpathCtx); fprintf( stderr, "Error: unable to evaluate xpath expression \"%s\"\n", xmlExpr); return -1; } if (xmlXPathNodeSetGetLength(xpathObj->nodesetval) != 1) { // "/ifindex" was not found. Try "/if:ifindex". xmlXPathFreeObject(xpathObj); xpathObj = xmlXPathEvalExpression( (xmlChar*)xmlNamespacedExpr, xpathCtx); if (xpathObj == NULL) { xmlXPathFreeContext(xpathCtx); fprintf( stderr, "Error: unable to evaluate xpath expression \"%s\"\n", xmlNamespacedExpr); return -1; } if (xmlXPathNodeSetGetLength(xpathObj->nodesetval) != 1) { // Neither "/ifindex" nor "/if:ifindex" found. Skip this file. xmlXPathFreeObject(xpathObj); xmlXPathFreeContext(xpathCtx); return -1; } else uses_if_namespace = true; } else uses_if_namespace = false; xmlXPathFreeObject(xpathObj); xmlXPathFreeContext(xpathCtx); if (babel->nof_entries == babel->entries_allocated) { babel->entries = (struct babel_doc_entry**)fizmo_realloc( babel->entries, sizeof(struct babel_doc_entry*) * (babel->entries_allocated+10)); babel->entries_allocated += 10; } new_entry = (struct babel_doc_entry*)fizmo_malloc( sizeof(struct babel_doc_entry)); new_entry->babel_doc = new_babel_doc; new_entry->uses_if_namespace = uses_if_namespace; new_entry->timestamp = last_mod_timestamp; new_entry->filename = fizmo_strdup(filename); babel->entries[babel->nof_entries] = new_entry; babel->nof_entries++; return 0; } #endif #ifndef DISABLE_BABEL struct babel_info *load_babel_info_from_blorb(z_file *infile, int length, char *filename, time_t last_mod_timestamp) { struct babel_info *result; char *xmlData = (char*)fizmo_malloc(length + 1); xmlDocPtr babel_doc; if (fsi->readchars(xmlData, length, infile) != (size_t)length) { free(xmlData); return NULL; } xmlData[length] = '\0'; babel_doc = xmlReadDoc( (xmlChar*)xmlData, NULL, NULL, XML_PARSE_NOWARNING | XML_PARSE_NOERROR); free(xmlData); if (babel_doc == NULL) return NULL; result = (struct babel_info*)fizmo_malloc(sizeof(struct babel_info)); result->entries = NULL; result->entries_allocated = 0; result->nof_entries = 0; if (add_doc_to_babel_info(babel_doc, result, last_mod_timestamp, filename) != 0) { xmlFreeDoc(babel_doc); free(result); return NULL; } return result; } #else struct babel_info *load_babel_info_from_blorb(z_file *UNUSED(infile), int UNUSED(length), char *UNUSED(filename), time_t UNUSED(last_mod_timestamp)) { return NULL; } #endif struct babel_info *load_babel_info() { struct babel_info *result = NULL; #ifndef DISABLE_BABEL char *cwd = NULL; char *config_dir_name = NULL; z_dir *config_dir; struct z_dir_ent z_dir_entry; time_t last_mod_timestamp; z_file *new_babel_doc_file; xmlDocPtr new_babel_doc; #ifndef DISABLE_CONFIGFILES config_dir_name = get_fizmo_config_dir_name(); #endif // DISABLE_CONFIGFILES if ((config_dir = fsi->open_dir(config_dir_name)) == NULL) return NULL; cwd = fsi->get_cwd(); if (fsi->ch_dir(config_dir_name) != 0) { fsi->close_dir(config_dir); free(cwd); return NULL; } result = (struct babel_info*)fizmo_malloc(sizeof(struct babel_info)); result->entries = NULL; result->entries_allocated = 0; result->nof_entries = 0; while (fsi->read_dir(&z_dir_entry, config_dir) == 0) { if ( (fsi->is_filename_directory(z_dir_entry.d_name) == false) && (strlen(z_dir_entry.d_name) >= 9) && (strcasecmp( z_dir_entry.d_name + strlen(z_dir_entry.d_name) - 9, ".iFiction") == 0) ) { if ((new_babel_doc = xmlReadFile( z_dir_entry.d_name, NULL, XML_PARSE_NOWARNING | XML_PARSE_NOERROR)) != NULL) { if ((new_babel_doc_file = fsi->openfile( z_dir_entry.d_name, FILETYPE_DATA, FILEACCESS_READ)) == NULL) { free_babel_info(result); fsi->ch_dir(cwd); free(cwd); fsi->close_dir(config_dir); return NULL; } last_mod_timestamp = fsi->get_last_file_mod_timestamp(new_babel_doc_file); fsi->closefile(new_babel_doc_file); if ((add_doc_to_babel_info( new_babel_doc, result, last_mod_timestamp, z_dir_entry.d_name)) != 0) { xmlFreeDoc(new_babel_doc); free_babel_info(result); fsi->ch_dir(cwd); free(cwd); fsi->close_dir(config_dir); return NULL; } } } } fsi->ch_dir(cwd); free(cwd); fsi->close_dir(config_dir); #endif return result; } #ifndef DISABLE_BABEL static char *getStoryNodeContent(xmlXPathContextPtr xpathCtx, char *nodeName, char *namespace) { xmlXPathObjectPtr obj2; xmlNodePtr node; char *ptr; char expr[160]; // FIXME: Calculate length. int i; char *result = NULL; int result_size = 0; int index = 0; bool last_was_space; bool is_first_char; int len; char *src; sprintf( expr, "%sbibliographic/%s%s/child::text()|%sbibliographic/%s%s/*", namespace, namespace, nodeName, namespace, namespace, nodeName); obj2 = xmlXPathEvalExpression( (xmlChar*)expr, xpathCtx); //printf("# %d.\n", xmlXPathNodeSetGetLength(obj2->nodesetval)); for (i=0; inodesetval); i++) { node = obj2->nodesetval->nodeTab[i]; if(node->type == XML_ELEMENT_NODE) { if (strcasecmp((char*)node->name, "br") == 0) { ensure_mem_size(&result, &result_size, index+1); result[index++] = '\n'; //result[index++] = 0xa0; } } else if (node->type == XML_TEXT_NODE) { ptr = (char*)xmlNodeGetContent(node); len = strlen(ptr); src = ptr; ensure_mem_size(&result, &result_size, index + len + 1); last_was_space = false; is_first_char = true; while (*src != '\0') { if ( (*src == '\n') || (*src == '\r') || (*src == '\t') || (*src == ' ') ) { if ( (last_was_space == false) && (is_first_char == false) ) { last_was_space = true; } } else { if (last_was_space == true) { result[index] = ' '; index++; } last_was_space = false; result[index] = *src; is_first_char = false; index++; } src++; } result[index] = 0; xmlFree(ptr); } } //printf("(%s)\n", result); xmlXPathFreeObject(obj2); return result; } #endif // DISABLE_BABEL #ifndef DISABLE_BABEL struct babel_story_info *get_babel_story_info(uint16_t release, char *serial, uint16_t checksum, struct babel_info *babel, bool babel_from_blorb) { xmlXPathContextPtr xpathCtx; xmlXPathObjectPtr xpathObj; char *xmlNamespacedExpr="/if:ifindex/if:story[if:identification/if:ifid='ZCODE-%d-%6s' or translate(if:identification/if:ifid, 'ABCDEF', 'abcdef')=translate('ZCODE-%d-%6s-%04x', 'ABCDEF', 'abcdef')]"; char *xmlExpr="/ifindex/story[identification/ifid='ZCODE-%d-%6s' or translate(identification/ifid, 'ABCDEF', 'abcdef')=translate('ZCODE-%d-%6s-%04x', 'ABCDEF', 'abcdef')]"; char expr[strlen(xmlExpr) + 29]; char namespacedExpr[strlen(xmlNamespacedExpr) + 29]; char *current_expr; struct babel_story_info *result = NULL; int i; char if_namespace[] = "if:"; char no_namespace[] = ""; char *current_namespace; if (babel == NULL) return NULL; LIBXML_TEST_VERSION if (strlen(serial) > 6) return NULL; if (babel_from_blorb == false) { sprintf(expr, xmlExpr, release, serial, release, serial, checksum); sprintf(namespacedExpr, xmlNamespacedExpr, release, serial, release, serial, checksum); } else { sprintf(expr, "/ifindex/story"); sprintf(namespacedExpr, "/if:ifindex/if:story"); } //printf("(%s)\n", expr); //printf("(%s)\n", namespacedExpr); for (i=0; inof_entries; i++) { xpathCtx = xmlXPathNewContext(babel->entries[i]->babel_doc); if(xpathCtx == NULL) { fprintf(stderr,"Error: unable to create new XPath context\n"); return NULL; } if (babel->entries[i]->uses_if_namespace == true) { if (xmlXPathRegisterNs( xpathCtx, (xmlChar*)"if", (xmlChar*)"http://babel.ifarchive.org/protocol/iFiction/") == -1) { fprintf(stderr,"Error: unable to create new namespace\n"); xmlXPathFreeContext(xpathCtx); return NULL; } current_expr = namespacedExpr; current_namespace = if_namespace; } else { current_expr = expr; current_namespace = no_namespace; } xpathObj = xmlXPathEvalExpression((xmlChar*)current_expr, xpathCtx); if (xpathObj == NULL) { xmlXPathFreeContext(xpathCtx); fprintf( stderr, "Error: unable to evaluate xpath expression \"%s\"\n", current_expr); return NULL; } if (xmlXPathNodeSetGetLength(xpathObj->nodesetval) == 1) { xpathCtx->node = xpathObj->nodesetval->nodeTab[0]; result = (struct babel_story_info*)fizmo_malloc( sizeof(struct babel_story_info)); result->release_number = release; result->serial = (serial != NULL ? fizmo_strdup(serial) : NULL); result->title = getStoryNodeContent( xpathCtx, "title", current_namespace); result->author = getStoryNodeContent( xpathCtx, "author", current_namespace); result->description = getStoryNodeContent( xpathCtx, "description", current_namespace); result->language = getStoryNodeContent( xpathCtx, "language", current_namespace); } } return result; } #else // DISABLE_BABEL struct babel_story_info *get_babel_story_info(uint16_t UNUSED(release), char *UNUSED(serial), uint16_t UNUSED(checksum), struct babel_info *UNUSED(babel), bool UNUSED(babel_from_blorb)) { return NULL; } #endif // DISABLE_BABEL void store_babel_info_timestamps(struct babel_info *babel) { z_file *out; char *config_dir_name = NULL; char *filename; char *quoted_filename; int i; #ifndef DISABLE_CONFIGFILES config_dir_name = get_fizmo_config_dir_name(); #endif // DISABLE_CONFIGFILES /* Story list should work even if no babel info is available. if ( (babel == NULL) || (babel->nof_entries == 0) ) return; */ if (config_dir_name == NULL) return; filename = fizmo_malloc( strlen(config_dir_name) + 2 + strlen(BABEL_TIMESTAMP_FILE_NAME)); sprintf(filename, "%s/%s", config_dir_name, BABEL_TIMESTAMP_FILE_NAME); if ((out = fsi->openfile(filename, FILETYPE_DATA, FILEACCESS_WRITE)) == NULL) { free(filename); return; } if (babel) { for (i=0; inof_entries; i++) { quoted_filename = quote_special_chars(babel->entries[i]->filename); fsi->fileprintf(out, "%ld\t%s\n", babel->entries[i]->timestamp, babel->entries[i]->filename); free(quoted_filename); } } free(filename); fsi->closefile(out); } void abort_timestamp_input() { if (timestamp_input != NULL) free(timestamp_input); if (filename_input != NULL) free(filename_input); if (unquoted_filename_input != NULL) free(unquoted_filename_input); if (babel_timestamp_entries != NULL) free(babel_timestamp_entries); fsi->closefile(timestamp_file); } bool babel_files_have_changed(struct babel_info *babel) { char *config_dir_name = NULL; char *filename; int data; int nof_babel_timestamp_entries = 0; long offset, size; long timestamp; int i, j; #ifndef DISABLE_CONFIGFILES config_dir_name = get_fizmo_config_dir_name(); #endif // DISABLE_CONFIGFILES if (config_dir_name == NULL) return false; filename = fizmo_malloc( strlen(config_dir_name) + 2 + strlen(BABEL_TIMESTAMP_FILE_NAME)); //printf("%s/%s", config_dir_name, BABEL_TIMESTAMP_FILE_NAME); sprintf(filename, "%s/%s", config_dir_name, BABEL_TIMESTAMP_FILE_NAME); if ((timestamp_file = fsi->openfile( filename, FILETYPE_DATA, FILEACCESS_READ)) == NULL) { free(filename); return true; } if ((data = fsi->readchar(timestamp_file)) != EOF) { fsi->unreadchar(data, timestamp_file); for(;;) { offset = fsi->getfilepos(timestamp_file); while ((data = fsi->readchar(timestamp_file)) != '\t') if (data == EOF) { free(filename); abort_timestamp_input(); return true; } size = fsi->getfilepos(timestamp_file) - offset - 1; if (ensure_mem_size(×tamp_input, ×tamp_input_size, size + 2) == -1) { free(filename); abort_timestamp_input(); return true; } if (size > 0) { fsi->setfilepos(timestamp_file, -(size+1), SEEK_CUR); if (fsi->readchars(timestamp_input, size+1, timestamp_file) != (size_t)size+1) { free(filename); abort_timestamp_input(); return true; } } timestamp_input[size] = '\0'; offset = fsi->getfilepos(timestamp_file); while ((data = fsi->readchar(timestamp_file)) != '\n') if (data == EOF) { free(filename); abort_timestamp_input(); return true; } size = fsi->getfilepos(timestamp_file) - offset - 1; if (ensure_mem_size(&filename_input, &filename_input_size, size+2) == -1) { free(filename); abort_timestamp_input(); return true; } if (size > 0) { fsi->setfilepos(timestamp_file, -(size+1), SEEK_CUR); if (fsi->readchars(filename_input, size+1, timestamp_file) != (size_t)size+1) { free(filename); abort_timestamp_input(); return true; } } filename_input[size] = '\0'; //printf("%s,%s\n", timestamp_input, filename_input); for (i=0; inof_entries; i++) { if (strcmp(babel->entries[i]->filename, filename_input) == 0) { //printf("Found %s\n", filename_input); timestamp = 0; for (j=0; (size_t)jentries[i]->timestamp != timestamp) { //printf("Timestamps dont match\n"); abort_timestamp_input(); free(filename); return true; } break; } } if (i == babel->nof_entries) { abort_timestamp_input(); //printf("File not found: %s\n", filename_input); free(filename); return true; } nof_babel_timestamp_entries++; if ((data = fsi->readchar(timestamp_file)) == EOF) break; fsi->unreadchar(data, timestamp_file); } } free(filename); abort_timestamp_input(); if (nof_babel_timestamp_entries != (babel ? babel->nof_entries : 0)) { //printf("Babel-lists have not equal size.\n"); return true; } return false; } bool babel_available() { #ifndef DISABLE_BABEL return true; #else return false; #endif } libfizmo-0.7.15/src/interpreter/babel.h0000644000175000017500000000570713153330674020153 0ustar chrenderchrender /* babel.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef babel_h_INCLUDED #define babel_h_INCLUDED #ifndef DISABLE_BABEL #include #endif #include "../tools/types.h" #include "../tools/unused.h" struct babel_doc_entry { #ifndef DISABLE_BABEL xmlDocPtr babel_doc; #else void *babel_doc; #endif char *filename; long timestamp; bool uses_if_namespace; }; struct babel_info { struct babel_doc_entry **entries; int entries_allocated; int nof_entries; }; struct babel_story_info { uint16_t release_number; char *serial; int length; char *title; char *author; char *description; char *language; }; void free_babel_info(struct babel_info *babel); void free_babel_story_info(struct babel_story_info *b_info); struct babel_info *load_babel_info(); struct babel_story_info *get_babel_story_info(uint16_t release, char *serial, uint16_t checksum, struct babel_info *babel, bool babel_from_blorb); void store_babel_info_timestamps(struct babel_info *babel); bool babel_files_have_changed(struct babel_info *babel); bool babel_available(); #ifndef DISABLE_BABEL struct babel_info *load_babel_info_from_blorb(z_file *infile, int length, char *filename, time_t last_mod_timestamp); #else struct babel_info *load_babel_info_from_blorb(z_file *UNUSED(infile), int UNUSED(length), char *UNUSED(filename), time_t UNUSED(last_mod_timestamp)); #endif #endif /* babel_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/sound.c0000644000175000017500000000655413153330674020232 0ustar chrenderchrender /* sound.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../tools/i18n.h" #include "../tools/tracelog.h" #include "sound.h" #include "fizmo.h" #include "zpu.h" void opcode_sound_effect(void) { int effect_number=1, effect=2, volume=8, repeats=255; uint16_t routine = 0; // VAR:245 15 5/3 sound_effect number effect volume routine TRACE_LOG("Opcode: SOUND_EFFECT\n"); if (active_sound_interface != NULL) { if (number_of_operands >= 1) { effect_number = (int16_t)op[0]; if (effect_number < 1) effect_number = 1; if (number_of_operands >= 2) { effect = (int16_t)op[1]; if ( (effect < 1) || (effect > 4) ) return; if (number_of_operands >= 3) { TRACE_LOG("op[2]: %d.\n", op[2]); volume = op[2] & 0xff; repeats = op[2] >> 8; if ( (volume < 1) || (volume > 8) ) volume = 8; if (ver >= 5) { if (repeats < 1) // 255 loop forever. repeats = 255; else if (repeats > 255) repeats = 254; } else // -1 means take from file (repeat is also stored there). repeats = -1; if (number_of_operands >= 4) routine = op[3]; } } } TRACE_LOG("Nr: %d, Effect: %d, Volume: %d, Repeats: %d, Routine: %d.\n", effect_number, effect, volume, repeats, routine); if (effect == 1) active_sound_interface->prepare_sound(effect_number, volume, repeats); else if (effect == 2) active_sound_interface->play_sound(effect_number,volume,repeats,routine); else if (effect == 3) active_sound_interface->stop_sound(effect_number); else if (effect == 4) active_sound_interface->finish_sound(effect_number); } } libfizmo-0.7.15/src/interpreter/misc.h0000644000175000017500000000364413153330674020037 0ustar chrenderchrender /* misc.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef misc_h_INCLUDED #define misc_h_INCLUDED #include "../tools/types.h" void opcode_restart(void); void opcode_verify(void); void opcode_piracy(void); void abort_interpreter(int exit_code, z_ucs *error_message); void init_signal_handlers(void); void deactivate_signal_handlers(void); #endif /* misc_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/blorb.h0000644000175000017500000000364613153330674020206 0ustar chrenderchrender /* blorb.h * * This file is part of fizmo. * * Copyright (c) 2011-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef blorb_h_INCLUDED #define blorb_h_INCLUDED #include "../blorb_interface/blorb_interface.h" #ifndef blorb_c_INCLUDED extern struct z_blorb_interface *active_blorb_interface; #endif // blorb_c_INCLUDED int get_v3_sound_loops_from_blorb_map(z_blorb_map *blorb_map, int resnum); #endif /* blorb_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/undo.c0000644000175000017500000001770113153330674020043 0ustar chrenderchrender /* undo.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef undo_c_INCLUDED #define undo_c_INCLUDED #include #include "../tools/tracelog.h" #include "../tools/types.h" #include "undo.h" #include "zpu.h" #include "variable.h" #include "fizmo.h" #include "stack.h" #include "config.h" struct undo_frame { uint8_t *dynamic_memory; uint8_t *pc; uint16_t *stack; int z_stack_size; int stack_words_from_active_routine; uint8_t number_of_locals_active; uint8_t number_of_locals_from_function_call; }; static int max_undo_steps = DEFAULT_MAX_UNDO_STEPS; static struct undo_frame** undo_frames = NULL; static int undo_index = 0; static void delete_undo_frame(struct undo_frame *frame) { if (frame != NULL) { if (frame->dynamic_memory != NULL) free(frame->dynamic_memory); if (frame->stack != NULL) free(frame->stack); free(frame); } } int set_max_undo_steps(int new_max_steps) { int ix; struct undo_frame** realloced_undo_frames; /* Free any existing frames beyond the new limit */ if (undo_index > new_max_steps) { for (ix=new_max_steps; ixdynamic_memory = NULL; result->stack = NULL; return result; } void opcode_save_undo(void) { size_t dynamic_memory_size; struct undo_frame *new_undo_frame; int result; size_t nof_stack_bytes_in_use; TRACE_LOG("Opcode: SAVE_UNDO.\n"); if (max_undo_steps <= 0) { result = 0; } else { if ( (undo_frames == NULL) && (set_max_undo_steps(max_undo_steps) != 0) ) { result = 0; } else { if ((new_undo_frame = create_new_undo_frame()) == NULL) { result = 0; } else { dynamic_memory_size = (size_t)( active_z_story->dynamic_memory_end - z_mem + 1 ); if ( (new_undo_frame->dynamic_memory = malloc(dynamic_memory_size)) == NULL) { delete_undo_frame(new_undo_frame); result = 0; } else { nof_stack_bytes_in_use = (z_stack_index - z_stack) * sizeof(uint16_t); if ((new_undo_frame->stack = (uint16_t*)malloc(nof_stack_bytes_in_use)) == NULL) { delete_undo_frame(new_undo_frame); result = 0; } else { if (undo_index == max_undo_steps) { delete_undo_frame(undo_frames[0]); memmove( undo_frames, undo_frames + 1, sizeof(struct undo_frame*) * (max_undo_steps - 1)); undo_index--; } memcpy( new_undo_frame->stack, z_stack, // non-null when size > 0 nof_stack_bytes_in_use); memcpy( new_undo_frame->dynamic_memory, z_mem, dynamic_memory_size); // new_undo_frame->pc is not allocated, no free required. new_undo_frame->pc = pc; new_undo_frame->z_stack_size = z_stack_index - z_stack; new_undo_frame->stack_words_from_active_routine = stack_words_from_active_routine; new_undo_frame->number_of_locals_active = number_of_locals_active; new_undo_frame->number_of_locals_from_function_call = number_of_locals_from_function_call; undo_frames[undo_index++] = new_undo_frame; result = 1; } } } } } read_z_result_variable(); set_variable(z_res_var, (uint16_t)result, false); } void opcode_restore_undo(void) { int result; size_t dynamic_memory_size; struct undo_frame *frame_to_restore; TRACE_LOG("Opcode: RESTORE_UNDO.\n"); if (undo_index > 0) { undo_index--; frame_to_restore = undo_frames[undo_index]; dynamic_memory_size = (size_t)( active_z_story->dynamic_memory_end - z_mem + 1 ); ensure_z_stack_size(frame_to_restore->z_stack_size); pc = frame_to_restore->pc; //current_z_stack_size = frame_to_restore->z_stack_size; //behind_z_stack = z_stack + current_z_stack_size; z_stack_index = z_stack + frame_to_restore->z_stack_size; stack_words_from_active_routine = frame_to_restore->stack_words_from_active_routine; number_of_locals_active = frame_to_restore->number_of_locals_active; number_of_locals_from_function_call = frame_to_restore->number_of_locals_from_function_call; local_variable_storage_index = z_stack_index - stack_words_from_active_routine - number_of_locals_active; memcpy( z_stack, // non-null when size > 0 frame_to_restore->stack, frame_to_restore->z_stack_size * sizeof(uint16_t)); //current_z_stack_size * sizeof(uint16_t)); memcpy( z_mem, frame_to_restore->dynamic_memory, dynamic_memory_size); delete_undo_frame(frame_to_restore); write_interpreter_info_into_header(); result = 2; } else { result = 0; } read_z_result_variable(); set_variable(z_res_var, (uint16_t)result, false); } size_t get_allocated_undo_memory_size(void) { int i = 0; size_t dynamic_memory_size = (size_t)( active_z_story->dynamic_memory_end - z_mem + 1 ); size_t result = ( sizeof(struct undo_frame*) * max_undo_steps ) + ( undo_index * (sizeof(struct undo_frame) + dynamic_memory_size) ); while (i < undo_index) result += undo_frames[i++]->z_stack_size * sizeof(uint16_t); return result; } void free_undo_memory(void) { if (undo_frames != NULL) { while (undo_index > 0) { undo_index--; delete_undo_frame(undo_frames[undo_index]); } free(undo_frames); undo_frames = NULL; } max_undo_steps = 0; } #endif /* undo_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/blockbuf.h0000644000175000017500000000566213153330674020675 0ustar chrenderchrender /* blockbuf.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef blockbuf_h_INCLUDED #define blockbuf_h_INCLUDED #include "../tools/types.h" struct blockbuf_char { z_ucs character; z_font font; z_style style; z_colour foreground_colour; z_colour background_colour; }; typedef struct { int width; int height; int xpos; int ypos; struct blockbuf_char *content; z_style current_style; z_font current_font; z_colour current_foreground_colour; z_colour current_background_colour; z_style default_style; z_font default_font; z_colour default_foreground_colour; z_colour default_background_colour; } BLOCKBUF; BLOCKBUF *create_blockbuffer(z_style default_style, z_font default_font, z_colour default_foreground_colour, z_colour default_background_colour); void destroy_blockbuffer(BLOCKBUF *blockbuffer); void store_z_ucs_output_in_blockbuffer(BLOCKBUF *buffer, z_ucs *z_ucs_output); void set_blockbuf_cursor(BLOCKBUF *buffer, int x, int y); void set_blockbuf_style(BLOCKBUF *buffer, z_style style); void set_blockbuf_foreground_colour(BLOCKBUF *buffer, z_colour new_colour); void set_blockbuf_background_colour(BLOCKBUF *buffer, z_colour new_colour); void set_blockbuf_font(BLOCKBUF *buffer, z_font font); void blockbuf_resize(BLOCKBUF *buffer, int new_width, int new_height); size_t count_allocated_blockbuf_memory(BLOCKBUF *buffer); #endif // blockbuf_h_INCLUDED libfizmo-0.7.15/src/interpreter/iff.h0000644000175000017500000000467713153330674017657 0ustar chrenderchrender /* iff.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef iff_h_INCLUDED #define iff_h_INCLUDED #include #include "../tools/types.h" #define IFF_MODE_READ 0 #define IFF_MODE_READ_SAVEGAME 1 #define IFF_MODE_WRITE 2 #define IFF_MODE_WRITE_SAVEGAME 3 bool detect_simple_iff_stream(z_file *iff_file); int init_empty_file_for_iff_write(z_file *file_to_init); z_file *open_simple_iff_file(char *filename, int mode); int start_new_chunk(char *id, z_file *iff_file); int end_current_chunk(z_file *iff_file); int close_simple_iff_file(z_file *iff_file); int find_chunk(char *id, z_file *iff_file); int read_chunk_length(z_file *iff_file); int get_last_chunk_length(); int write_four_byte_number(uint32_t number, z_file *iff_file); uint32_t read_four_byte_number(z_file *iff_file); char *read_form_type(z_file *iff_file); bool is_form_type(z_file *iff_file, char* form_type); #endif /* iff_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/text.c0000644000175000017500000022543213153330674020064 0ustar chrenderchrender /* text.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef text_c_INCLUDED #define text_c_INCLUDED #include #include #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "../tools/types.h" #include "../tools/z_ucs.h" #include "../tools/filesys.h" #include "text.h" #include "fizmo.h" #include "routine.h" #include "object.h" #include "zpu.h" #include "variable.h" #include "misc.h" #include "streams.h" #include "history.h" #include "fizmo.h" #include "mathemat.h" #include "stack.h" #include "config.h" #include "output.h" #include "savegame.h" #include "streams.h" #include "undo.h" #include "../locales/libfizmo_locales.h" #ifdef ENABLE_DEBUGGER #include "debugger.h" #endif // ENABLE_DEBUGGER #ifndef DISABLE_COMMAND_HISTORY #include "cmd_hst.h" #endif /* DISABLE_COMMAND_HISTORY */ static uint16_t zchar_storage_word = 0; static uint16_t zchar_storage_symbols_stored = 0; static uint8_t *zchar_storage_output = NULL; static uint8_t *zchar_storage_output_index = NULL; static uint8_t *zchar_storage_index_behind = NULL; static uint8_t zchar_storage_word_index = 0; static size_t interpreter_command_buffer_size = 0; z_ucs *interpreter_command_buffer = NULL; // The following two variables will keep track of the src pointer in // the various abbreviation depths. In case we return from processing // an abbreviation the last src pointer may be fetched here, or in case // the output buffer was full while decoding a Z-Char-encoded string, // we can continue decoding by using this data. static uint8_t *zchar_to_z_ucs_src_index[MAX_ABBREVIATION_DEPTH + 1]; static uint8_t zchar_to_z_ucs_current_alphabet[MAX_ABBREVIATION_DEPTH + 1]; static uint8_t zchar_to_z_ucs_current_z_char[MAX_ABBREVIATION_DEPTH + 1]; static uint8_t zchar_to_z_ucs_multibyte_stage[MAX_ABBREVIATION_DEPTH + 1]; static uint8_t zchar_to_z_ucs_multi_z_char[MAX_ABBREVIATION_DEPTH + 1]; static int zchar_to_z_ucs_abbreviation_level; static uint32_t number_of_commands = 0; static uint8_t first_word_found; static z_ucs z_ucs_output_buffer[Z_UCS_OUTPUT_BUFFER_SIZE]; z_ucs z_ucs_newline_string[] = { Z_UCS_NEWLINE, 0 }; #ifndef DISABLE_PREFIX_COMMANDS static char fizmo_command_prefix_string[] = { FIZMO_COMMAND_PREFIX, '\0' }; #endif // DISABLE_PREFIX_COMMANDS uint8_t alphabet_table_v1[] = { // A0: 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, // A1: 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, // A2: 0x00, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2e, 0x2c, 0x21, 0x3f, 0x5f, 0x23, 0x27, 0x22, 0x2f, 0x5c, 0x3c, 0x2d, 0x3a, 0x28, 0x29 }; uint8_t alphabet_table_after_v1[] = { // A0: 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, // A1: 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, // A2: 0x00, 0x0d, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2e, 0x2c, 0x21, 0x3f, 0x5f, 0x23, 0x27, 0x22, 0x2f, 0x5c, 0x2d, 0x3a, 0x28, 0x29 }; static uint8_t default_extra_char_to_unicode_table[] = { 69, 0x00, 0xe4, 0x00, 0xf6, 0x00, 0xfc, 0x00, 0xc4, 0x00, 0xd6, 0x00, 0xdc, 0x00, 0xdf, 0x00, 0xbb, 0x00, 0xab, 0x00, 0xeb, 0x00, 0xef, 0x00, 0xff, 0x00, 0xcb, 0x00, 0xcf, 0x00, 0xe1, 0x00, 0xe9, 0x00, 0xed, 0x00, 0xf3, 0x00, 0xfa, 0x00, 0xfd, 0x00, 0xc1, 0x00, 0xc9, 0x00, 0xcd, 0x00, 0xd3, 0x00, 0xda, 0x00, 0xdd, 0x00, 0xe0, 0x00, 0xe8, 0x00, 0xec, 0x00, 0xf2, 0x00, 0xf9, 0x00, 0xc0, 0x00, 0xc8, 0x00, 0xcc, 0x00, 0xd2, 0x00, 0xd9, 0x00, 0xe2, 0x00, 0xea, 0x00, 0xee, 0x00, 0xf4, 0x00, 0xfb, 0x00, 0xc2, 0x00, 0xca, 0x00, 0xce, 0x00, 0xd4, 0x00, 0xdb, 0x00, 0xe5, 0x00, 0xc5, 0x00, 0xf8, 0x00, 0xd8, 0x00, 0xe3, 0x00, 0xf1, 0x00, 0xf5, 0x00, 0xc3, 0x00, 0xd1, 0x00, 0xd5, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0xe7, 0x00, 0xc7, 0x00, 0xfe, 0x00, 0xf0, 0x00, 0xde, 0x00, 0xd0, 0x00, 0xa3, 0x01, 0x53, 0x01, 0x52, 0x00, 0xa1, 0x00, 0xbf }; // This function must be called prior to zchar_storage_write calls. // - uint8_t *output: The output buffer that's supposed to hold the result. // The maximum supported output buffer size is 2^16 = 65536 bytes. // - uint16_t output_buffer_size: The maximum size that the output buffer // can hold. The size should be a multiple of 2 (we have to store words), // in case it's not, the last byte of the output buffer won't be used. static void zchar_storage_start(uint8_t *output, uint16_t output_buffer_size) { zchar_storage_word = 0; zchar_storage_output = output; zchar_storage_output_index = output; zchar_storage_index_behind = output + (output_buffer_size & 0xfffe); zchar_storage_word_index = 0; zchar_storage_symbols_stored = 0; } // This method will accept input for the zchar_storage. // - unsigned int five_bits: Ths input bits are expected to be stored in the // lower five bits of this parameter. // - Return value: // * 0 in case there is at least space for one more zchar in the buffer. // * 1 in case no more zchars may be written to the current buffer. In // this case, the output should be read, stored away, and after that // the zchar_storage_reset method should be called. // * -1 in case the given five_bits could not be stored. These will be lost. static int zchar_storage_write(unsigned int five_bits) { if (zchar_storage_output_index >= zchar_storage_index_behind) { TRACE_LOG("zchar_storage_write ran out of space.\n"); return -1; } five_bits &= 0x1f; TRACE_LOG("zchar: Storing five bits %x.\n", five_bits); if (zchar_storage_word_index == 0) zchar_storage_word |= (five_bits << 10); else if (zchar_storage_word_index == 1) zchar_storage_word |= (five_bits << 5); else zchar_storage_word |= five_bits; zchar_storage_symbols_stored++; if (++zchar_storage_word_index == 3) { TRACE_LOG("zchar: storing word %x at %p, end at %p.\n", zchar_storage_word, zchar_storage_output_index, zchar_storage_index_behind); store_word(zchar_storage_output_index, zchar_storage_word); zchar_storage_output_index += 2; zchar_storage_word = 0; zchar_storage_word_index = 0; } if (zchar_storage_output_index >= zchar_storage_index_behind) { TRACE_LOG("No more space remains for zchar-storage.\n"); return 1; } else { TRACE_LOG("Space remains for zchar-storage.\n"); return 0; } } // This function will throw away the contents of the Z-Char output buffer // and empty the word that's currently assembled. This is used in case // the output buffer is full (zchar_storage_write returns 1). In this case // the buffer may be emptied and storage may continue by calling this // function. // PLEASE NOTE: In case the output is supposed to be finished directly // after filling up the buffer, the zchar_storage_finish has to be // called directly after the last write call. If you receive a 1 from the // zchar_storage_write function, empty and reset the output buffer and // call the zchar_storage_finish function after that, the output will // contain an extra empty padding word. Technically it should be okay though, // the spec says that an "indefinite sequence of shift and shift lock // characters is legal" (section 3.2.4). void zchar_storage_reset() { zchar_storage_output_index = zchar_storage_output; zchar_storage_word = 0; zchar_storage_word_index = 0; zchar_storage_symbols_stored = 0; } static void zchar_storage_clear() { zchar_storage_word = 0; zchar_storage_output = NULL; zchar_storage_output_index = NULL; zchar_storage_index_behind = NULL; zchar_storage_word_index = 0; zchar_storage_symbols_stored = 0; } // This function will finish the current Z-Char-String in production by // setting bit 15 on the last word, padding it with 5s if required and // storing it in the output buffer. // Return value: // -0 In case there was still enough space and string finalization succeeded. // -1 in case there was not enough buffer storage to write the string. static int zchar_storage_finish() { TRACE_LOG("zchar_storage_word_index: %d.\n", zchar_storage_word_index); if (zchar_storage_word_index == 0) { // In case we arrive here, there's no output in the current word. We'll // check if there's any output already stored in the output buffer. if (zchar_storage_output_index != zchar_storage_output) { // In case there's some output, write the string termination to the // last word of the output. TRACE_LOG("Successfully finalized full word.\n"); *(zchar_storage_output_index-2) |= 0x80; } else { // In case the buffer is completely empty, write an empty word // padded with 5s and terminated with bit 15 set. if (zchar_storage_output_index >= zchar_storage_index_behind) { TRACE_LOG("zchar_storage_finish ran out of space.\n"); return -1; } TRACE_LOG("zchar: storing word %x at %x.\n", zchar_storage_word, 0x94a5); store_word(zchar_storage_output, 0x94a5); } } else { // In case the current word has some content, we'll just have pad it // up with 5s and store it. if (zchar_storage_output_index >= zchar_storage_index_behind) { TRACE_LOG("zchar_storage_finish ran out of space.\n"); return -1; } if (zchar_storage_word_index == 1) zchar_storage_word |= (5 << 5); zchar_storage_word |= 0x8005; TRACE_LOG("zchar: storing word %x at %x.\n", zchar_storage_word, zchar_storage_output_index); store_word(zchar_storage_output_index, zchar_storage_word); } return 0; } static void store_ZSCII_as_zchar(zscii zscii_char) { uint8_t i; if (active_z_story == NULL) return; if (zscii_char == 32) { (void)zchar_storage_write(0); return; } for (i=0; i<78; i++) if (active_z_story->alphabet_table[i] == zscii_char) break; if (i < 26) (void)zchar_storage_write((unsigned)(i + 6)); else if (i < 52) { (void)zchar_storage_write(4); (void)zchar_storage_write((unsigned)(i - 20)); } else if (i < 78) { (void)zchar_storage_write(5); (void)zchar_storage_write((unsigned)(i - 46)); } else { /* 1-7 ---- 8 delete Input 9 tab (V6) Output 10 ---- 11 sentence space (V6) Output 12 ---- 13 newline Input/Output 14-26 ---- 27 escape Input 28-31 ---- 32-126 standard ASCII Input/Output 127-128 ---- 129-132 cursor u/d/l/r Input 133-144 function keys f1 to f12 Input 145-154 keypad 0 to 9 Input 155-251 extra characters Input/Output 252 menu click (V6) Input 253 double-click (V6) Input 254 single-click Input 255-1023 ---- */ if ( (zscii_char == 8) || // delete //(zscii_char == 13) || // newline (?) (zscii_char == 27) || // escape // 32 has already been handeled at the start of this function. ((zscii_char >= 33) && (zscii_char <= 126)) || //standard ASCII //((zscii_char >= 129) && (zscii_char <= 132)) || //crsr u/d/l/r //((zscii_char >= 133) && (zscii_char <= 144)) || //f1-f12 //((zscii_char >= 145) && (zscii_char <= 154)) || //keypad 0-9 ((zscii_char >= 155) && (zscii_char <= 251)) // || //extra chars //(zscii_char == 252) // menu click(V6) //(zscii_char == 253) // double click(V6) //(zscii_char == 254) // single click(V6) ) { //store_z_char(active_z_story->alphabet_table[52]); //store_z_char((zscii_char & 0xe0) >> 5); //store_z_char(zscii_char & 0x1f); // Wrong: never used. //zchar_storage_write(active_z_story->alphabet_table[52]); (void)zchar_storage_write(5); (void)zchar_storage_write(6); (void)zchar_storage_write((unsigned)((zscii_char & 0xe0) >> 5)); (void)zchar_storage_write((unsigned)(zscii_char & 0x1f)); } else i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_UNKNOWN_CHAR_CODE_P0D, -1, (long int)zscii_char); } } /*@dependent@*/ static uint8_t *get_current_unicode_table_address() { // 3.8.5.2: In Version 5 or later, if Word 3 of the header extension // table is present and non-zero then it is interpreted as the byte // address of the Unicode translation table. // if ( (ver < 5) || (header_extension_table_size < 3) || (load_word(header_extension_table + 0x6) == 0) ) { return default_extra_char_to_unicode_table; } else { return z_mem + load_word(header_extension_table + 0x6); } } static z_ucs zscii_extra_char_to_unicode(zscii zscii_extra_char) { uint8_t *unicode_table = get_current_unicode_table_address(); uint8_t table_index = zscii_extra_char - 155; TRACE_LOG("Extra-char-translation: %d, %p, %d.\n", *unicode_table - 1, unicode_table, table_index); if (table_index > *unicode_table - 1) { TRACE_LOG("too large\n"); return latin1_char_to_zucs_char('?'); } else return (z_ucs)load_word(unicode_table + 1 + (table_index * 2)); } static zscii find_zscii_extra_char_in_unicode_table(uint16_t unicode_char) { uint8_t *unicode_table = get_current_unicode_table_address(); uint8_t *unicode_data = unicode_table + 1; int number_of_table_entries = (int)(*unicode_table - 1); int table_index = 0; TRACE_LOG("Looking for extra-char %d in unicode table.\n", unicode_char); while (table_index <= number_of_table_entries) { if (load_word(unicode_data + (table_index * 2)) == unicode_char) return (zscii)(table_index + 155); table_index++; } return 0xff; } zscii unicode_char_to_zscii_input_char(z_ucs unicode_char) { zscii result; if (unicode_char == 8) result = 8; else if (unicode_char == 10) result = 13; else if (unicode_char == 13) result = 13; else if (unicode_char == 27) result = 27; else if ((unicode_char >= 32) && (unicode_char <= 126)) result = (uint8_t)unicode_char; else { // In case we haven't found out input yet, there's still a change that // this unicode character has been defined in the translation table, thus // we try to look it up there. result = find_zscii_extra_char_in_unicode_table(unicode_char); } return result; } // This will write into(!) the provided textbuffer! static uint8_t locate_dictionary_entry( uint8_t *text_buffer, uint8_t **parse_position, uint8_t word_position, uint8_t token_length, uint8_t *dictionary_start, int16_t number_of_dictionary_entries, uint8_t dictionary_entry_length, bool dictionary_is_unsorted, bool dont_write_unrecognized_words_to_parse_buffer) { uint8_t *dictionary_index = dictionary_start; uint16_t i,j; uint16_t word_length; int16_t word_found_at_index = -1; int search_mid_index, search_end_index; // "Dictionarize" entry. if (ver >= 4) { word_length = 6; if ((text_buffer[0] & 0x80) != 0) { text_buffer[0] &= 0x7f; store_word(text_buffer + 2, 0x14a5); store_word(text_buffer + 4, 0x94a5); } else if ((text_buffer[2] & 0x80) != 0) { text_buffer[2] &= 0x7f; store_word(text_buffer + 4, 0x94a5); } else if ((text_buffer[4] & 0x80) == 0) { text_buffer[4] |= 0x80; } } else { word_length = 4; if ((text_buffer[0] & 0x80) != 0) { text_buffer[0] &= 0x7f; store_word(text_buffer + 2, 0x94a5); } else if ((text_buffer[2] & 0x80) == 0) { text_buffer[2] |= 0x80; } } TRACE_LOG("dict-start: %x\n", dictionary_start - z_mem); if (dictionary_is_unsorted == true) { for (i=0; i= 4 ? 9 : 6; uint8_t tokenize_buffer_length = ver >= 4 ? 6 : 4; uint8_t tokenize_buffer[tokenize_buffer_length]; // The number and values of non-space-seperating input codes: uint8_t number_of_input_codes; uint8_t *input_codes; uint8_t dictionary_entry_length; int16_t number_of_dictionary_entries; bool dictionary_is_unsorted; uint8_t *dictionary_start; uint8_t current_char; uint8_t space_found = 0; uint8_t non_space_seperator_found = 0; uint8_t end_of_line_found; uint8_t maximum_words; uint8_t number_of_words_found = 0; uint8_t current_word_start = z_text_buffer_offset; uint8_t *parse_buffer_index = z_parse_buffer + 2; uint8_t i; TRACE_LOG("Parse buffer at %lx, %d bytes for tokenize_buffer at %x.\n", (unsigned long int)(z_parse_buffer - z_mem), tokenize_buffer_length, &tokenize_buffer); maximum_words = *z_parse_buffer; parse_buffer_index = z_parse_buffer + 2; TRACE_LOG("Maximum number of parsed words: %d.\n", maximum_words); number_of_input_codes = *(dictionary++); input_codes = dictionary; dictionary += number_of_input_codes; dictionary_entry_length = *(dictionary++); number_of_dictionary_entries = (int16_t)load_word(dictionary); TRACE_LOG("Number of dictionary entries: %d.\n", number_of_dictionary_entries); if (number_of_dictionary_entries < 0) { dictionary_is_unsorted = true; number_of_dictionary_entries = -number_of_dictionary_entries; } else { dictionary_is_unsorted = false; } dictionary_start = dictionary + 2; #ifdef ENABLE_TRACING TRACE_LOG("Number of input codes: %d.\n", number_of_input_codes); for (i=0; i= 5) && (z_text_buffer_offset -2 == input_length) ) ) end_of_line_found = 1; else if (current_char == 32) space_found = 1; else for (i=0; i 0) { zchar_storage_finish(); number_of_words_found++; locate_dictionary_entry( tokenize_buffer, &parse_buffer_index, current_word_start, z_text_buffer_offset - current_word_start, dictionary_start, number_of_dictionary_entries, dictionary_entry_length, dictionary_is_unsorted, dont_write_unrecognized_words_to_parse_buffer); zchar_storage_start(tokenize_buffer, tokenize_buffer_length); } space_found = 0; current_word_start = z_text_buffer_offset + 1; } else if (non_space_seperator_found == 1) { // Non-space-seperator are a bit more work, since they also count // as a single word. So we stop the current word and after that, // initiate a new one containing only the current char. //if (z_symbols_stored > 0) if (zchar_storage_symbols_stored > 0) { zchar_storage_finish(); if (++number_of_words_found == maximum_words) break; locate_dictionary_entry(tokenize_buffer, &parse_buffer_index, current_word_start, z_text_buffer_offset - current_word_start, dictionary_start, number_of_dictionary_entries, dictionary_entry_length, dictionary_is_unsorted, dont_write_unrecognized_words_to_parse_buffer); zchar_storage_start(tokenize_buffer, tokenize_buffer_length); } // No length check for dictionary_word_length required, since we // either just started a new zchar_storage above, or otherwise // zchar_storage_symbols_stored == 0 due to if above. store_ZSCII_as_zchar(current_char); zchar_storage_finish(); number_of_words_found++; locate_dictionary_entry( tokenize_buffer, &parse_buffer_index, z_text_buffer_offset, 1, dictionary_start, number_of_dictionary_entries, dictionary_entry_length, dictionary_is_unsorted, dont_write_unrecognized_words_to_parse_buffer); zchar_storage_start(tokenize_buffer, tokenize_buffer_length); non_space_seperator_found = 0; current_word_start = z_text_buffer_offset + 1; } else if (end_of_line_found == 1) { zchar_storage_finish(); if (zchar_storage_symbols_stored != 0) { TRACE_LOG("%x / %x / %d / %d\n", tokenize_buffer, parse_buffer_index, current_word_start, z_text_buffer_offset); number_of_words_found++; locate_dictionary_entry( tokenize_buffer, &parse_buffer_index, current_word_start, z_text_buffer_offset - current_word_start, dictionary_start, number_of_dictionary_entries, dictionary_entry_length, dictionary_is_unsorted, dont_write_unrecognized_words_to_parse_buffer); } } else { TRACE_LOG("Symbols stored: %d.\n", zchar_storage_symbols_stored); if (zchar_storage_symbols_stored < dictionary_word_length) store_ZSCII_as_zchar(current_char); else { TRACE_LOG("Maximum word length %d reached.\n", dictionary_word_length); } } z_text_buffer_offset++; } zchar_storage_clear(); TRACE_LOG("Found %d word(s), storing %d to %lx.\n", number_of_words_found, number_of_words_found, (unsigned long int)(z_parse_buffer + 1 - z_mem)); z_parse_buffer[1] = number_of_words_found; } // - z_ucs *z_ucs_dest: A pointer to the output buffer. // - uint16_t z_ucs_dest_length: The size of the output buffer. // - uint8_t *zscii_src: Pointer to source data. In case it is NULL, // it means continue processing where we left off last time because // if buffer size constraints (see below). // - Return value: // * The pointer to the byte behind the zscii_src, in case there was // enough space in z_ucs_dest to write everthing into that buffer, // * NULL in case the string could not be decoded completely due to // buffer size constraints. In this case, simply call zchar_to_z_ucs // again with zscii_src == NULL after clearing the buffer to continue // decoding. /*@temp@*/ /*@null@*/ static uint8_t *zchar_to_z_ucs( z_ucs *z_ucs_dest, uint16_t z_ucs_dest_length, uint8_t *zchar_src) { z_ucs *z_ucs_dest_index = z_ucs_dest; z_ucs *z_ucs_dest_last_valid_index = z_ucs_dest + z_ucs_dest_length - 1; uint16_t current_three_zchars; uint8_t current_zchar; uint8_t current_alphabet; uint8_t next_char_alphabet = 0; uint8_t abbreviation_block = 0xff; uint8_t *abbreviation_entry; uint8_t i; uint16_t output_data = 0; // init to inhibit compiler warning int output_data_ready = 0; // zchar-processing is not possible with a z-story for the abbreviation // decoding. if (active_z_story == NULL) return NULL; // In case we continue processing an old string which was interrupted // due to a full output buffer, we keep the current source-indices. // Else, we initialize the source information. if (zchar_src == NULL) { zchar_src = zchar_to_z_ucs_src_index[zchar_to_z_ucs_abbreviation_level]; current_alphabet = zchar_to_z_ucs_current_alphabet[zchar_to_z_ucs_abbreviation_level]; i = zchar_to_z_ucs_current_z_char[zchar_to_z_ucs_abbreviation_level]; } else { zchar_to_z_ucs_abbreviation_level = 0; zchar_to_z_ucs_multibyte_stage[0] = 0; current_alphabet = 0; i = 0; } TRACE_LOG("Starting conversion at %p, abbrlevel:%d, char[%d/3].\n", zchar_src, zchar_to_z_ucs_abbreviation_level, i); current_three_zchars = load_word(zchar_src); while ( ((current_three_zchars & 0x8000) == 0) || (zchar_to_z_ucs_abbreviation_level > 0) || (i != 3)) { TRACE_LOG("%p / %p / %p.\n", z_ucs_dest, z_ucs_dest_index, z_ucs_dest_last_valid_index); // Check if we're at a position in the output buffer that will accept // at least one more character. if (z_ucs_dest_index == z_ucs_dest_last_valid_index) { // If there is no more space in the output buffer, we'll store all // current source-index information and return NULL as an indication // that there's more input waiting to be processed. zchar_to_z_ucs_src_index[zchar_to_z_ucs_abbreviation_level] = zchar_src; zchar_to_z_ucs_current_alphabet[zchar_to_z_ucs_abbreviation_level] = current_alphabet; TRACE_LOG("(1:%d)\n", zchar_to_z_ucs_current_z_char[zchar_to_z_ucs_abbreviation_level]); zchar_to_z_ucs_current_z_char[zchar_to_z_ucs_abbreviation_level] = i; TRACE_LOG("(2:%d)\n", zchar_to_z_ucs_current_z_char[zchar_to_z_ucs_abbreviation_level]); TRACE_LOG("dest-index: %p / czc: %p/%p\n", z_ucs_dest_index, &(zchar_to_z_ucs_current_z_char[0]), &(zchar_to_z_ucs_current_z_char[1])); *z_ucs_dest_index = 0; TRACE_LOG("(3:%d)\n", zchar_to_z_ucs_current_z_char[zchar_to_z_ucs_abbreviation_level]); TRACE_LOG("Interrupted conversion at %p, abbrlevel %d, [%d->%d/3].\n", zchar_src, zchar_to_z_ucs_abbreviation_level, i, zchar_to_z_ucs_current_z_char[zchar_to_z_ucs_abbreviation_level]); return NULL; } if (((current_three_zchars & 0x8000) != 0) && (i == 3)) { // Here we're finishing an abbreviation (since the complete end-of-string // case is handeled in the loop's while condition) zchar_to_z_ucs_abbreviation_level--; zchar_src = zchar_to_z_ucs_src_index[zchar_to_z_ucs_abbreviation_level]; current_alphabet =zchar_to_z_ucs_current_alphabet[zchar_to_z_ucs_abbreviation_level]; current_three_zchars = load_word(zchar_src); i = zchar_to_z_ucs_current_z_char[zchar_to_z_ucs_abbreviation_level] + 1; next_char_alphabet = 0; // Re-start to check if we're already at the end of the string. continue; } if (i == 3) { // Read the next three Z-Chars from the input. zchar_src += 2; current_three_zchars = load_word(zchar_src); i = 0; } current_zchar = (current_three_zchars & (0x7c00 >> (i*5))) >> ((2-i)*5); TRACE_LOG("Current Z-Char: %d.\n", current_zchar); TRACE_LOG("Abbreviation-level: %d.\n", zchar_to_z_ucs_abbreviation_level); TRACE_LOG("%d/%d/%d/%d\n", ver, current_zchar, current_alphabet, current_zchar); if (abbreviation_block != 0xff) { if (zchar_to_z_ucs_abbreviation_level + 1 > MAX_ABBREVIATION_DEPTH) (void)i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_MAXIMUM_ABBREVIATION_DEPTH_IS_P0D, -1, (long int)MAX_ABBREVIATION_DEPTH); zchar_to_z_ucs_src_index[zchar_to_z_ucs_abbreviation_level] = zchar_src; zchar_to_z_ucs_current_z_char[zchar_to_z_ucs_abbreviation_level] = i; // Remember that the current position has been processed. zchar_to_z_ucs_current_alphabet[zchar_to_z_ucs_abbreviation_level] = current_alphabet; // In case we're processing an abbreviation, calculate the location // of the abbreviation address in the abbreviation table. abbreviation_entry = active_z_story->abbreviations_table + (((abbreviation_block << 5) + current_zchar) << 1); current_alphabet = 0; zchar_src = z_mem + load_word(abbreviation_entry) * 2; current_three_zchars = load_word(zchar_src); i = 0; zchar_to_z_ucs_abbreviation_level++; zchar_to_z_ucs_multibyte_stage[zchar_to_z_ucs_abbreviation_level] = 0; abbreviation_block = 0xff; } else if ( zchar_to_z_ucs_multibyte_stage[zchar_to_z_ucs_abbreviation_level] == 1) { // If we arrive here, we have to read the first part, the higher // five bits of the final ten-bit-code. zchar_to_z_ucs_multi_z_char[zchar_to_z_ucs_abbreviation_level] = (current_zchar << 5); // After reading, we'll store the information that in the next // iteration we'll have to process the lower five bits. zchar_to_z_ucs_multibyte_stage[zchar_to_z_ucs_abbreviation_level] = 2; i++; } else if ( zchar_to_z_ucs_multibyte_stage[zchar_to_z_ucs_abbreviation_level] == 2) { // In case we're in stage 2, we read the lower five bits. output_data = zchar_to_z_ucs_multi_z_char[zchar_to_z_ucs_abbreviation_level] | current_zchar; //TRACE_LOG("Multibyte-output-data: %x '%c'.\n",output_data,output_data); // After that, we'll reset the multibyte-processing-stage to 0. zchar_to_z_ucs_multibyte_stage[zchar_to_z_ucs_abbreviation_level] = 0; output_data_ready = 1; i++; } else if ((next_char_alphabet == 2) && (current_zchar == 6)) { zchar_to_z_ucs_multibyte_stage[zchar_to_z_ucs_abbreviation_level] = 1; i++; } else if (current_zchar == 0) { output_data_ready = 1; output_data = 32; i++; } else if ( ((ver == 1) && (current_zchar == 1)) || ( ( (current_zchar == 7) && ( ( (zchar_to_z_ucs_multibyte_stage[zchar_to_z_ucs_abbreviation_level] != 0) && (current_alphabet == 2) ) || ( (zchar_to_z_ucs_multibyte_stage[zchar_to_z_ucs_abbreviation_level] ==0) && (next_char_alphabet == 2) ) ) ) ) ) { // The upper line is for version 1, the lower for custom alphabets // (see 3.5.5.1). output_data_ready = 1; output_data = 13; i++; } else if ((ver <= 2) && (current_zchar == 4)) { if (++current_alphabet == 3) current_alphabet = 0; next_char_alphabet = current_alphabet; i++; } else if ((ver <= 2) && (current_zchar == 5)) { if (--current_alphabet == 255) current_alphabet = 2; next_char_alphabet = current_alphabet; i++; } else if (((ver <= 2) && (current_zchar == 2)) || ((ver > 2) && (current_zchar == 4))) { if (++next_char_alphabet == 3) next_char_alphabet = 0; i++; } else if (((ver <= 2) && (current_zchar == 3)) || ((ver > 2) && (current_zchar == 5))) { if (--next_char_alphabet == 255) next_char_alphabet = 2; i++; } else if (((ver >= 3) && ((current_zchar==1)||(current_zchar==2)||(current_zchar==3))) || ((ver == 2) && ((current_zchar == 1)))) { abbreviation_block = current_zchar - 1; i++; } else if (current_zchar >= 6) { output_data_ready = 1; output_data = (active_z_story->alphabet_table + (next_char_alphabet * 26))[current_zchar - 6]; i++; } else i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_UNKNOWN_ERROR_CASE, -1); if (output_data_ready != 0) { /*@-usedef@*/ *z_ucs_dest_index = zscii_output_char_to_z_ucs(output_data); /*@+usedef@*/ z_ucs_dest_index++; //TRACE_LOG("output-data: %d.\n", output_data); //TRACE_LOG("output-ptr: %x.\n", z_ucs_dest_index); //zscii_char_to_z_ucs(&z_ucs_dest_index, output_data); //TRACE_LOG("output-ptr: %x.\n", z_ucs_dest_index); output_data_ready = 0; if (next_char_alphabet != current_alphabet) next_char_alphabet = current_alphabet; } } *z_ucs_dest_index = 0; TRACE_LOG("Finished conversion at %p.\n", zchar_src); return zchar_src + 2; } /*@dependent@*/ static uint8_t *output_zchar_to_streams(uint8_t *zchar_src) { TRACE_LOG("Converting zchars from %lx.\n", (unsigned long int)(zchar_src - z_mem)); do { zchar_src = zchar_to_z_ucs( z_ucs_output_buffer, Z_UCS_OUTPUT_BUFFER_SIZE, zchar_src); TRACE_LOG("zchar-src %p, mbstage: %d, currentchar: %d, abbrlevel %d\n", zchar_to_z_ucs_src_index[zchar_to_z_ucs_abbreviation_level], zchar_to_z_ucs_multibyte_stage[zchar_to_z_ucs_abbreviation_level], zchar_to_z_ucs_current_z_char[zchar_to_z_ucs_abbreviation_level], zchar_to_z_ucs_abbreviation_level); (void)streams_z_ucs_output(z_ucs_output_buffer); } while (zchar_src == NULL); return zchar_src; } void opcode_tokenise(void) { uint8_t *dictionary_table = active_z_story->dictionary_table; bool dont_write_unrecognized_words_to_parse_buffer = false; int offset = (ver >= 5 ? 2 : 1); size_t string_length; TRACE_LOG("Opcode: TOKENISE.\n"); if (number_of_operands > 2) { if (op[2] != 0) dictionary_table = z_mem + op[2]; if ((number_of_operands > 3) && (op[3] != 0)) { dont_write_unrecognized_words_to_parse_buffer = true; } } if (ver < 5) string_length = strlen((char*)(z_mem + op[0] + offset)); else string_length = *(z_mem + op[0] + 1); TRACE_LOG("Offset: %d.\n", offset); TRACE_LOG("dont_write_unrecognized_words_to_parse_buffer: %d.\n", dont_write_unrecognized_words_to_parse_buffer); TRACE_LOG("Offset: %d.\n", offset); TRACE_LOG("String length: %d.\n", (int)string_length); tokenise( z_mem + op[0], (uint8_t)offset, string_length, z_mem + op[1], dictionary_table, dont_write_unrecognized_words_to_parse_buffer); } void display_status_line(void) { uint16_t current_room_object; if (active_interface->is_status_line_available() == false) return; current_room_object = get_variable(0x10, false); if (current_room_object != 0) (void)zchar_to_z_ucs( z_ucs_output_buffer, Z_UCS_OUTPUT_BUFFER_SIZE, (get_objects_property_table(get_variable(0x10, false))) + 1); else *z_ucs_output_buffer = 0; active_interface->show_status( z_ucs_output_buffer, (int)active_z_story->score_mode, get_variable(0x11, false), get_variable(0x12, false)); } z_ucs zscii_input_char_to_z_ucs(zscii zscii_input) { // The result will fit into a 16 bit-wide space, since the Z-Spec 1.0 // only defines 16-bit unicode characters. z_ucs result = -1; // init to inhibit compiler warning TRACE_LOG("Converting ZSCII-Input(!)-Char %d to UCS-4.\n", zscii_input); if (zscii_input == 0) result = (z_ucs)0; else if (zscii_input == 8) result = (z_ucs)8; // Delete else if (zscii_input == 13) result = Z_UCS_NEWLINE; else if (zscii_input == 27) result = (z_ucs)27; // Escape else if ((zscii_input >= 32) && (zscii_input <= 126)) result = (z_ucs)zscii_input; // Identical to ASCII in this range. else if ((zscii_input >= 129) && (zscii_input <= 154)) result = (z_ucs)zscii_input; // cursor, f1-f12, keypad else if ((zscii_input >= 155) && (zscii_input <= 251)) result = zscii_extra_char_to_unicode(zscii_input); else if ((zscii_input >= 252) && (zscii_input <= 254)) result = (z_ucs)zscii_input; // mouse-clicks else i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INVALID_ZSCII_INPUT_CODE_P0D, -1, (long)zscii_input); TRACE_LOG("Result: %d.\n", (unsigned)result); return result; } bool is_valid_zscii_output_char(zscii zscii_output) { if ( (zscii_output == 0) || (zscii_output == 9) || (zscii_output == 11) || (zscii_output == 13) || ( (zscii_output >= 32) && (zscii_output <= 126) ) || ( (zscii_output >= 155) && (zscii_output <= 251) ) ) return true; else return false; } z_ucs zscii_output_char_to_z_ucs(zscii zscii_output) { z_ucs result = -1; // init for compiler warning TRACE_LOG("Converting ZSCII-Output(!)-Char %d to UCS-4.\n", zscii_output); if (zscii_output == 0) result = 0; else if (zscii_output == 9) result = latin1_char_to_zucs_char('\t'); else if (zscii_output == 11) result = latin1_char_to_zucs_char('.'); else if (zscii_output == 13) result = Z_UCS_NEWLINE; else if ((zscii_output >= 32) && (zscii_output <= 126)) result = (z_ucs)zscii_output; // Identical to ASCII in this range. else if ((zscii_output >= 155) && (zscii_output <= 251)) result = zscii_extra_char_to_unicode(zscii_output); else i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INVALID_ZSCII_OUTPUT_CODE_P0D, -1, (long)zscii_output); TRACE_LOG("Result: %d.\n", (unsigned)result); return result; } void opcode_print_paddr(void) { uint32_t unpacked_address = get_packed_string_address(op[0]); TRACE_LOG("Opcode: PRINT_PADDR.\n"); TRACE_LOG("Printing string at %x.\n", (unsigned)unpacked_address); (void)output_zchar_to_streams(z_mem + unpacked_address); } void opcode_print_num(void) { char number[7]; // '-' + 32768 + '\0', 7 chars are okay. TRACE_LOG("Opcode: PRINT_NUM.\n"); /*@-bufferoverflowhigh@*/ sprintf(number, "%d", (int16_t)op[0]); /*@+bufferoverflowhigh@*/ (void)streams_latin1_output(number); } void opcode_print_char(void) { z_ucs *output_buffer_index = z_ucs_output_buffer; TRACE_LOG("Opcode: PRINT_CHAR.\n"); // FIXME: Workaround for Beyond Zork if (is_valid_zscii_output_char(op[0]) == false) return; *output_buffer_index = zscii_output_char_to_z_ucs(op[0]); output_buffer_index++; *output_buffer_index = 0; (void)streams_z_ucs_output(z_ucs_output_buffer); } void opcode_print(void) { TRACE_LOG("Opcode: PRINT.\n"); pc = output_zchar_to_streams(pc); } void opcode_new_line(void) { TRACE_LOG("Opcode: NEW_LINE.\n"); (void)streams_latin1_output("\n"); } #ifndef DISABLE_PREFIX_COMMANDS static bool process_interpreter_command() { z_ucs *prefixed_command; char *ptr; int i; char **interface_options; TRACE_LOG("Checking for interpreter-command '"); TRACE_LOG_Z_UCS(interpreter_command_buffer); TRACE_LOG("'.\n"); if (*interpreter_command_buffer != latin1_char_to_zucs_char( FIZMO_COMMAND_PREFIX)) return false; prefixed_command = interpreter_command_buffer + 1; if (z_ucs_cmp_latin1(prefixed_command, "help") == 0) { (void)streams_latin1_output("\n"); (void)i18n_translate(libfizmo_module_name,i18n_libfizmo_VALID_COMMANDS_ARE); (void)streams_latin1_output("\n"); (void)streams_latin1_output(fizmo_command_prefix_string); (void)streams_latin1_output("help\n"); (void)streams_latin1_output(fizmo_command_prefix_string); (void)streams_latin1_output("info\n"); (void)streams_latin1_output(fizmo_command_prefix_string); (void)streams_latin1_output("predictable\n"); (void)streams_latin1_output(fizmo_command_prefix_string); (void)streams_latin1_output("recstart\n"); (void)streams_latin1_output(fizmo_command_prefix_string); (void)streams_latin1_output("recstop\n"); (void)streams_latin1_output(fizmo_command_prefix_string); (void)streams_latin1_output("fileinput\n"); (void)streams_latin1_output(fizmo_command_prefix_string); (void)streams_latin1_output("config\n"); #ifdef ENABLE_DEBUGGER (void)streams_latin1_output(fizmo_command_prefix_string); (void)streams_latin1_output("debug\n"); #endif // ENABLE_DEBUGGER (void)streams_latin1_output("\n"); return true; } else if (z_ucs_cmp_latin1(prefixed_command, "predictable") == 0) { ptr = get_configuration_value("random-mode"); if ( (ptr == NULL) || (strcmp(ptr, "predictable") != 0) ) { set_configuration_value("random-mode", "predictable"); (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_RANDOM_GENERATOR_IS_NOW_IN_PREDICTABLE_MODE); } else { set_configuration_value("random-mode", "random"); (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_RANDOM_GENERATOR_IS_NOW_IN_RANDOM_MODE); } (void)streams_latin1_output("\n\n"); return true; } else if (z_ucs_cmp_latin1(prefixed_command, "info") == 0) { #ifdef FIZMO_DIST_VERSION i18n_translate( libfizmo_module_name, i18n_libfizmo_FIZMO_VERSION_P0S, FIZMO_DIST_VERSION); streams_latin1_output("\n"); #endif // FIZMO_DIST_VERSION (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_LIBFIZMO_VERSION_P0S, LIBFIZMO_VERSION); (void)streams_latin1_output("\n"); active_interface->output_interface_info(); if (active_sound_interface != NULL) { streams_latin1_output(active_sound_interface->get_interface_name()); streams_latin1_output(" "); streams_latin1_output("version "); streams_latin1_output(active_sound_interface->get_interface_version()); streams_latin1_output("\n"); } i18n_translate( libfizmo_module_name, i18n_libfizmo_STORY_HAS_Z_VERSION_NUMBER_P0D, (long int)active_z_story->version); streams_latin1_output("\n"); i18n_translate( libfizmo_module_name, i18n_libfizmo_STORY_RELEASE_NUMBER, (long int)active_z_story->release_code); streams_latin1_output("\n"); i18n_translate( libfizmo_module_name, i18n_libfizmo_STORY_SERIAL_NUMBER, active_z_story->serial_code); streams_latin1_output("\n"); (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_CURRENT_Z_STACK_SIZE_P0D_ENTRIES, current_z_stack_size); (void)streams_latin1_output("\n"); (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_CURRENT_Z_STACK_ENTRIES_IN_USE_P0D, z_stack_index - z_stack); (void)streams_latin1_output("\n"); if (bool_equal(skip_active_routines_stack_check_warning, true)) { (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_HACK_01__ROUTINE_STACK_UNDERFLOW_CHECK_DISABLED); (void)streams_latin1_output("\n"); } (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_P0D_BYTES_USED_FOR_UNDO, (long)get_allocated_undo_memory_size()); (void)streams_latin1_output("\n"); #ifndef DISABLE_OUTPUT_HISTORY (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_P0D_BYTES_USED_BY_TEXT_HISTORY, (long)get_allocated_text_history_size(outputhistory[0])); (void)streams_latin1_output("\n"); #endif // DISABLE_OUTPUT_HISTORY ptr = get_configuration_value("random-mode"); if (ptr != NULL) { if (strcmp(ptr, "predictable") == 0) (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_RANDOM_GENERATOR_IS_NOW_IN_PREDICTABLE_MODE); else (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_RANDOM_GENERATOR_IS_NOW_IN_RANDOM_MODE); (void)streams_latin1_output("\n"); } /* #ifndef DISABLE_OUTPUT_HISTORY (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_P0D_BYTES_USED_BY_TEXT_HISTORY, outputhistory[0]->z_history_buffer_size + 1); (void)streams_latin1_output("\n"); (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_P0D_BYTES_USED_BY_TEXT_HISTORY_METADATA, outputhistory[0]->history_buffer_metadata_size * sizeof(struct history_metadata)); (void)streams_latin1_output("\n"); (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_P0D_BYTES_USED_BY_PARAGRAPH_CACHE, outputhistory[0]->pos_cache_size * sizeof(z_ucs*)); (void)streams_latin1_output("\n"); #endif */ #ifndef DISABLE_BLOCKBUFFER if (upper_window_buffer != NULL) { (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_P0D_BYTES_USED_BY_BLOCK_BUFFER, count_allocated_blockbuf_memory(upper_window_buffer)); (void)streams_latin1_output("\n"); } #endif //(void)streams_latin1_output("\n"); streams_latin1_output("\n"); return true; } else if (z_ucs_cmp_latin1(prefixed_command, "recstart") == 0) { ptr = get_configuration_value("disable-external-streams"); if ( (ptr == NULL) || (strcasecmp(ptr, "true") != 0) ) { stream_4_active = true; ask_for_stream4_filename_if_required(); (void)streams_latin1_output("Recording started.\n\n"); } else { (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_THIS_FUNCTION_HAS_BEEN_DISABLED); (void)streams_latin1_output("\n"); } return true; } else if (z_ucs_cmp_latin1(prefixed_command, "recstop") == 0) { ptr = get_configuration_value("disable-external-streams"); if ( (ptr == NULL) || (strcasecmp(ptr, "true") != 0) ) { stream_4_active = false; (void)streams_latin1_output("Recording stopped.\n\n"); } else { (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_THIS_FUNCTION_HAS_BEEN_DISABLED); (void)streams_latin1_output("\n"); } return true; } else if (z_ucs_cmp_latin1(prefixed_command, "fileinput") == 0) { open_input_stream_1(); return true; } else if (z_ucs_cmp_latin1(prefixed_command, "config") == 0) { i = 0; while (configuration_options[i].name != NULL) { streams_latin1_output(configuration_options[i].name); streams_latin1_output(" = "); if (strcmp(configuration_options[i].name, "background-color") == 0) { streams_latin1_output( get_configuration_value("background-color-name")); } else if (strcmp(configuration_options[i].name, "foreground-color") == 0) { streams_latin1_output( get_configuration_value("foreground-color-name")); } else { streams_latin1_output( get_configuration_value(configuration_options[i].name)); } streams_latin1_output("\n"); i++; } if ((interface_options = active_interface->get_config_option_names()) != NULL) { i = 0; while (interface_options[i] != NULL) { streams_latin1_output(interface_options[i]); streams_latin1_output(" = "); streams_latin1_output( active_interface->get_config_value(interface_options[i])); streams_latin1_output("\n"); i++; } } if (active_sound_interface != NULL) { if ((interface_options = active_sound_interface->get_config_option_names()) != NULL) { i = 0; while (interface_options[i] != NULL) { streams_latin1_output(interface_options[i]); streams_latin1_output(" = "); streams_latin1_output( active_sound_interface->get_config_value(interface_options[i])); streams_latin1_output("\n"); i++; } } } streams_latin1_output("\n"); return true; } #ifdef ENABLE_DEBUGGER else if (z_ucs_cmp_latin1(prefixed_command, "debug") == 0) { debugger(); return true; } #endif // ENABLE_DEBUGGER else { return false; } } #endif // DISABLE_PREFIX_COMMANDS int save_and_quit_if_required(bool force_save) { char *filename; char *save_and_quit_file; char *autosave_filename; uint8_t *pc_buf; if (active_interface->do_autosave) { return active_interface->do_autosave(); } autosave_filename = get_configuration_value("autosave-filename"); TRACE_LOG("autosave_filename: %s.\n", autosave_filename); if ( (autosave_filename != NULL) && ( (zpu_step_number != 1) || (bool_equal(force_save, true)) ) ) { pc_buf = pc; pc = current_instruction_location; TRACE_LOG("current_instruction_location: %lx\n", (unsigned long int)(current_instruction_location - z_mem)); filename = fizmo_strdup(autosave_filename); save_game( 0, (uint16_t)(active_z_story->dynamic_memory_end - z_mem + 1), filename, true, false, NULL); pc = pc_buf; save_and_quit_file = get_configuration_value("save-and-quit-file-before-read"); if ( (save_and_quit_file != NULL) && (strcmp(save_and_quit_file, "true") == 0)) { terminate_interpreter = INTERPRETER_QUIT_SAVE_BEFORE_READ; return 1; } else { return 0; } } else return 0; } int read_command_from_file(zscii *input_buffer, int input_buffer_size, int *input_delay_tenth_seconds) { int c; int input_length = 0; long filepos; int milliseconds; int res; int return_code; z_ucs unicode_input; if (input_stream_1 == NULL) { return_code = active_interface->prompt_for_filename( "transcript", &input_stream_1, NULL, FILETYPE_TRANSCRIPT, FILEACCESS_READ); if (return_code == -3) { // If return_code is == -3, this function is not implemented in the // current screen interface. if (input_stream_1_was_already_active == false) { ask_for_input_stream_filename(); } TRACE_LOG("Trying to open \"%s\"\n", input_stream_1_filename); if ((input_stream_1 = fsi->openfile(input_stream_1_filename, FILETYPE_INPUTRECORD, FILEACCESS_READ)) == NULL) { TRACE_LOG("Could not open input file for stream 1.\n"); input_stream_1_active = false; input_stream_1_filename_size = 0; free(input_stream_1_filename); input_stream_1_filename = NULL; return -1; } } else if (return_code < 0) { return -1; } } filepos = fsi->getfilepos(input_stream_1); // Parse "(Waited for ms)". res = fsi->filescanf(input_stream_1, "(Waited for %d ms)\n", &milliseconds); if (res == 1) { if (input_delay_tenth_seconds != NULL) *input_delay_tenth_seconds = milliseconds / 100; } else if (res == 0) { if (input_delay_tenth_seconds != NULL) *input_delay_tenth_seconds = 0; fsi->setfilepos(input_stream_1, filepos, SEEK_SET); } while (input_length != input_buffer_size) { unicode_input = parse_utf8_char_from_file(input_stream_1); if (unicode_input == '\n') break; else if (unicode_input != '\r') { *(input_buffer++) = unicode_char_to_zscii_input_char(unicode_input); input_length++; } } if (unicode_input != UEOF) { // Seek next '\n'. while (unicode_input != '\n') if ((unicode_input = parse_utf8_char_from_file(input_stream_1)) == UEOF) break; } TRACE_LOG("Read %d input chars.\n", input_length); // At EOF? If so, close stream and return last length. if (unicode_input == UEOF) { fsi->closefile(input_stream_1); input_stream_1_active = false; input_stream_1 = NULL; return input_length; } // Check if there's something behind the '\n'. c = fsi->readchar(input_stream_1); if (c == EOF) { input_stream_1_active = false; fsi->closefile(input_stream_1); input_stream_1 = NULL; } else fsi->unreadchar(c, input_stream_1); return input_length; } void opcode_read(void) { uint16_t maximum_length; int16_t input_length = -1; // init to inhibit compiler warning zscii *z_text_buffer = z_mem + op[0]; uint16_t parsebuffer_offset = op[1]; uint16_t tenth_seconds = op[2]; uint16_t timed_routine_offset = op[3]; zscii nof_preloaded_chars; bool interpreter_command_found; int i; bool stream_1_active_buf; int offset; size_t bytes_required; int tenth_seconds_elapsed = -1; char *time_output; int tenth_seconds_to_delay = 0; char *value; bool verification_error_occured; #ifndef DISABLE_COMMAND_HISTORY uint8_t buf; #endif /* DISABLE_COMMAND_HISTORY */ TRACE_LOG("Opcode: READ.\n"); if (save_and_quit_if_required(false) != 0) return; TRACE_LOG("Reading input (%x, %x).\n", op[0], parsebuffer_offset); if (ver >= 5) read_z_result_variable(); do { interpreter_command_found = false; if (ver <= 3) display_status_line(); value = get_configuration_value("disable-external-streams"); if (ver <= 4) { maximum_length = (*z_text_buffer) + 1; // FIXME: Verify minimum text buffer length. TRACE_LOG("Maximum length: %d.\n", maximum_length); input_length = -1; if ( (input_stream_1_active == true) && ( (value == NULL) || (strcasecmp(value, "true") != 0) ) ) input_length = read_command_from_file(z_text_buffer+1, maximum_length, NULL); if (input_length == -1) input_length = active_interface->read_line( (z_text_buffer+1), maximum_length, 0, 0, 0, NULL, false, false); TRACE_LOG("Resulting input length: %d.\n", input_length); // Since version 4 games don't have a timeout (tenth_seconds and // verification_routine are set to a fixed 0 in the call above) // the result stored in input_length is always >= 0. z_text_buffer[input_length + 1] = 0; #ifndef DISABLE_COMMAND_HISTORY if (input_length > 0) { // Now we'll store the last command in the command history. store_command_in_history(z_text_buffer + 1); } #endif /* DISABLE_COMMAND_HISTORY */ for (i=1; i<(int)(input_length+2); i++) TRACE_LOG("zscii-input[%d] = %d.\n", i, z_text_buffer[i]); } else if (ver >= 5) { maximum_length = *z_text_buffer; TRACE_LOG("Maximum length: %d.\n", maximum_length); // FIXME: Verify minimum text buffer length. #ifdef ENABLE_TRACING TRACE_LOG("Characters left over from previous input: %d.\n", z_text_buffer[1]); #endif // ENABLE_TRACING // Preloaded input is only availiable in version 5. nof_preloaded_chars = z_text_buffer[1]; if (nof_preloaded_chars > 0) { if (active_interface->is_preloaded_input_available() == false) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_PRELOADED_INPUT_NOT_AVAILIABLE_IN_INTERFACE_P0S, -1, active_interface->get_interface_name()); TRACE_LOG("Removing %d chars from history.\n", nof_preloaded_chars); stream_2_remove_chars(nof_preloaded_chars); #ifndef DISABLE_OUTPUT_HISTORY remove_chars_from_history(outputhistory[0], nof_preloaded_chars); #endif // DISABLE_OUTPUT_HISTORY } if ( (number_of_operands >= 4) && (tenth_seconds != 0) && (timed_routine_offset != 0) ) { TRACE_LOG("Timed input requested: %d/10s, routine at %x.\n", tenth_seconds, timed_routine_offset); // In this case a time-intervall and routine to call for // timed input are given. input_length = -1; verification_error_occured = false; if ( (input_stream_1_active == true) && ( (value == NULL) || (strcasecmp(value, "true") != 0) ) ) { if ((input_length = read_command_from_file(z_text_buffer+2, maximum_length, &tenth_seconds_to_delay)) != -1) { TRACE_LOG("1/10s to wait: %d\n", tenth_seconds_to_delay); stream_output_has_occured = false; while ((tenth_seconds_to_delay -= tenth_seconds) >= 0) { TRACE_LOG( "Invoking verification routine, 1/10s counter: %d(%d).\n", tenth_seconds_to_delay , tenth_seconds); if ((interpret_from_call( get_packed_routinecall_address(timed_routine_offset))) !=0 ) { TRACE_LOG("verification routine returned != 0.\n"); verification_error_occured = true; break; } } } } if ( (bool_equal(verification_error_occured, false)) && (input_length == -1) ) { if (active_interface->is_timed_keyboard_input_available() == false) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_TIMED_INPUT_NOT_IMPLEMENTED_IN_INTERFACE_P0S, -1, active_interface->get_interface_name()); else input_length = active_interface->read_line( z_text_buffer + 2, maximum_length, tenth_seconds, get_packed_routinecall_address(timed_routine_offset), z_text_buffer[1], &tenth_seconds_elapsed, false, false); } if (terminate_interpreter != INTERPRETER_QUIT_NONE) { return; } // input_length always defined, since "i18n_translate_and_exit" does // not return. /*@-usedef@*/ if ( (bool_equal(verification_error_occured, false)) && (input_length > 0) ) /*@+usedef@*/ { set_variable(z_res_var, (zscii)10, false); z_text_buffer[1] = (zscii)input_length; } else { set_variable(z_res_var, 0, false); z_text_buffer[1] = 0; } } else { input_length = -1; if ( (input_stream_1_active == true) && ( (value == NULL) || (strcasecmp(value, "true") != 0) ) ) input_length = read_command_from_file(z_text_buffer+2, maximum_length, NULL); if (input_length == -1) input_length = active_interface->read_line( z_text_buffer + 2, maximum_length, 0, 0, z_text_buffer[1], NULL, false, false); TRACE_LOG("Resulting input length: %d.\n", input_length); z_text_buffer[1] = (zscii)input_length; set_variable(z_res_var, Z_UCS_NEWLINE, false); } #ifndef DISABLE_COMMAND_HISTORY if (input_length >= 0) { buf = z_text_buffer[input_length + 2]; z_text_buffer[input_length + 2] = (zscii)0; store_command_in_history(z_text_buffer + 2); z_text_buffer[input_length + 2] = buf; } #endif /* DISABLE_COMMAND_HISTORY */ } bytes_required = (input_length + 1) * sizeof(z_ucs); if (bytes_required > (size_t)interpreter_command_buffer_size) { interpreter_command_buffer = (z_ucs*)fizmo_realloc(interpreter_command_buffer, bytes_required); interpreter_command_buffer_size = bytes_required; } offset = (ver >= 5 ? 2 : 1); for (i=0; iinput_must_be_repeated_by_story(); if (bool_equal(stream_4_active, true)) { if (tenth_seconds_elapsed > 0) { time_output = fizmo_malloc(40); snprintf(time_output, 40, "(Waited for %d ms)\n", tenth_seconds_elapsed * 100); stream_4_latin1_output(time_output); free(time_output); } if (input_length == -1) stream_4_latin1_output("(Interrupted input)"); } if (input_length >= 0) { (void)streams_z_ucs_output_user_input(interpreter_command_buffer); // Reduce to lower case. This appears to be also required in v5 // games, although it's not explicitely stated in the Z-Spec (see // Beyond Zork, character name: "frank booth" becomes "Frank Booth"). // ToDo: Respect other (non-ASCII) languages? for (i=0; i= 0x41) && (z_text_buffer[offset + i] <= 0x5a)) z_text_buffer[offset + i] += 0x20; } (void)streams_z_ucs_output_user_input(z_ucs_newline_string); stream_1_active = stream_1_active_buf; TRACE_LOG("input length:%d\n", input_length); if (input_length >= 0) { /* for (i=offset; i<(int)(input_length+offset); i++) // Test for isupper to avoid converting non-regular chars (tilde-a). if (isupper(z_text_buffer[i]) != 0) z_text_buffer[i] = tolower(z_text_buffer[i]); */ first_word_found = 0; // Next, lexical analysis is performed on the text (except that in // Versions 5 and later, if parse-buffer is zero then this is omitted). if ((ver < 5) || (parsebuffer_offset != 0)) { TRACE_LOG("Peforming lexical analysis.\n"); tokenise( z_text_buffer, (uint8_t)(ver >= 5 ? 2 : 1), (uint16_t)input_length, z_mem + parsebuffer_offset, active_z_story->dictionary_table, false); } #ifndef DISABLE_PREFIX_COMMANDS if (first_word_found == 0) { interpreter_command_found = process_interpreter_command(); if (bool_equal(interpreter_command_found, true)) { (void)streams_latin1_output(">"); z_text_buffer[1] = 0; if (save_and_quit_if_required(true) != 0) return; } } #endif // DISABLE_PREFIX_COMMANDS // In case no lexical analysis is required and we've found no interpreter // command, we can quite the loop. if ( (ver >=5) && (parsebuffer_offset == 0) && (interpreter_command_found == false)) break; if (active_sound_interface != NULL) active_sound_interface->keyboard_input_has_occurred(); } else break; } // If we just had a command that was processed internally by the // interpreter, not the story, we'll continue with the input. while (interpreter_command_found != false); number_of_commands++; } void opcode_print_obj(void) { uint8_t *object_property_table = get_objects_property_table(op[0]); TRACE_LOG("Opcode: PRINT_OBJ.\n"); (void)output_zchar_to_streams(object_property_table + 1); } void opcode_print_ret(void) { TRACE_LOG("Opcode: PRINT_RET.\n"); (void)output_zchar_to_streams(pc); pc = *zchar_to_z_ucs_src_index; (void)streams_latin1_output("\n"); return_from_routine(1); } void opcode_print_addr(void) { TRACE_LOG("Opcode: PRINT_ADDR.\n"); TRACE_LOG("Printing string at %x.\n", op[0]); (void)output_zchar_to_streams(z_mem + op[0]); } void opcode_show_status(void) { TRACE_LOG("Opcode: SHOW_STATUS.\n"); display_status_line(); } void opcode_read_char(void) { static z_ucs buf[] = { 0, Z_UCS_NEWLINE, 0 }; static zscii command_input; char *time_output; int tenth_seconds_elapsed = -1; int input_char; int input_delay_tenth_seconds = 0; int input_length; char *value = get_configuration_value("disable-external-streams"); bool verification_error_occured; uint16_t tenth_seconds = op[1]; TRACE_LOG("Opcode: READ_CHAR.\n"); read_z_result_variable(); // FIXME: Check for first parameter which must be 1. // FIXME: Convert to ZSCII. if (ver <= 3) display_status_line(); if ((number_of_operands >= 3) && (ver >= 4) && (op[1] != 0) && (op[2] != 0)) { TRACE_LOG("Starting reading character via timed input.\n"); verification_error_occured = false; input_length = -1; if ( (input_stream_1_active == true) && ( (value == NULL) || (strcasecmp(value, "true") != 0) ) ) input_length = read_command_from_file(&command_input, 1, &input_delay_tenth_seconds); if (input_delay_tenth_seconds > 0) { TRACE_LOG("1/10s to wait: %d\n", input_delay_tenth_seconds); stream_output_has_occured = false; while ((input_delay_tenth_seconds -= tenth_seconds) >= 0) { TRACE_LOG( "Invoking verification routine, 1/10s counter: %d(%d).\n", input_delay_tenth_seconds, tenth_seconds); if ((interpret_from_call(get_packed_routinecall_address(op[2]))) !=0 ) { TRACE_LOG("verification routine returned != 0.\n"); verification_error_occured = true; break; } if (terminate_interpreter != INTERPRETER_QUIT_NONE) return; } } if (bool_equal(verification_error_occured, false)) { input_char = (input_length == -1) ? active_interface->read_char( op[1], get_packed_routinecall_address(op[2]), &tenth_seconds_elapsed) : command_input; } if (terminate_interpreter != INTERPRETER_QUIT_NONE) return; if (bool_equal(stream_4_active, true)) { if (tenth_seconds_elapsed > 0) { time_output = fizmo_malloc(40); snprintf(time_output, 40, "(Waited for %d ms)\n", tenth_seconds_elapsed * 100); stream_4_latin1_output(time_output); free(time_output); } if (input_char == -1) { stream_4_latin1_output("(Interrupted input)"); } else { *buf = input_char; stream_4_z_ucs_output(buf); } } if (input_char == -1) input_char = 0; set_variable(z_res_var, input_char, false); TRACE_LOG("Reading character via timed input done.\n"); } else { TRACE_LOG("Starting reading single character.\n"); input_length = -1; if ( (input_stream_1_active == true) && ( (value == NULL) || (strcasecmp(value, "true") != 0) ) ) input_length = read_command_from_file(&command_input, 1, &input_delay_tenth_seconds); TRACE_LOG("input_delay_tenth_seconds: %d\n", input_delay_tenth_seconds); input_char = (input_length == -1) ? active_interface->read_char(0, 0, NULL) : command_input; /* if (input_delay_tenth_seconds > 0) { TRACE_LOG("1/10s to wait: %d\n", input_delay_tenth_seconds); while ((input_delay_tenth_seconds -= op[1]) >= 0) { TRACE_LOG( "Invoking verification routine, 1/10s counter: %d(%d).\n", input_delay_tenth_seconds , op[1]); if ((interpret_from_call(get_packed_routinecall_address(op[2]))) != 0) { TRACE_LOG("verification routine returned != 0.\n"); input_length = -1; break; } } } */ if (bool_equal(stream_4_active, true)) { *buf = input_char; stream_4_z_ucs_output(buf); } set_variable(z_res_var, input_char, false); TRACE_LOG("Reading single character done.\n"); } if (tenth_seconds_elapsed != -1) { TRACE_LOG("Time elapsed: (%d/10)s.\n", tenth_seconds_elapsed); } if (active_sound_interface != NULL) active_sound_interface->keyboard_input_has_occurred(); } void opcode_print_table(void) { uint8_t *src= z_mem + (uint16_t)op[0]; uint16_t width = (uint16_t)op[1]; uint16_t height = 1; uint16_t skip = 0; int x,y; int buffer_index; int cursor_y = active_interface->get_cursor_row(); int cursor_x = active_interface->get_cursor_column(); bool no_cursor_placement; TRACE_LOG("Opcode: PRINT_TABLE.\n"); if ( (ver != 6) && (active_window_number != 1) ) { // The Z-Spec from 2014-06-07 declares that "Version 5 games must only // ue print_table in the upper window. Its behaviour in the lower window // is undefined". Unfortunately, this prevents sherlock from displaying // error messages of the kind "[You can play the game from start to // finish, solve all the puzzles, get all the points, and STILL never // need to use the word "(print_table)"]". In order to work around this, // print_table in the lower windows just print the command's zscii // text without any formatting. height = 1; skip = 0; no_cursor_placement = true; } else { no_cursor_placement = false; if (number_of_operands >= 3) { height = (uint16_t)op[2]; if (number_of_operands >= 4) skip = (uint16_t)op[3]; } } for (y=0; y= 5, so the length of the // buffer must always be fixed at 6 bytes. zchar_storage_start(dest, 6); TRACE_LOG("Encoding to %x / %p.\n", (uint16_t)op[3], dest); while ( (*src != 0) && (chars_written < length) ) { TRACE_LOG("Encoding char '%c'.\n", *src); store_ZSCII_as_zchar(*src); src++; chars_written++; } while (chars_written < 9) { // Since we're always working in version >= 5, we always have to pad // to a fixed size of 9 z-chars. TRACE_LOG("Storing padding char 5.\n"); (void)zchar_storage_write(5); chars_written++; } zchar_storage_finish(); zchar_storage_clear(); } void opcode_print_unicode(void) { z_ucs_output_buffer[0] = (uint16_t)op[0]; z_ucs_output_buffer[1] = 0; (void)streams_z_ucs_output(z_ucs_output_buffer); } void opcode_check_unicode(void) { uint16_t result = 0; read_z_result_variable(); // FIXME: Check for output charset. if (unicode_char_to_zscii_input_char((uint16_t)op[0]) != 0xff) result = 3; else result = 1; set_variable(z_res_var, result, false); } #endif /* text_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/wordwrap.h0000644000175000017500000000717213153330674020751 0ustar chrenderchrender /* wordwrap.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef wordwrap_h_INCLUDED #define wordwrap_h_INCLUDED #include "../tools/types.h" struct wordwrap_metadata { long output_index; void (*metadata_output_function)(void *ptr_parameter, uint32_t int_parameter); void *ptr_parameter; uint32_t int_parameter; }; typedef struct { int line_length; void (*wrapped_text_output_destination)(z_ucs *output, void *parameter); void *destination_parameter; bool add_newline_after_full_line; int left_side_padding; bool flush_after_newline; bool enable_hyphenation; z_ucs *input_buffer; long input_buffer_size; long input_index; long chars_already_on_line; struct wordwrap_metadata *metadata; int metadata_size; int metadata_index; z_ucs *padding_buffer; /* void (*padding_starts)(); void (*padding_ends)(); void *destination_parameter; z_ucs *output_buffer; z_ucs *output_buffer_index; size_t output_buffer_size; bool add_newline_after_full_line; int left_side_padding; bool newline_was_inserted; bool last_line_was_completely_filled; bool flush_after_newline; */ } WORDWRAP; WORDWRAP *wordwrap_new_wrapper(size_t line_length, void (*wrapped_text_output_destination)(z_ucs *output, void *parameter), void *destination_parameter, bool add_newline_after_full_line, int left_side_padding, bool flush_after_newline, bool enable_hyphenation); void wordwrap_destroy_wrapper(WORDWRAP *wrapper_to_destroy); void wordwrap_wrap_z_ucs(WORDWRAP *wrapper, z_ucs *input); void wordwrap_flush_output(WORDWRAP *wrapper); void wordwrap_insert_metadata(WORDWRAP *wrapper, void (*metadata_output)(void *ptr_parameter, uint32_t int_parameter), void *ptr_parameter, uint32_t int_parameter); void wordwrap_set_line_index(WORDWRAP *wrapper, int new_line_index); //void wordwrap_output_left_padding(WORDWRAP *wrapper); void wordwrap_adjust_line_length(WORDWRAP *wrapper, size_t new_line_length); // To remove chars from the end of the current(!) line: void wordwrap_remove_chars(WORDWRAP *wrapper, size_t num_chars_to_remove); #endif /* wordwrap_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/undo.h0000644000175000017500000000360113153330674020042 0ustar chrenderchrender /* undo.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef undo_h_INCLUDED #define undo_h_INCLUDED #include "../tools/types.h" int set_max_undo_steps(int new_max_steps); void opcode_save_undo(void); void opcode_restore_undo(void); size_t get_allocated_undo_memory_size(void); void free_undo_memory(void); #endif /* undo_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/filelist.h0000644000175000017500000000510013153330674020704 0ustar chrenderchrender /* filelist.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef filelist_h_INCLUDED #define filelist_h_INCLUDED #include "../tools/types.h" struct z_story_list { struct z_story_list_entry **entries; int nof_entries_allocated; int nof_entries; }; struct z_story_list_entry { uint16_t release_number; char *serial; int length; uint16_t checksum; uint8_t z_code_version; char *title; char *author; char *language; char *description; char *filename; char *blorbfile; char *filetype; long storyfile_timestamp; }; void free_z_story_list(struct z_story_list *story_list); void free_z_story_list_entry(struct z_story_list_entry *entry); struct z_story_list *get_z_story_list(); struct z_story_list_entry *get_z_story_entry_from_list(char *serial, uint16_t release, uint16_t checksum); struct z_story_list *update_fizmo_story_list(); void detect_and_add_single_z_file(char *input_filename, char *blorb_filename); void search_directory(char *absolute_dirname, bool recursive); #endif /* filelist_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/hyphenation.c0000644000175000017500000003461513153330674021427 0ustar chrenderchrender /* hyphenation.c * * This file is part of fizmo. * * Copyright (c) 2010-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Doing TeX hyphenation; see The TeXbook, Appendix H #ifndef hyphenation_c_INCLUDED #define hyphenation_c_INCLUDED #include #include #include #include "../tools/tracelog.h" #include "../tools/z_ucs.h" #include "../tools/list.h" #include "../tools/i18n.h" #include "../tools/filesys.h" #include "../locales/libfizmo_locales.h" #include "config.h" #include "fizmo.h" #include "hyphenation.h" static z_ucs *last_pattern_locale = NULL; static z_ucs *pattern_data; static z_ucs **patterns; static int nof_patterns = 0; static z_ucs *search_path = NULL; //static z_ucs *subword_buffer = NULL; //static int subword_buffer_size = 0; //static z_ucs *word_buf = NULL; //static int word_buf_len = 0; // From tools/i18n.c: extern char default_search_path[]; static z_ucs input_char(z_file *in) { z_ucs input; if ((input = parse_utf8_char_from_file(in)) == UEOF) { TRACE_LOG("Premature end of file.\n"); i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_ERROR_WHILE_READING_FILE_P0S, -1, ""); } return (z_ucs)input; } // Returns > 0 in case s1 > s2, 0 if equal and < 0 otherwise. static int cmp_pattern(z_ucs *s1, z_ucs *s2) { while ( (*s1 != 0) || (*s2 != 0) ) { if ( (*s1 != 0) && (isdigit(*s1) != 0) ) s1++; if ( (*s2 != 0) && (isdigit(*s2) != 0) ) s2++; if (*s1 != *s2) return *s2 - *s1; s1++; s2++; } return 0; } static int divide(int start, int end) { int i=start, j=end; z_ucs *pattern; z_ucs *pivot = patterns[end]; do { while ( (i < end) && (cmp_pattern(patterns[i], pivot) >= 0 ) ) { //TRACE_LOG("i: %d\n", i); i++; } while ( (j >= start) && (cmp_pattern(patterns[j], pivot) <= 0 ) ) { //TRACE_LOG("j: %d\n", j); j--; } if (i < j) { pattern = patterns[i]; patterns[i] = patterns[j]; patterns[j] = pattern; } } while (i < j); if (cmp_pattern(patterns[i], pivot) < 0) { pattern = patterns[i]; patterns[i] = patterns[end]; patterns[end] = pattern; } return i; } static void sort_patterndata(int start, int end) { int div; if (start < end) { div = divide(start, end); sort_patterndata(start, div - 1); sort_patterndata(div + 1, end); } } static int load_patterns() { list *lines; char *path_as_latin1; char *filename = "patterns.txt", *testfilename; z_ucs *colon_index, *current_locale; size_t bufsize = 0, len, filename_len, locale_len; z_ucs *zucs_buf = NULL, *filename_as_zucs; z_file *patternfile = NULL; size_t nof_zucs_chars; z_ucs *linestart; z_ucs input; int in_char; z_ucs *data; size_t nof_comments; #ifdef ENABLE_TRACING int i; #endif if (search_path == NULL) { if ((path_as_latin1 = get_configuration_value("i18n-search-path")) == NULL) { TRACE_LOG("Using default search path.\n"); path_as_latin1 = default_search_path; } if ((search_path=dup_latin1_string_to_zucs_string(path_as_latin1)) == NULL) return -2; } current_locale = get_current_locale_name(); if (last_pattern_locale != NULL) free(last_pattern_locale); last_pattern_locale = z_ucs_dup(current_locale); locale_len = z_ucs_len(current_locale); TRACE_LOG("pattern path: \""); TRACE_LOG_Z_UCS(search_path); TRACE_LOG("\".\n"); filename_len = strlen(filename); filename_as_zucs = fizmo_malloc(sizeof(z_ucs) * strlen(filename) + 1); utf8_string_to_zucs_string(filename_as_zucs, filename, filename_len + 1); while (*search_path != 0) { colon_index = z_ucs_chr(search_path, Z_UCS_COLON); len = colon_index == NULL ? z_ucs_len(search_path) : (size_t)(colon_index - search_path); TRACE_LOG("len: %ld\n", (long)len); if (len > 0) { if (bufsize < len + filename_len + locale_len + 3) { TRACE_LOG("realloc buf for %ld bytes.\n", (long)sizeof(z_ucs) * (len + filename_len + locale_len + 3)); // open-resource: if ((zucs_buf = realloc(zucs_buf, sizeof(z_ucs) * (len + filename_len + locale_len + 3))) == NULL) { // exit-point: TRACE_LOG("realloc() returned NULL.\n"); free(filename_as_zucs); free(zucs_buf); return -5; } bufsize = len + filename_len + locale_len + 3; } z_ucs_ncpy(zucs_buf, search_path, len); zucs_buf[len] = Z_UCS_SLASH; z_ucs_cpy(zucs_buf + len + 1, current_locale); *(zucs_buf + len + locale_len + 1) = Z_UCS_SLASH; z_ucs_cpy(zucs_buf + len + locale_len + 2, filename_as_zucs); if ((testfilename = dup_zucs_string_to_utf8_string(zucs_buf)) == NULL) { free(zucs_buf); free(filename_as_zucs); return -3; } TRACE_LOG("Trying pattern file: \"%s\".\n", testfilename); patternfile = fsi->openfile(testfilename, FILETYPE_DATA, FILEACCESS_READ); free(testfilename); if (patternfile != NULL) break; } search_path += len + (colon_index != NULL ? 1 : 0); } free(zucs_buf); free(filename_as_zucs); if (patternfile != NULL) { TRACE_LOG("File found.\n"); // We'll now measure the filesize in order to be able to allocate a // single block of memory before reading data. This is necessary, since // we're storing pattern indexes while reading and a realloc might // invalidate these. nof_zucs_chars = 0; for(;;) { // Parse line. input = parse_utf8_char_from_file(patternfile); if (input == UEOF) break; if (input == (z_ucs)'%') { do { input = parse_utf8_char_from_file(patternfile); } while (input != Z_UCS_NEWLINE); } else { nof_zucs_chars++; while (input != Z_UCS_NEWLINE) { nof_zucs_chars++; input = parse_utf8_char_from_file(patternfile); } } } if (fsi->setfilepos(patternfile, 0, SEEK_SET) == -1) { // exit-point: TRACE_LOG("setfilepos() returned -1.\n"); fsi->closefile(patternfile); return -6; } TRACE_LOG("Allocating space for %ld z_ucs chars.\n", nof_zucs_chars); // open-resource: if ((data = malloc(nof_zucs_chars * sizeof(z_ucs))) == NULL) { // exit-point: TRACE_LOG("malloc(%ld) returned NULL.\n", nof_zucs_chars * sizeof(z_ucs)); fsi->closefile(patternfile); return -7; } pattern_data = data; nof_comments = 0; lines = create_list(); //printf("new list created: %p\n", lines); in_char = fsi->readchar(patternfile); while (in_char != EOF) { if (in_char == '%') { TRACE_LOG("Start comment.\n"); do { input = input_char(patternfile); } while (input != Z_UCS_NEWLINE); nof_comments++; } else { // Found a new line. fsi->unreadchar(in_char, patternfile); linestart = data; TRACE_LOG("Start pattern.\n"); for (;;) { input = input_char(patternfile); if (input == Z_UCS_NEWLINE) { *data ++ = 0; TRACE_LOG("New line at %p.\n", linestart); add_list_element(lines, (void*)linestart); break; } else { // Here we've found some "normal" output. *data++ = (z_ucs)input; } } //messages_processed++; } in_char = fsi->readchar(patternfile); } fsi->closefile(patternfile); nof_patterns = get_list_size(lines); patterns = (z_ucs**)delete_list_and_get_ptrs(lines); TRACE_LOG("Read %d patterns, %ld comments.\n", nof_patterns, nof_comments); sort_patterndata(0, nof_patterns - 1); #ifdef ENABLE_TRACING TRACE_LOG("sorted:\n"); for (i=0; i= 0) { //TRACE_LOG("start: bottom: %d, top: %d.\n", bottom, top); index = bottom + ( (top - bottom) / 2 ); //TRACE_LOG("Compare (%d): \"", index); //TRACE_LOG_Z_UCS(patterns[index]); //TRACE_LOG("\".\n"); if ((cmp = cmp_pattern(subword, patterns[index])) == 0) return patterns[index]; else if (cmp > 0) top = index - 1; else bottom = index + 1; //TRACE_LOG("end : bottom: %d, top: %d.\n", bottom, top); } return NULL; } z_ucs *hyphenate(z_ucs *word_to_hyphenate) { int i, j, k, l, start_offset, end_offset; int word_len, process_index; z_ucs *ptr; int word_to_hyphenate_len, score, max_score; z_ucs buf; z_ucs *word_buf, *result_buf, *result_ptr; if ( (word_to_hyphenate == NULL) || ((word_to_hyphenate_len = z_ucs_len(word_to_hyphenate)) < 1) ) { TRACE_LOG("hyph input empty.\n"); return NULL; } if ( (last_pattern_locale == NULL) || (z_ucs_cmp(last_pattern_locale, get_current_locale_name()) != 0) ) { if (load_patterns() < 0) { TRACE_LOG("Couldn't load patterns.\n"); return NULL; } } if ((result_buf = malloc( sizeof(z_ucs) * (word_to_hyphenate_len * 2 + 1))) == NULL) return NULL; if (z_ucs_len(word_to_hyphenate) < 4) { z_ucs_cpy(result_buf, word_to_hyphenate); return result_buf; } if ((word_buf = malloc( sizeof(z_ucs) * (word_to_hyphenate_len + 3))) == NULL) { free(result_buf); return NULL; } *word_buf = '.'; z_ucs_cpy(word_buf + 1, word_to_hyphenate); word_buf[word_to_hyphenate_len+1] = '.'; word_buf[word_to_hyphenate_len+2] = 0; word_len = word_to_hyphenate_len + 2; TRACE_LOG("Hyphenate: \""); TRACE_LOG_Z_UCS(word_buf); TRACE_LOG("\".\n"); result_ptr = result_buf; *(result_ptr++) = *word_to_hyphenate; // Process all inter-letter positions. From the TeXbook, page 453: // "[...] except that plain TeX blocks hyphens after the very first // letter or before the last or second-last letter of a word." Thus, // we'll simply process entirely the same range here to avoid strange // hyphenations. for (i=1; i word_len - j) end_offset = word_len - j; TRACE_LOG("j: %d, start: %d, end: %d, pi: %d\n", j, start_offset, end_offset, process_index); for (k=start_offset; k<=end_offset; k++) { buf = word_buf[k + j]; word_buf[k + j] = 0; if ((ptr = get_pattern(word_buf + k)) != NULL) { TRACE_LOG("Found (%d): \"", k); TRACE_LOG_Z_UCS(ptr); TRACE_LOG("\".\n"); l = 0; while (l < process_index - (k - start_offset)) { TRACE_LOG("l: %d, process_index: %d.\n", l, process_index); if (isdigit(*ptr) == 0) l++; ptr++; } score = isdigit(*ptr) ? *ptr - '0' : 0; if (score > max_score) max_score = score; TRACE_LOG("score (max: %d): %d.\n", max_score, score); } word_buf[k + j] = buf; } if (start_offset != 0) start_offset--; if (process_index <= i) process_index++; } TRACE_LOG("Finished for position %d (%c).\n", i, word_buf[i]); if (i > 1) { *(result_ptr++) = word_buf[i]; if ((max_score & 1) != 0) { *(result_ptr++) = Z_UCS_SOFT_HYPEN; TRACE_LOG("Found hyph point.\n"); } } } *(result_ptr++) = word_buf[i]; *(result_ptr++) = word_buf[i+1]; *(result_ptr++) = word_buf[i+2]; *result_ptr = 0; TRACE_LOG("Result: \""); TRACE_LOG_Z_UCS(result_buf); TRACE_LOG("\".\n"); free(word_buf); return result_buf; } void free_hyphenation_memory(void) { if (last_pattern_locale != NULL) { free(last_pattern_locale); last_pattern_locale = NULL; } if (pattern_data != NULL) { free(pattern_data); pattern_data = NULL; } if (patterns != NULL) { free(patterns); patterns = NULL; } if (search_path == NULL) { free(search_path); search_path = NULL; } } #endif /* hyphenation_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/property.h0000644000175000017500000000356313153330674020770 0ustar chrenderchrender /* property.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef property_h_INCLUDED #define property_h_INCLUDED #include void opcode_get_prop(void); void opcode_put_prop(void); void opcode_get_prop_addr(void); void opcode_get_prop_len(void); void opcode_get_next_prop(void); #endif /* property_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/history.c0000644000175000017500000016042013153330674020574 0ustar chrenderchrender /* history.c * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * * This file implements a stream- or window-history which stores the output * of the Z-Machine for windows. It may be used to implement a scrollback * buffer, to refresh the contents of a screen or to redraw the screen as * a response on a window resize event. * * The history is implemented as a circular buffer. Once the hardcoded or * user-given buffer maximum size is reached, the oldest data is overwritten * with the newest. The buffer start is stored in "z_history_buffer_start", * the end at "z_history_buffer_end". "z_history_buffer_front_index" points * to the front of the buffer, meaning to the point where the next character * will be stored. "history_buffer_back_index_background" points to the oldest * stored character. "wrapped_around" indicates whether the buffer is in a * wrap-around situation -- meaning that the front- is behind the back-index. * In case front == back, the buffer is empty when "wrapped_around" is false, * or completely filled in case "wrapped_around" is true. * * Metadata -- font, style and colour attributes -- is directly written * into this buffer. In order to distinguish metadata from regular buffer * contents, metadata is prefixed with a HISTORY_METADATA_ESCAPE character * which is 0. Since 0 is used as a string-terminator, regular buffer contents * can never contain a plain 0. Thus, when writing output into the buffer, 0 * characters don't have to be explicitely escaped since these are never * written. * * In order to use the history one can create a *history_output using * "init_history_output" which will point to the current end of the history. * (... "output_rewind_paragraph", "output_repeat_paragraphs") * * For greater output flexibility, a repeated output's paragraph is never * followed by a newline char. This, however, introduces the ambiguity that * for the very last paragraph it's not known whether it has been * terminated with a newline or not, which is relevant when redrawing the * screen. To solve this, the "output_rewind_paragraph" will set the flag * "rewound_paragraph_was_newline_terminated" to false in case the very * last paragraph in the buffer is not yet followed by a newline char. * * Please note: The buffer size must have at least the size of the largest * metadata entry, which is 4 z_ucs-chars. */ #ifndef history_c_INCLUDED #define history_c_INCLUDED #include #include #include "../tools/tracelog.h" #include "../tools/types.h" #include "../tools/z_ucs.h" #include "../tools/i18n.h" #include "../locales/libfizmo_locales.h" #include "history.h" #include "fizmo.h" #include "config.h" #define REPEAT_PARAGRAPH_BUF_SIZE 1280 outputhistory_ptr outputhistory[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; OUTPUTHISTORY *create_outputhistory(int window_number, size_t maximum_buffer_size, size_t buffer_increment_size, z_colour foreground_colour, z_colour background_color, z_font font, z_style style) { OUTPUTHISTORY *result; if ((result = malloc(sizeof(OUTPUTHISTORY))) == NULL) return NULL; result->window_number = window_number; result->z_history_buffer_size = 0; result->z_history_maximum_buffer_size = maximum_buffer_size; result->z_history_buffer_increment_size = buffer_increment_size; result->z_history_buffer_start = NULL; result->z_history_buffer_end = NULL; result->z_history_buffer_front_index = NULL; result->z_history_buffer_back_index = NULL; result->nof_wraparounds = 0; result->last_metadata_block_index = 0; result->next_newline_after_buffer_back = NULL; result->last_written_paragraph_attribute_index = NULL; result->history_buffer_back_index_font = font; result->history_buffer_back_index_style = style; result->history_buffer_back_index_foreground = foreground_colour; result->history_buffer_back_index_background = background_color; result->history_buffer_front_index_font = font; result->history_buffer_front_index_style = style; result->history_buffer_front_index_foreground = foreground_colour; result->history_buffer_front_index_background = background_color; return result; } void destroy_outputhistory(OUTPUTHISTORY *h) { free(h->z_history_buffer_start); free(h); } static size_t get_buffer_space_used(OUTPUTHISTORY *h) { if (h->z_history_buffer_size == 0) return 0; else if (h->nof_wraparounds == 0) return h->z_history_buffer_front_index - h->z_history_buffer_back_index + 1; else return h->z_history_buffer_size - (h->z_history_buffer_back_index - h->z_history_buffer_front_index); } static void process_buffer_back(OUTPUTHISTORY *h, long nof_zucs_chars) { z_ucs *current_index = h->z_history_buffer_front_index; z_ucs buf1, buf2; TRACE_LOG("Advancing buffer end from %p by %ld chars.\n", current_index, (long int)nof_zucs_chars); do { TRACE_LOG("current-index: %p.\n", current_index); // Check if we have caught up to the last processed paragraph-attribute // position. if (h->next_newline_after_buffer_back == current_index) { h->next_newline_after_buffer_back = NULL; } if (*current_index == HISTORY_METADATA_ESCAPE) { // We've found an escape code. Advance index to escape code type. current_index = current_index == h->z_history_buffer_end ? h->z_history_buffer_start : current_index + 1; nof_zucs_chars--; if (*current_index == HISTORY_METADATA_ESCAPE) { // All other cases (only 0 is legal) indicate normal data, thus we // can ignore it. } else if (*current_index == HISTORY_METADATA_TYPE_FONT) { // Font metadata found, advance to font data. current_index = current_index == h->z_history_buffer_end ? h->z_history_buffer_start : current_index + 1; nof_zucs_chars--; h->history_buffer_back_index_font = (z_font)*current_index; } else if (*current_index == HISTORY_METADATA_TYPE_STYLE) { // Style metadata found, advance to style data. current_index = current_index == h->z_history_buffer_end ? h->z_history_buffer_start : current_index + 1; nof_zucs_chars--; h->history_buffer_back_index_style = (z_style)*current_index; } else if (*current_index == HISTORY_METADATA_TYPE_COLOUR) { // Colour metadata found, advance to foreground data. current_index = current_index == h->z_history_buffer_end ? h->z_history_buffer_start : current_index + 1; nof_zucs_chars--; h->history_buffer_back_index_foreground = (z_colour)*current_index; // Advance to background data. current_index = current_index == h->z_history_buffer_end ? h->z_history_buffer_start : current_index + 1; nof_zucs_chars--; h->history_buffer_back_index_background = (z_colour)*current_index; } else if (*current_index == HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE) { // do nothing but catch the case so we're not running into the // error-else below. current_index = current_index == h->z_history_buffer_end ? h->z_history_buffer_start : current_index + 1; nof_zucs_chars--; buf1 = *current_index; // Advance to second parameter current_index = current_index == h->z_history_buffer_end ? h->z_history_buffer_start : current_index + 1; nof_zucs_chars--; if ( (paragraph_removal_function != NULL) && (h->next_newline_after_buffer_back == NULL) ) { paragraph_removal_function( buf1 - HISTORY_METADATA_DATA_OFFSET, *current_index - HISTORY_METADATA_DATA_OFFSET); } } else { TRACE_LOG("Inconsistent history metadata.\n"); i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INVALID_PARAMETER_TYPE_P0S, -1, "metadata"); } } // After processing, move to next z_ucs. current_index = current_index == h->z_history_buffer_end ? h->z_history_buffer_start : current_index + 1; nof_zucs_chars--; } while (nof_zucs_chars > 0); // It's possible that we're advancing more chars than requested, in case // a metadata sequence occupies the end of the processing range. Since the // history bugger is specified to have minimum buffer size of a complete // metadata entry though, this will work without problems. if ( (paragraph_removal_function != NULL) && (h->next_newline_after_buffer_back == NULL) ) { //printf("passed next_newline_after_buffer_back.\n"); // Either we have never run "process_buffer_back" before, or we have // passed the last evaluated paragraph-attribute position in the loop // above. Either way, we now have to look for the next paragraph in // order to keep the to keep a consistent paragraph attribute situation // (meaning: Only whole paragraphs in the history count). h->next_newline_after_buffer_back = current_index; while (*current_index != Z_UCS_NEWLINE) { if (current_index == h->z_history_buffer_front_index) { // Only a single block of text in the buffer? Well, okay. //printf("XXXX\n"); break; } // Advance 1 char. current_index = current_index == h->z_history_buffer_end ? h->z_history_buffer_start : current_index + 1; // In case there's some metadata at this point, process it. if (*current_index == HISTORY_METADATA_ESCAPE) { // Advance to metadata type. current_index = current_index == h->z_history_buffer_end ? h->z_history_buffer_start : current_index + 1; // Remember this in buf1. buf1 = *current_index; // Advance to first parameter. current_index = current_index == h->z_history_buffer_end ? h->z_history_buffer_start : current_index + 1; // Remember this in buf2. buf2 = *current_index; if ( (buf1 == HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE) || (buf1 == HISTORY_METADATA_TYPE_COLOUR) ) { // Advance to second parameter. current_index = current_index == h->z_history_buffer_end ? h->z_history_buffer_start : current_index + 1; nof_zucs_chars--; if (buf1 == HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE) { paragraph_removal_function( buf2 - HISTORY_METADATA_DATA_OFFSET, *current_index - HISTORY_METADATA_DATA_OFFSET); } } } } //printf("bufferback: next_newline_after_buffer_back %p.\n", // h->next_newline_after_buffer_back); h->next_newline_after_buffer_back = current_index; } //result->next_newline_after_buffer_back = NULL; TRACE_LOG("Processed chars up to before %p.\n", current_index); } static size_t get_buffer_space_available(OUTPUTHISTORY *h) { if (h->z_history_buffer_size == 0) return 0; else if (h->nof_wraparounds == 0) return h->z_history_buffer_end - h->z_history_buffer_front_index + 1; else return h->z_history_buffer_back_index - h->z_history_buffer_front_index; } static void try_to_enlarge_buffer(OUTPUTHISTORY *h, size_t desired_z_ucs_size) { z_ucs *ptr; TRACE_LOG("Trying to enlarge history buffer to %ld bytes.\n", (long int)(sizeof(z_ucs) * desired_z_ucs_size)); if ((ptr = realloc( h->z_history_buffer_start, sizeof(z_ucs) * (desired_z_ucs_size + 1))) != NULL) //sizeof(z_ucs) * desired_z_ucs_size)) != NULL) { h->z_history_buffer_size = desired_z_ucs_size; h->z_history_buffer_end = ptr + h->z_history_buffer_size - 1; *(h->z_history_buffer_end + 1) = 0; h->z_history_buffer_front_index = ptr + (h->z_history_buffer_front_index - h->z_history_buffer_start); h->z_history_buffer_back_index = ptr + (h->z_history_buffer_back_index - h->z_history_buffer_start); h->z_history_buffer_start = ptr; } } // This method helps to ensure that we have at least one entry for each // metadata type which is required to display on the screen (style, font // and color) every Z_HISTORY_METADATA_STATE_BLOCK_SIZE bytes. In case // we wouldn't be doing this, it would mean that games which never write a // certain metadata type (games without color support would for example never // write color metadata) we'd have to walk back the entire buffer to be able // to evaluate the color of the current char we're pointing at. static void write_metadata_state_block_if_necessary(OUTPUTHISTORY *h) { long int metadata_block_index; long int buffer_index = h->z_history_buffer_front_index - h->z_history_buffer_start; metadata_block_index = buffer_index - (buffer_index % (Z_HISTORY_METADATA_STATE_BLOCK_SIZE)); TRACE_LOG("block_index %ld(%ld), last block %ld.\n", metadata_block_index, buffer_index, h->last_metadata_block_index); if (metadata_block_index != h->last_metadata_block_index) { // We've now crossed a metadata block state boundary and thus we'll now // write the current state block. TRACE_LOG("Storing metadata state block %ld.\n", metadata_block_index); store_metadata_in_history(h, HISTORY_METADATA_TYPE_FONT, h->history_buffer_back_index_font); store_metadata_in_history(h, HISTORY_METADATA_TYPE_STYLE, h->history_buffer_back_index_style); store_metadata_in_history(h, HISTORY_METADATA_TYPE_COLOUR, h->history_buffer_back_index_foreground, h->history_buffer_back_index_background); } h->last_metadata_block_index = metadata_block_index; } void store_data_in_history(OUTPUTHISTORY *h, z_ucs *data, size_t len, bool evaluate_state_block) { size_t space_available, missing_space, nof_increments, new_size; size_t desired_size, len_to_write; if (data == NULL) return; TRACE_LOG("Trying to store %ld z_ucs-chars in history.\n", (long int)len); /* Not usable, since data doesn't have to be null-terminated. TRACE_LOG("store_history: \""); TRACE_LOG_Z_UCS(data); TRACE_LOG("\".\n"); */ if (len >= h->z_history_maximum_buffer_size) { // In this case the input to store is so large -- or our maximum buffer // size so tiny -- that the whole input will allocate all available // space. // Before we're trying to store any new data, we apply all metadata // changes to our buffer back-index. TRACE_LOG("buffer space used: %ld.\n", (long int)get_buffer_space_used(h)); process_buffer_back( h, get_buffer_space_used(h)); // In case the buffer has not yet been extended to it's full allowed // size, try to do so. if (h->z_history_buffer_size < h->z_history_maximum_buffer_size) try_to_enlarge_buffer(h, h->z_history_maximum_buffer_size); TRACE_LOG("Doing single-block-store to %p.\n", h->z_history_buffer_start); // The buffer is now as large as possible. We'll now copy as much into // it as will fit. memcpy( h->z_history_buffer_start, data, len - h->z_history_maximum_buffer_size); h->z_history_buffer_front_index = h->z_history_buffer_start; h->z_history_buffer_back_index = h->z_history_buffer_end; // At this point, we're already done. } else { // In case the input we've received is smaller than the maximum allowed // size of the history buffer, we can process the input in the regular // manner. if ((space_available = get_buffer_space_available(h)) < len) { // Currently there's not enough space available to store all of the // input, so we'll try to enlarge the buffer. missing_space = len - space_available; nof_increments = (missing_space / h->z_history_buffer_increment_size) + 1; new_size = h->z_history_buffer_size + (nof_increments * h->z_history_buffer_increment_size); TRACE_LOG("new calculated history size %ld z_ucs, max: %ld.\n", (long int)new_size, (long int)h->z_history_maximum_buffer_size); desired_size = new_size > h->z_history_maximum_buffer_size ? h->z_history_maximum_buffer_size : new_size; if (desired_size > h->z_history_buffer_size) try_to_enlarge_buffer(h, desired_size); } if (h->z_history_buffer_size < len) { // We couldn't allocate enough space to store the whole input. Thus, // we'll store as much as will currently fit. data += len - h->z_history_buffer_size; len = h->z_history_buffer_size; } TRACE_LOG("Adjusted len: %ld.\n", (long int)len); TRACE_LOG("Space in history: %ld z_ucs, buffer size: %ld z_ucs.\n", (long int)get_buffer_space_available(h), (long int)h->z_history_buffer_size); if (h->nof_wraparounds == 0) { TRACE_LOG("Not in wrap-around mode.\n"); // We're not in a wrap-around situation and thus have space until the // end of the buffer. space_available = h->z_history_buffer_end - h->z_history_buffer_front_index + 1; len_to_write = space_available > len ? len : space_available; if (len_to_write > 0) { TRACE_LOG("Writing %ld z_ucs chars to %p.\n", (long int)len_to_write, h->z_history_buffer_front_index); z_ucs_ncpy(h->z_history_buffer_front_index, data, len_to_write); h->z_history_buffer_front_index += len_to_write; } data += len_to_write; if (len_to_write == len) { /* TRACE_LOG("history:\n---\n"); TRACE_LOG_Z_UCS(h->z_history_buffer_start); TRACE_LOG("|\n---\nhistory end.\n"); */ TRACE_LOG("history-start: %p, end: %p.\n", h->z_history_buffer_start, h->z_history_buffer_end); TRACE_LOG("history-frontindex: %p, backindex: %p.\n", h->z_history_buffer_front_index, h->z_history_buffer_back_index); if (evaluate_state_block == true) write_metadata_state_block_if_necessary(h); return; } TRACE_LOG("Entering wrap-around mode.\n"); // We couldn't write everything into the buffer. Since we're not // in wrap-around yet, we'll start this now. if (++h->nof_wraparounds == 0) h->nof_wraparounds = 1; h->z_history_buffer_front_index = h->z_history_buffer_start; } // If we arrive at this point, it's either due to h->nof_wraparounds // was > 0 above, or since we were in h->nof_wraparounds == 0 // and len was still > 0 when writing up to the end of the buffer. // In both cases, we now are in wrap-around situation and have to // "throw away" chars at the back of the buffer to make room for more. while (len > 0) { if (h->z_history_buffer_front_index + len - 1 > h->z_history_buffer_end) len_to_write = (h->z_history_buffer_end - h->z_history_buffer_front_index) + 1; else len_to_write = len; process_buffer_back( h, len_to_write); TRACE_LOG("Writing %ld z_ucs chars from %p to %p.\n", (long int)len_to_write, data, h->z_history_buffer_front_index); z_ucs_ncpy(h->z_history_buffer_front_index, data, len_to_write); h->z_history_buffer_front_index += len_to_write; if (h->z_history_buffer_front_index == h->z_history_buffer_end + 1) h->z_history_buffer_front_index = h->z_history_buffer_start; len -= len_to_write; data += len_to_write; h->z_history_buffer_back_index = h->z_history_buffer_front_index; } /* TRACE_LOG("history:\n---\n"); TRACE_LOG_Z_UCS(h->z_history_buffer_start); TRACE_LOG("|\n---\nhistory end.\n"); */ } TRACE_LOG("history-start: %p, end: %p.\n", h->z_history_buffer_start, h->z_history_buffer_end); TRACE_LOG("history-frontindex: %p, backindex: %p.\n", h->z_history_buffer_front_index, h->z_history_buffer_back_index); if (evaluate_state_block == true) write_metadata_state_block_if_necessary(h); } void store_z_ucs_output_in_history(OUTPUTHISTORY *h, z_ucs *z_ucs_output) { size_t len; /* #ifdef ENABLE_TRACING z_ucs *cl; #endif // ENABLE_TRACING */ if (z_ucs_output == NULL) return; if ((len = z_ucs_len(z_ucs_output)) == 0) return; store_data_in_history(h, z_ucs_output, len, true); /* #ifdef ENABLE_TRACING cl = get_current_line(h); TRACE_LOG("currentline:|"); if (cl != NULL) { TRACE_LOG_Z_UCS(cl); free(cl); } TRACE_LOG("|line end.\n"); #endif // ENABLE_TRACING */ } // This function will really only decrement the pointer. "Only" means that // even after a successful decrement the pointer is not guaraneteed to // point at text, it may also point at the end of a metadata-entry. z_ucs *decrement_buffer_pointer(OUTPUTHISTORY *h, z_ucs *ptr, unsigned int *nof_wraparounds) { if ( (ptr == h->z_history_buffer_back_index) && (ptr == h->z_history_buffer_front_index) && (*nof_wraparounds > 0)) { TRACE_LOG("History index already at buffer back.\n"); return NULL; } ptr--; if (ptr < h->z_history_buffer_start) { if (h->nof_wraparounds == 0) { TRACE_LOG("History index at front of non-wrapped buffer.\n"); return NULL; } else { TRACE_LOG("History index at front, wrapping around.\n"); ptr = h->z_history_buffer_end; (*nof_wraparounds)--; } } return ptr; } // All "..." values must be int16_t. int store_metadata_in_history(OUTPUTHISTORY *h, int metadata_type, ...) { z_ucs output_buffer[4]; va_list ap; int16_t parameter; size_t len; unsigned int nof_wraparounds; if ( (metadata_type != HISTORY_METADATA_TYPE_FONT) && (metadata_type != HISTORY_METADATA_TYPE_STYLE) && (metadata_type != HISTORY_METADATA_TYPE_COLOUR) && (metadata_type != HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE) ) return -1; TRACE_LOG("Storing metadata type %d.\n", metadata_type); output_buffer[0] = HISTORY_METADATA_ESCAPE; output_buffer[1] = metadata_type; va_start(ap, metadata_type); // Compiler warning: // warning: ‘int16_t’ is promoted to ‘int’ when passed through ‘...’ // (so you should pass ‘int’ not ‘int16_t’ to ‘va_arg’) parameter = va_arg(ap, int); // TODO: Add verifications for other metadata-types. if ( (metadata_type == HISTORY_METADATA_TYPE_COLOUR) && ( (parameter < -2) || (parameter > 15 ) ) ) { // -2 is the lowest allowed value for Z_COLOUR_UNDEFINED, 15 the maximum // for all combinations of Z_STYLE. TRACE_LOG("Parameter value %d outside valid range.\n", parameter); i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INVALID_PARAMETER_TYPE_P0S, -1, "parameter"); } if (metadata_type == HISTORY_METADATA_TYPE_FONT) { h->history_buffer_front_index_font = parameter; TRACE_LOG("storing font.\n"); } else if (metadata_type == HISTORY_METADATA_TYPE_STYLE) { h->history_buffer_front_index_style = parameter; TRACE_LOG("storing style.\n"); } else if (metadata_type == HISTORY_METADATA_TYPE_COLOUR) { h->history_buffer_front_index_foreground = parameter; TRACE_LOG("storing colour.\n"); } else if (metadata_type == HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE) { TRACE_LOG("storing paragraph attribute.\n"); } // All parameter values are offset by +13. This is necessary to avoid // having LF characters in the buffer, which makes searching for paragraph // starts much simpler. output_buffer[2] = (z_ucs)(parameter + HISTORY_METADATA_DATA_OFFSET); TRACE_LOG("param1: %d.\n", parameter); if ( (metadata_type == HISTORY_METADATA_TYPE_COLOUR) || (metadata_type == HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE) ) { // Read second parameter for all metadatatypes which require it. parameter = va_arg(ap, int); TRACE_LOG("param2: %d.\n", parameter); if ( (metadata_type == HISTORY_METADATA_TYPE_COLOUR) && ( (parameter < -2) || (parameter > 15 ) ) ) { TRACE_LOG("Parameter value %d outside valid range.\n", parameter); i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INVALID_PARAMETER_TYPE_P0S, -1, "parameter"); h->history_buffer_front_index_background = parameter; } if (metadata_type == HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE) { //printf("STORING PARAGRAPH ATTRIBUTE \"%d\".\n", parameter); } output_buffer[3] = (z_ucs)(parameter + HISTORY_METADATA_DATA_OFFSET); len = 4; } else { len = 3; } va_end(ap); store_data_in_history(h, output_buffer, len, false); if (metadata_type == HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE) { // z_history_buffer_front_index is now pointing at the next element // in the outputhistory. In order to locate the first metadata // index we'll have to decrement it twice. h->last_written_paragraph_attribute_index = h->z_history_buffer_front_index; nof_wraparounds = h->nof_wraparounds; if ((h->last_written_paragraph_attribute_index = decrement_buffer_pointer( h, h->last_written_paragraph_attribute_index, &nof_wraparounds)) == NULL) { i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "decrement_buffer_pointer"); } if ((h->last_written_paragraph_attribute_index = decrement_buffer_pointer( h, h->last_written_paragraph_attribute_index, &nof_wraparounds)) == NULL) { i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "decrement_buffer_pointer"); } } return 0; } /* void repeat_paragraphs_from_history(OUTPUTHISTORY *history, int start_paragraph_number, int end_paragraph_number, bool allow_adjust_start_paragraph, struct history_repetition_target *target) { } int get_paragraph_y_positions(OUTPUTHISTORY *history, int screen_width, int bottom_y, int *bottom_y_pos, int top_y, int *top_y_pos, int left_padding); */ // Used to remove preloaded input: int remove_chars_from_history(OUTPUTHISTORY *history, int nof_chars) { z_ucs *ptr = history->z_history_buffer_front_index; unsigned int nof_wraparounds = history->nof_wraparounds; z_ucs last_data = 0; TRACE_LOG("Removing %d chars from history at %p.\n", nof_chars, ptr); while (nof_chars > 0) { if ((ptr = decrement_buffer_pointer( history, ptr, &nof_wraparounds)) == NULL) // Can't rewind any more. Don't change current pointer. return -1; if ( (*ptr == HISTORY_METADATA_ESCAPE) && (last_data != 0) ) { nof_chars += ( (last_data == HISTORY_METADATA_TYPE_COLOUR) || (last_data == HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE) ) ? 4 : 3; } else { last_data = *ptr; nof_chars --; } } history->z_history_buffer_front_index = ptr; history->nof_wraparounds = nof_wraparounds; TRACE_LOG("History went to %p.\n", ptr); return 0; } /* // Search from index in direction of the back index and return the position // of the next encountered newline char. static z_ucs* find_older_paragraph(OUTPUTHISTORY *h, z_ucs *index) { unsigned int nof_wraparounds = h->nof_wraparounds; if ( (h == NULL) || (h->z_history_buffer_size == 0) ) return NULL; while (*index != '\n') if ((index = decrement_buffer_pointer(h, index, &nof_wraparounds)) == NULL) return NULL; return index; } */ /* // The "get_current_line" function is deprecated. The problem is that the // conecpt of getting the current line/prompt in a single string cannot // work once metadata is encountered. // z_ucs *get_current_line(OUTPUTHISTORY *h) { z_ucs *last_stored_char_index, *last_newline_index, *result; size_t len, backlen=0, frontlen=0; bool wrap_encountered; unsigned int nof_wraparounds = 0; // Since the front_index points to the position where the next(!) character // should be written to, we've got to step back by one char position. if ((last_stored_char_index = decrement_buffer_pointer( h, h->z_history_buffer_front_index, &nof_wraparounds)) == NULL) { TRACE_LOG("no current line: can't dec ptr.\n"); return NULL; } last_newline_index = find_older_paragraph(h, last_stored_char_index); if (last_newline_index == NULL) { TRACE_LOG("already at last paragraph.\n"); return NULL; } wrap_encountered = last_newline_index > h->z_history_buffer_front_index ? true : false; if (wrap_encountered == false) len = h->z_history_buffer_front_index - last_newline_index; else { backlen = h->z_history_buffer_end - last_newline_index; frontlen = h->z_history_buffer_front_index - h->z_history_buffer_start + 1; len = backlen + frontlen; } TRACE_LOG("cl-len: %ld (%ld + %ld), wrap: %d\n", (long int)len, (long int)backlen, (long int)frontlen, wrap_encountered); result = fizmo_malloc(sizeof(z_ucs) * (len + 1)); if (wrap_encountered == false) { z_ucs_ncpy(result, last_newline_index, len); } else { z_ucs_ncpy(result, last_newline_index + 1, backlen); z_ucs_ncpy(result+backlen, h->z_history_buffer_start, frontlen); } result[len] = 0; return result; } */ void destroy_history_output(history_output *output) { free(output); } // The OUTPUTHISTORY object will ony be valid as long as nothing new is // stored in the history while using it. history_output *init_history_output(OUTPUTHISTORY *h, history_output_target *t, int output_init_flags) { history_output *result; if (is_history_empty(h)) { return NULL; } result = fizmo_malloc(sizeof(history_output)); result->history = h; result->validity_wraparounds = h->nof_wraparounds; result->validity_frontindex = h->z_history_buffer_front_index; result->target = t; result->rewound_paragraph_was_newline_terminated = false; result->validation_disabled = (output_init_flags & Z_HISTORY_OUTPUT_WITHOUT_VALIDATION) == 0 ? false : true; result->last_rewinded_paragraphs_block_index = -1; result->last_used_metadata_state_font = -1; result->last_used_metadata_state_style = -1; result->last_used_metadata_state_foreground = Z_COLOUR_UNDEFINED; result->last_used_metadata_state_background = Z_COLOUR_UNDEFINED; result->last_read_paragraph_attribute_index = NULL; result->dont_skip_newline = false; if ((output_init_flags & Z_HISTORY_OUTPUT_FROM_BUFFERBACK) == 0) { TRACE_LOG("Init from buffer front.\n"); result->current_paragraph_index = h->z_history_buffer_front_index; result->font_at_index = h->history_buffer_front_index_font; result->style_at_index = h->history_buffer_front_index_style; result->foreground_at_index = h->history_buffer_front_index_foreground; result->background_at_index = h->history_buffer_front_index_background; result->found_end_of_buffer = false; result->nof_wraparounds = 0; result->first_iteration_done = false; // Since "z_history_buffer_front_index" always points to the place where // the next char will be stored, we actually have to go back one char // in order to find the last paragraph's stored char. if ((result->current_paragraph_index = decrement_buffer_pointer( result->history, result->current_paragraph_index, &result->nof_wraparounds)) == NULL) { free(result); return NULL; } } else { TRACE_LOG("Init from buffer back.\n"); result->current_paragraph_index = h->z_history_buffer_back_index; result->font_at_index = h->history_buffer_back_index_font; result->style_at_index = h->history_buffer_back_index_style; result->foreground_at_index = h->history_buffer_back_index_foreground; result->background_at_index = h->history_buffer_back_index_background; result->found_end_of_buffer = true; result->nof_wraparounds = h->nof_wraparounds > 0 ? h->nof_wraparounds - 1 : 0; result->first_iteration_done = true; } return result; } static void validate_outputhistory(history_output *output) { if ( (output != NULL) && (output->history->nof_wraparounds == output->validity_wraparounds) && (output->validity_frontindex == output->history->z_history_buffer_front_index) ) return; else i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_HISTORYOUTPUT_NO_LONGER_VALID, -1); } static void evaluate_metadata_for_paragraph(history_output *output) { OUTPUTHISTORY *h = output->history; long int metadata_block_index; unsigned int nof_wraparounds; long int buffer_index = output->current_paragraph_index - h->z_history_buffer_start; z_ucs *index = output->current_paragraph_index; z_ucs *i2 = NULL, *i3 = NULL, *i4 = NULL; int metadata_type, parameter; if (output->validation_disabled == false) { validate_outputhistory(output); } TRACE_LOG("Evaluating metadata for current paragraph from %p.\n", output->current_paragraph_index); if (output->metadata_at_index_evaluated == true) { TRACE_LOG("Already evaluated, returning.\n"); return; } metadata_block_index = buffer_index - (buffer_index % (Z_HISTORY_METADATA_STATE_BLOCK_SIZE)); TRACE_LOG("metadata_block_index: %ld.\n", metadata_block_index); if ( (output->last_rewinded_paragraphs_block_index == metadata_block_index) && (output->last_used_metadata_state_font != -1) && (output->last_used_metadata_state_style != -1) && (output->last_used_metadata_state_foreground != Z_COLOUR_UNDEFINED) && (output->last_used_metadata_state_background != -Z_COLOUR_UNDEFINED) ) { TRACE_LOG("Re-using metadata state block.\n"); output->font_at_index = output->last_used_metadata_state_font; output->style_at_index = output->last_used_metadata_state_style; TRACE_LOG("sai: #1\n"); output->foreground_at_index = output->last_used_metadata_state_foreground; output->background_at_index = output->last_used_metadata_state_background; } else { TRACE_LOG("Searching for metadata.\n"); output->font_at_index = -1; output->style_at_index = -1; TRACE_LOG("sai: #2\n"); output->foreground_at_index = Z_COLOUR_UNDEFINED; output->background_at_index = Z_COLOUR_UNDEFINED; nof_wraparounds = output->nof_wraparounds; while ( (output->font_at_index == -1) || (output->style_at_index == -1) || (output->foreground_at_index == Z_COLOUR_UNDEFINED) || (output->background_at_index == Z_COLOUR_UNDEFINED) ) { TRACE_LOG("search-ptr: %p (%d, %d, %d, %d).\n", index, output->font_at_index, output->style_at_index, output->foreground_at_index, output->background_at_index); i4 = i3; i3 = i2; i2 = index; if ((index = decrement_buffer_pointer( output->history, index, &nof_wraparounds)) == NULL) { TRACE_LOG("Hit end of buffer. Using back values to fill in.\n"); if (output->font_at_index == -1) { output->font_at_index = h->history_buffer_back_index_font; } if (output->style_at_index == -1) { output->style_at_index = h->history_buffer_back_index_style; TRACE_LOG("sai: #3\n"); } if (output->foreground_at_index == Z_COLOUR_UNDEFINED) { output->foreground_at_index=h->history_buffer_front_index_foreground; } if (output->background_at_index == Z_COLOUR_UNDEFINED) { output->background_at_index=h->history_buffer_front_index_background; } break; } else if (*index == HISTORY_METADATA_ESCAPE) { TRACE_LOG("Metadata found at %p.\n", index); metadata_type = *i2; parameter = (int)*i3 - HISTORY_METADATA_DATA_OFFSET; if ( (metadata_type == HISTORY_METADATA_TYPE_FONT) && (output->font_at_index == -1) ) output->font_at_index = parameter; else if ( (metadata_type == HISTORY_METADATA_TYPE_STYLE) && (output->style_at_index == -1) ) { output->style_at_index = parameter; TRACE_LOG("sai: #5\n"); } else if ( (metadata_type == HISTORY_METADATA_TYPE_COLOUR) && ( (output->foreground_at_index == Z_COLOUR_UNDEFINED) || (output->background_at_index == Z_COLOUR_UNDEFINED) ) ) { output->foreground_at_index = parameter; parameter = (int)*i4- HISTORY_METADATA_DATA_OFFSET; output->background_at_index = parameter; } } } } TRACE_LOG("Done: %d, %d, %d, %d.\n", output->font_at_index, output->style_at_index, output->foreground_at_index, output->background_at_index); output->metadata_at_index_evaluated = true; } // After executing this function, the current paragraph index should always // point to the first char of the last paragraph -- not the newline before -- // or the buffer start. In case a previous paragraph could be found the return // value is 0, in case the buffer back was encountered 1 and a negative value // in case of an error. In case char_count is non-null, the number of // non-metadata chars in this paragraph is stored at this reference. int output_rewind_paragraph(history_output *output, long *char_count, int *paragraph_attr1, int *paragraph_attr2) { z_ucs *index, *last_index, *last_index2, *last_index3; int nof_chars = 0; unsigned int nof_wraparounds, last_nof_wraparounds; TRACE_LOG("Rewinding output history by one paragraph from %p.\n", output->current_paragraph_index); if (output->validation_disabled == false) { validate_outputhistory(output); } if ( (output == NULL) || (output->history == NULL) || (output->history->z_history_buffer_size == 0) ) return -1; TRACE_LOG("found_end_of_buffer: %d.\n", output->found_end_of_buffer); if (output->found_end_of_buffer == true) return 1; // We're not changing the index directly in case we're hitting a non-full // paragraph at the front. Instead, we're working on local variables and // only modify the history index in case we can find a newline. index = output->current_paragraph_index; nof_wraparounds = output->nof_wraparounds; // Rewind to last paragraph's newline since the index should always // point to the first char of a paragraph. We only have to do this if // we're not at the buffer end and have already finished at least the // first rewind iteration. if (output->first_iteration_done == true) { TRACE_LOG("Skipping over last paragraph's newline.\n"); // In case we're not at the end of the history, paragraphs are // always newline-terminated. output->rewound_paragraph_was_newline_terminated = true; // It's possible that we're already on the newline in case the very // first paragraph didn't contain anything but a newline, so we'll // only rewind further in case we're not yet there. if (output->dont_skip_newline == false) { TRACE_LOG("Rewinding from %p.\n", index); if ((index = decrement_buffer_pointer( output->history, index, &nof_wraparounds)) == NULL) { TRACE_LOG("Couldn't execute initial index decrement.\n"); return -3; } } else { output->dont_skip_newline = false; } TRACE_LOG("Looking at %p.\n", index); if (*index != '\n') { TRACE_LOG("Internal error rewinding.\n"); return -4; } last_index = index; last_nof_wraparounds = nof_wraparounds; // Rewind to last paragraph's last content char. if ((index = decrement_buffer_pointer( output->history, index, &nof_wraparounds)) == NULL) { // Here we've hit the start of the buffer, so this empty paragraph // (since we've just skipped the newline above) will be the last // we can deliver. TRACE_LOG("Couldn't execute second stop of inital index decrement.\n"); output->found_end_of_buffer = true; TRACE_LOG("found_end_of_buffer: %d.\n", output->found_end_of_buffer); //output->current_paragraph_index = index; //output->nof_wraparounds = nof_wraparounds; output->current_paragraph_index = last_index; output->nof_wraparounds = last_nof_wraparounds; return 0; } else if (*index == '\n') { // In case the next paragraph is empty, quit right away. output->current_paragraph_index = last_index; output->nof_wraparounds = last_nof_wraparounds; return 0; } } else { //printf("----------1st iteration.\n"); if (*index == '\n') { output->dont_skip_newline = true; //printf("Last output char is newline, returning from 1st iteration.\n"); TRACE_LOG("Last output char is newline, returning from 1st iteration.\n"); output->first_iteration_done = true; output->metadata_at_index_evaluated = false; if (char_count != NULL) { *char_count = 0; } //evaluate_metadata_for_paragraph(output); output->rewound_paragraph_was_newline_terminated = true; return 0; } else { output->dont_skip_newline = false; output->rewound_paragraph_was_newline_terminated = false; } //last_index = index; } output->first_iteration_done = true; TRACE_LOG("Index pointing at '%c' / %p.\n", *index, index); // The index is now pointing at the last char of the paragraph we want // to rewind over. We're rewinding until we find the newline or the // buffer start. In the latter case we've got a non-full paragraph which // we won't return. last_index = NULL; last_index2 = NULL; do { // In this loop we're remembering the last index position for two // reasons: One to be able to read the last z_ucs we've iterated over // for easier metadata evaluation (see below), second to make // skipping the newline we might find a bit easier. We're also // remebering the second- and third-last-index for paragraph attribute // envaluation. last_index3 = last_index2; last_index2 = last_index; last_index = index; last_nof_wraparounds = nof_wraparounds; if ((index = decrement_buffer_pointer( output->history, index, &nof_wraparounds)) == NULL) { // In case we can't move back any more we've hit the buffer start. TRACE_LOG("Couldn't decrement history index.\n"); output->found_end_of_buffer = true; break; /* if (output->current_paragraph_index != last_index) { output->current_paragraph_index = last_index; output->metadata_at_index_evaluated = false; //output->found_end_of_buffer = true; //evaluate_metadata_for_paragraph(output); if (char_count != NULL) { *char_count = nof_chars; } return 0; } else return -1; */ } nof_chars++; if (*index == HISTORY_METADATA_ESCAPE) { if (*last_index == HISTORY_METADATA_TYPE_COLOUR) { nof_chars -= 4; } else if (*last_index == HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE) { if (paragraph_attr1 != NULL) { *paragraph_attr1 = *last_index2 - HISTORY_METADATA_DATA_OFFSET; } if (paragraph_attr2 != NULL) { *paragraph_attr2 = *last_index3 - HISTORY_METADATA_DATA_OFFSET; } nof_chars -= 4; } else { nof_chars -= 3; } } TRACE_LOG("Index pointing at '%c' / %p.\n", *index, index); } while (*index != '\n'); output->current_paragraph_index = last_index; output->nof_wraparounds = last_nof_wraparounds; output->metadata_at_index_evaluated = false; evaluate_metadata_for_paragraph(output); if (char_count != NULL) { *char_count = nof_chars; } return 0; /* // We'll only consider "full" paragraphs when reading the history, which // means that in case the buffer front is not on a newline, we'll just // return 1. if (*index == '\n') { // paragraph found TRACE_LOG("Start of new paragraph found at %p.\n", last_index); output->current_paragraph_index = last_index; return 0; } else { // start of buffer found TRACE_LOG("Buffer front encountered at %p.\n", index); output->current_paragraph_index = index; output->found_end_of_buffer = true; return 1; } */ } int alter_last_read_paragraph_attributes(history_output *output, int paragraph_attr1, int paragraph_attr2) { z_ucs *index; validate_outputhistory(output); if (output->last_read_paragraph_attribute_index == NULL) { TRACE_LOG("Not altering paragraph attributes, pointer is NULL.\n"); return -1; } /* printf("Alter last read paragraph metadata at %p.\n", output->last_read_paragraph_attribute_index); printf("Altering last read paragraph attributes to %d and %d.\n", paragraph_attr1, paragraph_attr2); */ TRACE_LOG("Altering last read paragraph attributes to %d and %d.\n", paragraph_attr1, paragraph_attr2); index = output->last_read_paragraph_attribute_index; *index = (z_ucs)(paragraph_attr1 + HISTORY_METADATA_DATA_OFFSET); if (++index > output->history->z_history_buffer_end) { index = output->history->z_history_buffer_start; } *index = (z_ucs)(paragraph_attr2 + HISTORY_METADATA_DATA_OFFSET); return 0; } int alter_last_written_paragraph_attributes(OUTPUTHISTORY *h, int paragraph_attr1, int paragraph_attr2) { z_ucs *index; if (h->last_written_paragraph_attribute_index == NULL) { TRACE_LOG("Not altering paragraph attributes, pointer is NULL.\n"); return -1; } index = h->last_written_paragraph_attribute_index; //printf("ALTER PARAGRAPH ATTR HISTORY TO %d.\n", paragraph_attr1); *index = (z_ucs)(paragraph_attr1 + HISTORY_METADATA_DATA_OFFSET); if (++index > h->z_history_buffer_end) { index = h->z_history_buffer_start; } *index = (z_ucs)(paragraph_attr2 + HISTORY_METADATA_DATA_OFFSET); return 0; } bool is_output_at_frontindex(history_output *output) { if (output->validation_disabled == false) { validate_outputhistory(output); } if (output->current_paragraph_index == output->history->z_history_buffer_front_index) { return true; } else { return false; } } int output_repeat_paragraphs(history_output *output, int n, bool include_metadata, bool advance_history_pointer) { z_ucs output_buf[REPEAT_PARAGRAPH_BUF_SIZE]; z_ucs *output_ptr = output->current_paragraph_index; int buf_index; int metadata_type = -1, parameter, parameter2; if (output->validation_disabled == false) { validate_outputhistory(output); } if (include_metadata == true) evaluate_metadata_for_paragraph(output); TRACE_LOG("Repeating output history from %p.\n", output_ptr); /* // If we're already at the front index, quit. if (output_ptr == output->history->z_history_buffer_front_index) return 0; */ output->target->set_font( output->font_at_index); output->target->set_text_style( output->style_at_index); output->target->set_colour( output->foreground_at_index, output->background_at_index, -1); if (advance_history_pointer == true) output->found_end_of_buffer = false; buf_index = 0; if (output_ptr == output->history->z_history_buffer_front_index) { TRACE_LOG("Already at buffer front.\n"); n = -1; } else { while (n > 0) { TRACE_LOG("Looking at %p.\n", output_ptr); if (*output_ptr == '\n') { n--; } if ( (buf_index == REPEAT_PARAGRAPH_BUF_SIZE - 1) || (n < 1) || (*output_ptr == HISTORY_METADATA_ESCAPE) || (output_ptr == output->history->z_history_buffer_front_index) ) { output_buf[buf_index] = 0; TRACE_LOG("Sending %d char(s) of output.\n", buf_index); output->target->z_ucs_output(output_buf); if (output_ptr == output->history->z_history_buffer_front_index) { TRACE_LOG("Buffer front encountered.\n"); break; } if (n < 1) { TRACE_LOG("n < 1.\n"); break; } buf_index = 0; if (*output_ptr == HISTORY_METADATA_ESCAPE) { TRACE_LOG("Metadata found at %p in output.\n", output_ptr); if (++output_ptr > output->history->z_history_buffer_end) output_ptr = output->history->z_history_buffer_start; metadata_type = *output_ptr; if (++output_ptr > output->history->z_history_buffer_end) output_ptr = output->history->z_history_buffer_start; parameter = (int)*output_ptr - HISTORY_METADATA_DATA_OFFSET; if (metadata_type == HISTORY_METADATA_TYPE_FONT) { output->font_at_index = parameter; if (include_metadata == true) output->target->set_font(parameter); } else if (metadata_type == HISTORY_METADATA_TYPE_STYLE) { output->style_at_index = parameter; if (include_metadata == true) output->target->set_text_style(parameter); } else if (metadata_type == HISTORY_METADATA_TYPE_COLOUR) { if (++output_ptr > output->history->z_history_buffer_end) output_ptr = output->history->z_history_buffer_start; parameter2 = (int)*output_ptr - HISTORY_METADATA_DATA_OFFSET; output->foreground_at_index = parameter; output->background_at_index = parameter2; if (include_metadata == true) output->target->set_colour(parameter, parameter2, -1); } else if (metadata_type == HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE) { output->last_read_paragraph_attribute_index = output_ptr; // Don't do anything but catch the case in order that we're // not running into the error-else below. if (++output_ptr > output->history->z_history_buffer_end) output_ptr = output->history->z_history_buffer_start; //parameter2 = (int)*output_ptr - HISTORY_METADATA_DATA_OFFSET; } else { TRACE_LOG("Invalid metadata type %d\n", metadata_type); i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INVALID_PARAMETER_TYPE_P0S, -1, "metadata"); } } } if (metadata_type == -1) { output_buf[buf_index++] = *output_ptr; } else { metadata_type = -1; } if ((++output_ptr) > output->history->z_history_buffer_end) output_ptr = output->history->z_history_buffer_start; } } TRACE_LOG("n: %d.\n", n); if (advance_history_pointer == true) { output->current_paragraph_index = output_ptr; if (output->current_paragraph_index != output->history->z_history_buffer_front_index) { output->current_paragraph_index += 1; } else { output->first_iteration_done = false; if (*(output->current_paragraph_index) == '\n') { output->rewound_paragraph_was_newline_terminated = true; } else { output->rewound_paragraph_was_newline_terminated = false; } output->first_iteration_done = false; TRACE_LOG("first_iteration_done: %d.\n", output->first_iteration_done); } // There might be more metadata blocks after this newline. These // also have to be evaluated if the metadata should be correct // after advancing the pointer. if (*output_ptr == HISTORY_METADATA_ESCAPE) { TRACE_LOG("Found metadata-escape.\n"); } } TRACE_LOG("Repeated output, last included output char: %p.\n", output_ptr); return n; } void remember_history_output_position(history_output *output) { if (output->validation_disabled == false) { validate_outputhistory(output); } output->saved_current_paragraph_index = output->current_paragraph_index; output->saved_nof_wraparounds = output->nof_wraparounds; output->saved_found_end_of_buffer = output->found_end_of_buffer; output->saved_first_iteration_done = output->first_iteration_done; output->saved_rewound_paragraph_was_newline_terminated = output->rewound_paragraph_was_newline_terminated; output->saved_metadata_at_index_evaluated = output->metadata_at_index_evaluated; output->saved_font_at_index = output->font_at_index; output->saved_style_at_index = output->style_at_index; output->saved_foreground_at_index = output->foreground_at_index; output->saved_background_at_index = output->background_at_index; output->saved_last_rewinded_paragraphs_block_index = output->last_rewinded_paragraphs_block_index; output->saved_last_used_metadata_state_font = output->last_used_metadata_state_font; output->saved_last_used_metadata_state_style = output->last_used_metadata_state_style; output->saved_last_used_metadata_state_foreground = output->last_used_metadata_state_foreground; output->saved_last_used_metadata_state_background = output->last_used_metadata_state_background; } void restore_history_output_position(history_output *output) { if (output->validation_disabled == false) { validate_outputhistory(output); } output->current_paragraph_index = output->saved_current_paragraph_index; output->nof_wraparounds = output->nof_wraparounds; output->found_end_of_buffer = output->saved_found_end_of_buffer; output->rewound_paragraph_was_newline_terminated = output->saved_rewound_paragraph_was_newline_terminated; output->first_iteration_done = output->saved_first_iteration_done; output->metadata_at_index_evaluated = output->saved_metadata_at_index_evaluated; output->font_at_index = output->saved_font_at_index; output->style_at_index = output->saved_style_at_index; TRACE_LOG("sai: #4\n"); output->foreground_at_index = output->saved_foreground_at_index; output->background_at_index = output->saved_background_at_index; output->last_rewinded_paragraphs_block_index = output->saved_last_rewinded_paragraphs_block_index; output->last_used_metadata_state_font = output->saved_last_used_metadata_state_font; output->last_used_metadata_state_style = output->saved_last_used_metadata_state_style; output->last_used_metadata_state_foreground = output->saved_last_used_metadata_state_foreground; output->last_used_metadata_state_background = output->saved_last_used_metadata_state_background; } size_t get_allocated_text_history_size(OUTPUTHISTORY *h) { return h->z_history_buffer_size; } bool is_history_empty(OUTPUTHISTORY *h) { if ( (h == NULL) || (h->z_history_buffer_size == 0) ) { return true; } else { return false; } } #endif /* history_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/sound.h0000644000175000017500000000332613153330674020231 0ustar chrenderchrender /* sound.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef sound_h_INCLUDED #define sound_h_INCLUDED void opcode_sound_effect(void); #endif /* sound_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/routine.c0000644000175000017500000002417213153330674020563 0ustar chrenderchrender /* routine.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef routine_c_INCLUDED #define routine_c_INCLUDED #include #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "routine.h" #include "stack.h" #include "variable.h" #include "zpu.h" #include "fizmo.h" #include "../locales/libfizmo_locales.h" int16_t number_of_stack_frames = 0; static int last_result_var; static void unwind_stack_frame(int16_t result_value, bool force_discard_result) { uint16_t stack_word; bool discard_result; uint8_t argument_mask; TRACE_LOG("Stack pointer: %ld.\n", (long int)(z_stack_index - z_stack)); TRACE_LOG("Dropping stack (%d words) and locals (%d words).\n", (unsigned)stack_words_from_active_routine, (unsigned)number_of_locals_active); // First, we drop the active routine's stack contents and the local // variables. drop_z_stack_words( (int)(stack_words_from_active_routine + number_of_locals_active)); number_of_stack_frames--; TRACE_LOG("Number of stack frames: %d.\n", number_of_stack_frames); stack_word = z_stack_pull_word(); last_result_var = stack_word & 0xff; pc = (z_mem + ((z_stack_pull_word() << 8) | (stack_word >> 8))); stack_words_from_active_routine = (int)z_stack_pull_word(); TRACE_LOG("Stack word in this routine: %d.\n", (int)stack_words_from_active_routine); stack_word = z_stack_pull_word(); number_of_locals_active = stack_word & 0xf; discard_result = ((stack_word & 0x10) != 0 ? true : false); argument_mask = (stack_word >> 8); number_of_locals_from_function_call = 0; while (argument_mask != 0) { number_of_locals_from_function_call++; argument_mask >>= 1; } TRACE_LOG("Locals active in this routine: %d.\n", number_of_locals_active); local_variable_storage_index = z_stack_index - stack_words_from_active_routine - number_of_locals_active; TRACE_LOG("Locals from function call: %d.\n", number_of_locals_from_function_call); TRACE_LOG("Returning to %lx.\n", (unsigned long int)(pc - z_mem)); if ( (bool_equal(discard_result, false)) && (bool_equal(force_discard_result, false)) ) { TRACE_LOG("Storing routine call result %x in variable code %x.\n", result_value, last_result_var); set_variable(last_result_var, (uint16_t)result_value, false); } } void return_from_routine(int16_t result_value) { unwind_stack_frame(result_value, false); } void call_routine( uint32_t target_routine_address, uint8_t result_variable_number, bool discard_result, uint8_t number_of_arguments) { uint8_t i; #ifdef ENABLE_TRACING TRACE_LOG("Calling routine at %x.\n", (unsigned)target_routine_address); if (discard_result != 0) { TRACE_LOG("Result will be discarded.\n"); } else TRACE_LOG("Result will be stored in variable code %x.\n", result_variable_number); #endif /* ENABLE_TRACING */ if (target_routine_address == 0) { // When the address 0 is called as a routine, nothing happens and // the return value is false // 6.4.5: The return value of a routine can be any Z-machine number. // Returning 'false' means returning 0; returning 'true' means // returning 1. TRACE_LOG("Target address is 0, returning false(0).\n"); if (discard_result == 0) set_variable(result_variable_number, 0, false); return; } TRACE_LOG("Return address: %lx.\n", (unsigned long int)(pc - z_mem)); store_followup_stack_frame_header( number_of_locals_active, discard_result, number_of_locals_from_function_call, stack_words_from_active_routine, pc - z_mem, result_variable_number); pc = z_mem + target_routine_address; number_of_locals_active = *(pc++); if (number_of_locals_active > 15) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_MORE_THAN_15_LOCALS_ARE_NOT_ALLOWED, -1); TRACE_LOG("Routine has %d locals.\n", number_of_locals_active); local_variable_storage_index = allocate_z_stack_words(number_of_locals_active); // For Z-Machines version <= 4, the contens of the local variables are // defined by the following bytes which can be copied over directly. // For version >= 5, the initial values are all set to zero. if (ver <= 4) { // memcpy usage poses certain problem when used on a little endian // machine (i386 and the like). Thus, in order to avoid all the // fuss with little/big-endian detection, i'll not use memcpy // but copy stuff by hand. //memcpy((uint8_t*)local_variable_storage_index, pc, //number_of_locals_active*2); for (i=0; i number_of_stack_frames) || (dest_stack_frame < 1) ) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INVALID_THROW_DESTINATION_STACK_INDEX_P0D, -1, (long)dest_stack_frame); while (number_of_stack_frames > dest_stack_frame) unwind_stack_frame(0, true); set_variable(last_result_var, op[0], false); } void opcode_catch(void) { TRACE_LOG("Opcode: CATCH.\n"); read_z_result_variable(); set_variable(z_res_var, (uint16_t)number_of_stack_frames, false); } void opcode_call_vs2(void) { TRACE_LOG("Opcode: CALL_VS2.\n"); read_z_result_variable(); call_routine( get_packed_routinecall_address(op[0]), z_res_var, false, number_of_operands - 1); } void opcode_call_vn2(void) { TRACE_LOG("Opcode: CALL_VN2.\n"); call_routine( get_packed_routinecall_address(op[0]), 0, true, number_of_operands - 1); } #endif /* routine_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/history.h0000644000175000017500000001721013153330674020577 0ustar chrenderchrender /* history.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef history_h_INCLUDED #define history_h_INCLUDED #include "../tools/tracelog.h" #include "../tools/types.h" #include "../tools/z_ucs.h" #define HISTORY_METADATA_ESCAPE 0 #define HISTORY_METADATA_TYPE_FONT 1 #define HISTORY_METADATA_TYPE_STYLE 2 #define HISTORY_METADATA_TYPE_COLOUR 3 #define HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE 4 #define HISTORY_METADATA_DATA_OFFSET 13 #define Z_HISTORY_INCREMENT_SIZE 8*1024 // given in units of z_ucs #define Z_HISTORY_MAXIMUM_SIZE 128*1024*1024 // given in units of z_ucs #define Z_HISTORY_METADATA_STATE_BLOCK_SIZE 16*1024 // given in units of z_ucs #define Z_HISTORY_OUTPUT_WITHOUT_EXTRAS 0 #define Z_HISTORY_OUTPUT_FROM_BUFFERBACK 1 #define Z_HISTORY_OUTPUT_WITHOUT_VALIDATION 2 typedef struct { int window_number; size_t z_history_buffer_size; size_t z_history_maximum_buffer_size; // unit is z_ucs. size_t z_history_buffer_increment_size; z_ucs *z_history_buffer_start; // this will be the result of malloc() z_ucs *z_history_buffer_end; unsigned int nof_wraparounds; // In general, z_history_buffer_front_index denotes the next write position. // In case z_history_buffer_front_index == z_history_buffer_back_index, // wrapped_around has to be checked to distinguish between an empty buffer // and a full, wrapped-around buffer. z_ucs *z_history_buffer_front_index; z_ucs *z_history_buffer_back_index; long int last_metadata_block_index; z_ucs *next_newline_after_buffer_back; z_ucs *last_written_paragraph_attribute_index; // These four values are set when fizmo opens the interface (and when the // values are used in the current version). They keep the current state of // the back-end index of the history queue. This is necessary, since // for example the command to set colour to a given value has already // been overwritten in the history, but the text using the colour is still // in the buffer. z_font history_buffer_back_index_font; z_style history_buffer_back_index_style; z_colour history_buffer_back_index_foreground; z_colour history_buffer_back_index_background; z_font history_buffer_front_index_font; z_style history_buffer_front_index_style; z_colour history_buffer_front_index_foreground; z_colour history_buffer_front_index_background; } OUTPUTHISTORY; typedef struct { void (*set_text_style)(z_style text_style); void (*set_colour)(z_colour foreground, z_colour background, int16_t window); void (*set_font)(z_font font_type); void (*z_ucs_output)(z_ucs *z_ucs_output); } history_output_target; typedef struct { OUTPUTHISTORY *history; // The following two properties are used to ensure that no output has // been written to the history that this output-object is pointing to. unsigned int validity_wraparounds; z_ucs *validity_frontindex; history_output_target *target; z_ucs *current_paragraph_index; unsigned int nof_wraparounds; bool found_end_of_buffer; bool rewound_paragraph_was_newline_terminated; bool first_iteration_done; bool validation_disabled; bool dont_skip_newline; bool metadata_at_index_evaluated; z_font font_at_index; z_style style_at_index; z_colour foreground_at_index; z_colour background_at_index; // In case the last metadata-evaluation for the last paragraph had to use // the metadata-state-block for any metadata-element, these values are // stored in the "last_user_metadata_state_*" variables. In case some // values were not used, -1 should is stored for the current block. long int last_rewinded_paragraphs_block_index; z_font last_used_metadata_state_font; z_style last_used_metadata_state_style; z_colour last_used_metadata_state_foreground; z_colour last_used_metadata_state_background; // Storage for state-saving: z_ucs *saved_current_paragraph_index; unsigned int saved_nof_wraparounds; bool saved_found_end_of_buffer; bool saved_rewound_paragraph_was_newline_terminated; bool saved_first_iteration_done; bool saved_metadata_at_index_evaluated; z_font saved_font_at_index; z_style saved_style_at_index; z_colour saved_foreground_at_index; z_colour saved_background_at_index; long int saved_last_rewinded_paragraphs_block_index; z_font saved_last_used_metadata_state_font; z_style saved_last_used_metadata_state_style; z_colour saved_last_used_metadata_state_foreground; z_colour saved_last_used_metadata_state_background; z_ucs *last_read_paragraph_attribute_index; } history_output; typedef OUTPUTHISTORY *outputhistory_ptr; #ifndef history_c_INCLUDED extern outputhistory_ptr outputhistory[]; #endif OUTPUTHISTORY *create_outputhistory(int window_number, size_t maximum_buffer_size, size_t buffer_increment_size, z_colour foreground_colour, z_colour background_color, z_font font, z_style style); void destroy_outputhistory(OUTPUTHISTORY *history); void store_z_ucs_output_in_history(OUTPUTHISTORY *history, z_ucs *z_ucs_output); int store_metadata_in_history(OUTPUTHISTORY *history, int metadata_type, ...); void store_data_in_history(OUTPUTHISTORY *h, z_ucs *data, size_t len, bool evaluate_state_block); int remove_chars_from_history(OUTPUTHISTORY *history, int nof_chars); //z_ucs *get_current_line(OUTPUTHISTORY *history); history_output *init_history_output(OUTPUTHISTORY *h, history_output_target *t, int output_init_flags); int output_rewind_paragraph(history_output *output, long *char_count, int *paragraph_attr1, int *paragraph_attr2); int alter_last_read_paragraph_attributes(history_output *output, int paragraph_attr1, int paragraph_attr2); int alter_last_written_paragraph_attributes(OUTPUTHISTORY *h, int paragraph_attr1, int paragraph_attr2); int output_repeat_paragraphs(history_output *output, int n, bool include_metadata, bool advance_history_pointer); void destroy_history_output(history_output *output); void remember_history_output_position(history_output *output); void restore_history_output_position(history_output *output); size_t get_allocated_text_history_size(OUTPUTHISTORY *h); bool is_output_at_frontindex(history_output *output); bool is_history_empty(OUTPUTHISTORY *h); #endif /* history_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/object.c0000644000175000017500000007347613153330674020357 0ustar chrenderchrender /* object.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "object.h" #include "fizmo.h" #include "variable.h" #include "zpu.h" #include "streams.h" #include "../locales/libfizmo_locales.h" /*@dependent@*/ static uint8_t *get_object_address(uint16_t object_number) { TRACE_LOG("Reading object address from object %d.\n", object_number); TRACE_LOG("Object tree at $%lx.\n", (unsigned long int)(active_z_story->object_tree - z_mem)); TRACE_LOG("Object size: %d bytes.\n", active_z_story->object_size); #ifdef STRICT_Z if (object_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_address", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return NULL; } if (object_number > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_address", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)object_number, (long int)ver); streams_latin1_output("\n"); return NULL; } #endif // STRICT_Z TRACE_LOG("Returning $%lx as object address.\n", (unsigned long int)(active_z_story->object_tree + (active_z_story->object_size * object_number) - z_mem)); return active_z_story->object_tree + (active_z_story->object_size * object_number); } static uint8_t get_object_attribute(uint16_t object_number, uint8_t attribute_number) { uint8_t *object_address = get_object_address(object_number); uint8_t byte_number; uint8_t attribute_byte_value; uint8_t attribute_bit_mask; TRACE_LOG("Reading attribute %d from object %d.\n", attribute_number, object_number); #ifdef STRICT_Z if (object_address == NULL) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_attribute", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_NULL_POINTER_RECEIVED); streams_latin1_output("\n"); return 0; } if (object_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_attribute", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return 0; } if (attribute_number > active_z_story->maximum_attribute_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_attribute", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_ATTRIBUTE_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)attribute_number, (long int)ver); streams_latin1_output("\n"); return 0; } #endif // STRICT_Z byte_number = attribute_number >> 3; TRACE_LOG("Accessing attribute byte number %d.\n", byte_number); attribute_byte_value = object_address[byte_number]; TRACE_LOG("Attribute byte value: $%x.\n", attribute_byte_value); attribute_bit_mask = (uint8_t)(0x80 >> (attribute_number & 0x7)); TRACE_LOG("Attribute bit mask: $%x.\n", attribute_bit_mask); if ((attribute_byte_value & attribute_bit_mask) != 0) return 1; else return 0; } static void set_object_attribute(uint16_t object_number, uint8_t attribute_number, uint8_t new_attribute_value) { uint8_t *object_address = get_object_address(object_number); uint8_t byte_number; uint8_t attribute_bit_mask; TRACE_LOG("Setting attribute %d from object %d to %d.\n", attribute_number, object_number, new_attribute_value); #ifdef STRICT_Z if (object_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "set_object_attribute", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return; } if (attribute_number > active_z_story->maximum_attribute_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "set_object_attribute", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_ATTRIBUTE_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)attribute_number, (long int)ver); streams_latin1_output("\n"); return; } if (object_address == NULL) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "set_object_attribute", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_NULL_POINTER_RECEIVED); streams_latin1_output("\n"); return; } #endif // STRICT_Z byte_number = attribute_number >> 3; TRACE_LOG("Accessing attribute byte number %d.\n", byte_number); TRACE_LOG("Previous attribute byte value: $%x.\n", object_address[byte_number]); attribute_bit_mask = (uint8_t)(0x80 >> (attribute_number & 0x7)); if (new_attribute_value == 0) { attribute_bit_mask = ~attribute_bit_mask; object_address[byte_number] &= attribute_bit_mask; } else object_address[byte_number] |= attribute_bit_mask; TRACE_LOG("Final attribute byte value: $%x.\n", object_address[byte_number]); } static uint16_t get_object_node_number(uint16_t object_number, uint8_t node_type) { uint8_t *object_address = get_object_address(object_number); #ifdef STRICT_Z if (object_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_node_number", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return 0; } if (object_number > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_node_number", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)object_number, (long int)ver); streams_latin1_output("\n"); return 0; } if (object_address == NULL) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_node_number", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_NULL_POINTER_RECEIVED); streams_latin1_output("\n"); return 0; } if ((node_type != OBJECT_NODE_PARENT) && (node_type != OBJECT_NODE_SIBLING) && (node_type != OBJECT_NODE_CHILD)) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_node_number", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_INVALID_NODE_TYPE_P0D, (long int)node_type); streams_latin1_output("\n"); return 0; } #endif // STRICT_Z if (ver <= 3) return *(object_address + active_z_story->object_node_number_index + node_type); else return load_word(object_address + active_z_story->object_node_number_index + node_type*2); } static void set_object_node_number(uint16_t object_number, uint8_t node_type, uint16_t new_node_number) { uint8_t *object_address = get_object_address(object_number); #ifdef STRICT_Z if (object_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "set_object_node_number", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return; } if ((object_number > active_z_story->maximum_object_number) || (new_node_number > active_z_story->maximum_object_number)) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "set_object_node_number", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)object_number, (long int)ver); streams_latin1_output("\n"); return; } if ((node_type != OBJECT_NODE_PARENT) && (node_type != OBJECT_NODE_SIBLING) && (node_type != OBJECT_NODE_CHILD)) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "set_object_node_number", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_INVALID_NODE_TYPE_P0D, (long int)node_type); streams_latin1_output("\n"); return; } if (object_address == NULL) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "set_object_node_number", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_NULL_POINTER_RECEIVED); streams_latin1_output("\n"); return; } #endif // STRICT_Z if (ver <= 3) *(object_address + active_z_story->object_node_number_index + node_type) = new_node_number; else store_word (object_address + active_z_story->object_node_number_index + node_type*2, new_node_number); } /*@dependent@*/ uint8_t *get_objects_property_table(uint16_t object_number) { uint8_t *object_address = get_object_address(object_number); #ifdef STRICT_Z if (object_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_objects_property_table", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return NULL; } if (object_number > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_objects_property_table", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)object_number, (long int)ver); streams_latin1_output("\n"); return NULL; } if (object_address == NULL) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "set_object_node_number", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_NULL_POINTER_RECEIVED); streams_latin1_output("\n"); return 0; } #endif // STRICT_Z TRACE_LOG("Property table of object %d is at $%x.\n", object_number, load_word(object_address + active_z_story->object_property_index)); return z_mem + load_word(object_address + active_z_story->object_property_index); } static void unlink_object(uint16_t object_number) { uint16_t parent_node; uint16_t sibling_node; uint16_t next_sibling_node; #ifdef STRICT_Z if (object_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "unlink_object", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return; } if (object_number > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "unlink_object", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)object_number, (long int)ver); streams_latin1_output("\n"); return; } #endif // STRICT_Z TRACE_LOG("Unlinking object %d.\n", object_number); // In order to unlink an object we have to check if it is the direct // child of it's parent. If so, we have to delete this reference and // substitute it with the reference to the next sibling (if it exists). // We also have to remove the sibling's reference to this object and // replace it with this object's sibling reference. // In case the object is already unlinked, there's nothing to be done. TRACE_LOG("Current parent of %d is %d.\n", object_number, get_object_node_number(object_number, OBJECT_NODE_PARENT)); parent_node = get_object_node_number(object_number, OBJECT_NODE_PARENT); if (parent_node == 0) return; // Check if this object is the first child of it's parent. if (get_object_node_number(parent_node, OBJECT_NODE_CHILD) == object_number) { // If it is, we replace our reference with reference to the next // sibling. That's everything we'll have to do, since we're the first // child, no other sibling can have a reference to this object. TRACE_LOG("New child of %d is %d.\n", parent_node, get_object_node_number(object_number, OBJECT_NODE_SIBLING)); set_object_node_number(parent_node, OBJECT_NODE_CHILD, get_object_node_number(object_number, OBJECT_NODE_SIBLING)); } else { // In case we're not the first child, we'll have to find the sibling // that contains the reference to our node. TRACE_LOG("Looking for node with sibling == %d.\n", object_number); next_sibling_node = get_object_node_number(parent_node, OBJECT_NODE_CHILD); do { sibling_node = next_sibling_node; next_sibling_node = get_object_node_number(sibling_node, OBJECT_NODE_SIBLING); } while ((next_sibling_node != object_number) && (next_sibling_node != 0)); if (next_sibling_node == 0) { TRACE_LOG("Warning: Parent has no sibling with reference to node."); } else { TRACE_LOG("New sibling of %d is %d.\n", sibling_node, get_object_node_number(object_number, OBJECT_NODE_SIBLING)); set_object_node_number( sibling_node, OBJECT_NODE_SIBLING, get_object_node_number(object_number, OBJECT_NODE_SIBLING)); } } TRACE_LOG("Seeting parent and sibling of %d to 0.\n", object_number); set_object_node_number(object_number, OBJECT_NODE_SIBLING, 0); set_object_node_number(object_number, OBJECT_NODE_PARENT, 0); } void opcode_get_sibling(void) { uint16_t sibling_number; TRACE_LOG("Opcode: GET_SIBLING.\n"); read_z_result_variable(); #ifdef STRICT_Z if (op[0]== 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_sibling", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); evaluate_branch(0); return; } if (op[0] > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_sibling", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[0], (long int)ver); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); evaluate_branch(0); return; } #endif // STRICT_Z sibling_number = get_object_node_number(op[0], OBJECT_NODE_SIBLING); TRACE_LOG("Checking if sibling of object %d (which is %d) is not 0.\n", op[0], sibling_number); set_variable(z_res_var, sibling_number, false); evaluate_branch(sibling_number != 0 ? (uint8_t)1 : (uint8_t)0); } void opcode_get_child(void) { uint16_t child_number; TRACE_LOG("Opcode: GET_CHILD.\n"); read_z_result_variable(); #ifdef STRICT_Z if (op[0]== 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_child", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); evaluate_branch(0); return; } if (op[0] > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_child", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[0], (long int)ver); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); evaluate_branch(0); return; } #endif // STRICT_Z child_number = get_object_node_number(op[0], OBJECT_NODE_CHILD); TRACE_LOG("Checking if child of object %d (which is %d) is not 0.\n", op[0], child_number); set_variable(z_res_var, child_number, false); evaluate_branch(child_number != 0 ? (uint8_t)1 : (uint8_t)0); } void opcode_get_parent(void) { uint16_t parent_number; TRACE_LOG("Opcode: GET_PARENT.\n"); read_z_result_variable(); #ifdef STRICT_Z if (op[0]== 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_parent", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); return; } if (op[0] > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_parent", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[0], (long int)ver); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); return; } #endif // STRICT_Z parent_number = get_object_node_number(op[0], OBJECT_NODE_PARENT); TRACE_LOG("Checking if parent of object %d (which is %d) is not 0.\n", op[0], parent_number); set_variable(z_res_var, parent_number, false); } void opcode_jin(void) { TRACE_LOG("Opcode: JIN.\n"); TRACE_LOG("Checking if parent of object %d is %d.\n", op[0], op[1]); #ifdef STRICT_Z if ((op[0] == 0) || (op[1] == 0)) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_jin", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); evaluate_branch(op[0] == op[1] ? 1 : 0); return; } if (op[0] > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_jin", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[0], (long int)ver); streams_latin1_output("\n"); evaluate_branch(0); return; } if (op[1] > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_jin", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[1], (long int)ver); streams_latin1_output("\n"); evaluate_branch(0); return; } #endif // STRICT_Z evaluate_branch( get_object_node_number( op[0], OBJECT_NODE_PARENT) == op[1] ? (uint8_t)1 : (uint8_t)0); } void opcode_set_attr(void) { TRACE_LOG("Opcode: SET_ATTR.\n"); TRACE_LOG("Setting attribute %d in object %d.\n", op[1], op[0]); #ifdef STRICT_Z if (op[0] == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_set_attr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return; } if (op[0] > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_set_attr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[0], (long int)ver); streams_latin1_output("\n"); return; } if (op[1] > active_z_story->maximum_attribute_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_set_attr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_ATTRIBUTE_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[1], (long int)ver); streams_latin1_output("\n"); return; } #endif // STRICT_Z set_object_attribute(op[0], op[1], 1); } void opcode_test_attr(void) { TRACE_LOG("Opcode: TEST_ATTR.\n"); TRACE_LOG("Testing object %d for attribute %d.\n", op[0], op[1]); #ifdef STRICT_Z if (op[0] == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_test_attr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); evaluate_branch(0); return; } if (op[0] > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_test_attr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[0], (long int)ver); streams_latin1_output("\n"); evaluate_branch(0); return; } if (op[1] > active_z_story->maximum_attribute_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_test_attr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_ATTRIBUTE_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[1], (long int)ver); streams_latin1_output("\n"); evaluate_branch(0); return; } #endif // STRICT_Z evaluate_branch(get_object_attribute(op[0], op[1])); } void opcode_insert_obj(void) { TRACE_LOG("Opcode: INSERT_OBJ.\n"); TRACE_LOG("Inserting object %d as first child in object %d.\n",op[0],op[1]); #ifdef STRICT_Z if ((op[0] == 0) || (op[1] == 0)) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_remove_attr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return; } #endif // STRICT_Z unlink_object(op[0]); TRACE_LOG("New sibling of %d is %d.\n", op[0], get_object_node_number(op[1], OBJECT_NODE_CHILD)); set_object_node_number( op[0], OBJECT_NODE_SIBLING, get_object_node_number(op[1], OBJECT_NODE_CHILD)); TRACE_LOG("New child of %d is %d.\n", op[1], op[0]); set_object_node_number(op[1], OBJECT_NODE_CHILD, op[0]); TRACE_LOG("New parent of %d is %d.\n", op[0], op[1]); set_object_node_number(op[0], OBJECT_NODE_PARENT, op[1]); } void opcode_clear_attr(void) { TRACE_LOG("Opcode: CLEAR_ATTR.\n"); TRACE_LOG("Clearing attribute %d of object %d.\n", op[1], op[0]); #ifdef STRICT_Z if (op[0] == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_clear_attr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return; } if (op[0] > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_clear_attr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[0], (long int)ver); streams_latin1_output("\n"); return; } if (op[1] > active_z_story->maximum_attribute_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_clear_attr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_ATTRIBUTE_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[1], (long int)ver); streams_latin1_output("\n"); return; } #endif // STRICT_Z set_object_attribute(op[0], op[1], 0); } void opcode_remove_obj(void) { TRACE_LOG("Opcode: REMOVE_OBJ.\n"); TRACE_LOG("Removing object %d.\n", op[0]); #ifdef STRICT_Z if (op[0] == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_remove_attr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return; } #endif // STRICT_Z unlink_object(op[0]); } libfizmo-0.7.15/src/interpreter/savegame.h0000644000175000017500000000520613153330674020670 0ustar chrenderchrender /* savegame.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef savegame_h_INCLUDED #define savegame_h_INCLUDED #include "../tools/types.h" #define LAST_SAVEGAME_FILENAME_BYTE_LENGTH (MAXIMUM_SAVEGAME_NAME_LENGTH * MB_LEN_MAX + 1) #ifndef savegame_c_INCLUDED extern z_ucs last_savegame_filename[]; #endif /* savegame_c_INCLUDED */ int save_game_to_stream(uint16_t address, uint16_t length, z_file *save_file, bool evaluate_result); void save_game(uint16_t address, uint16_t length, char *filename, bool skip_asking_for_filename, bool evaluate_result, char *directory); int restore_game_from_stream(uint16_t address, uint16_t length, z_file *iff_file, bool evaluate_result); int restore_game(uint16_t address, uint16_t length, char *filename, bool skip_asking_for_filename, bool evaluate_result, char *directory); #ifndef DISABLE_FILELIST bool detect_saved_game(char *file_to_check, char **story_file_to_load); #endif // DISABLE_FILELIST void opcode_save_0op(void); void opcode_save_ext(void); void opcode_restore_0op(void); void opcode_restore_ext(void); #endif /* savegame_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/Makefile.am0000644000175000017500000000722613153330674020767 0ustar chrenderchrender # Makefile.am # # This file is part of fizmo. # # Copyright (c) 2009-2017 Christoph Ender. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. AM_CFLAGS = -fPIC AM_CPPFLAGS = LDADD = # Don't run ranlib directly, since in case OS X universal libraries are # built, files processed by ranlib cannot be any longer processed by ar # (which is required to assemble libfizmo later on). RANLIB = true noinst_LIBRARIES = libinterpreter.a # Using clang-800.0.42.1 on macOS Sierra causes an EXC_BAD_ACCESS # when loading the hyphenation patterns in case "hyphenation.c" is # compiled with -O2. Using -O0 works around this issue. Solution by # Sander Niemeijer at http://gnu-automake.7480.n7.nabble.com/ # Force-O0-flags-inhibit-the-default-O2-flags-td422.html. DISOPT_FLAG = -O0 HYPHENATION_O = hyphenation.o $(HYPHENATION_O): hyphenation.c $(MAKE) hyphenation.o CFLAGS="$(CFLAGS) $(DISOPT_FLAG)" HYPHENATION_O=dummy-hyphenation.o libinterpreter_a_SOURCES = babel.c blorb.c config.c fizmo.c hyphenation.c\ iff.c mathemat.c misc.c mt19937ar.c object.c output.c property.c routine.c \ savegame.c sound.c stack.c streams.c table.c text.c undo.c variable.c \ wordwrap.c zpu.c if ENABLE_TRACING AM_CFLAGS += -DENABLE_TRACING= endif if FIZMO_DIST_VERSION AM_CFLAGS += -DFIZMO_DIST_VERSION=\"$(FIZMO_DIST_VERSION)\" endif if ENABLE_BABEL AM_CPPFLAGS += -DUSE_LIBXML2 AM_CFLAGS += $(libxml2_CFLAGS) LDADD += $(libxml2_LIBS) else AM_CFLAGS += -DDISABLE_BABEL= endif if ENABLE_STRICT_Z AM_CFLAGS += -DSTRICT_Z= endif if ENABLE_SEGFAULT_ON_ERROR AM_CFLAGS += -DTHROW_SIGFAULT_ON_ERROR= endif if ENABLE_FILELIST libinterpreter_a_SOURCES += filelist.c else AM_CFLAGS += -DDISABLE_FILELIST= endif if ENABLE_BLOCKBUFFER libinterpreter_a_SOURCES += blockbuf.c else AM_CFLAGS += -DDISABLE_BLOCKBUFFER= endif if ENABLE_COMMAND_HISTORY libinterpreter_a_SOURCES += cmd_hst.c else AM_CFLAGS += -DDISABLE_COMMAND_HISTORY= endif if ENABLE_OUTPUT_HISTORY libinterpreter_a_SOURCES += history.c else AM_CFLAGS += -DDISABLE_OUTPUT_HISTORY= endif if ENABLE_CONFIG_FILES else AM_CFLAGS += -DDISABLE_CONFIGFILES= endif if ENABLE_PREFIX_COMMANDS else AM_CFLAGS += -DDISABLE_PREFIX_COMMANDS= endif if ENABLE_DEBUGGER libinterpreter_a_SOURCES += debugger.c AM_CFLAGS += -DENABLE_DEBUGGER= endif libfizmo-0.7.15/src/interpreter/property.c0000644000175000017500000007251013153330674020761 0ustar chrenderchrender /* property.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "property.h" #include "fizmo.h" #include "variable.h" #include "object.h" #include "zpu.h" #include "streams.h" #include "config.h" // for IGNORE_TOO_LONG_PROPERTIES_ERROR #include "../locales/libfizmo_locales.h" static uint8_t get_property_length(uint8_t *property) { uint8_t length_and_number; uint8_t length; #ifdef STRICT_Z if (property == NULL) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_property_length", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_NULL_POINTER_RECEIVED); streams_latin1_output("\n"); return 0; } #endif // STRICT_Z if (ver <= 3) { return (*property >> 5) + 1; } else { length_and_number = *property; TRACE_LOG("Property-byte: %x.\n", *property); if ((length_and_number & 0x80) != 0) { TRACE_LOG("Property-byte: %x.\n", *(property+1)); // 12.4.2.1 If the top bit (bit 7) of the first size byte is set, // then there are two size-and-number bytes as follows. In the // first byte, bits 0 to 5 contain the property number; bit 6 is // undetermined (it is clear in all Infocom or Inform story files); // bit 7 is set. In the second byte, bits 0 to 5 contain the property // data length, counting in bytes; bit 6 is undetermined (it is set // in Infocom story files, but clear in Inform ones); bit 7 is always // set. length = *(++property) & 0x3f; // 12.4.2.1.1 A value of 0 as property data length (in the // second byte) should be interpreted as a length of 64. (Inform // can compile such properties.) if (length == 0) length = 64; } else { // 12.4.2.2 If the top bit (bit 7) of the first size byte is clear, // then there is only one size-and-number byte. Bits 0 to 5 contain // the property number; bit 6 is either clear to indicate a property // data length of 1, or set to indicate a length of 2; bit 7 is clear. length = (length_and_number & 0x40) != 0 ? (uint8_t)2 : (uint8_t)1; } return length; } } static inline uint8_t get_property_length_code_size(uint8_t *property) { #ifdef STRICT_Z if (property == NULL) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_property_length_code_size", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_NULL_POINTER_RECEIVED); streams_latin1_output("\n"); return 0; } #endif // STRICT_Z // 12.4.2.1 If the top bit (bit 7) of the first size byte is set, // then there are two size-and-number bytes [...] if ((ver >= 4) && ((*property & 0x80) != 0)) return 2; else return 1; } static uint16_t get_default_property_value(uint16_t property_number) { #ifdef STRICT_Z if (property_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_default_property_value", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return 0; } if (property_number > active_z_story->maximum_property_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_default_property_value", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)property_number, (long int)ver); streams_latin1_output("\n"); return 0; } #endif // STRICT_Z return load_word(active_z_story->property_defaults + property_number*2); } /*@dependent@*/ /*@null@*/ static uint8_t *get_objects_first_property( uint16_t object_number) { uint8_t *property_table_index = get_objects_property_table(object_number); uint8_t length_and_number; #ifdef STRICT_Z if (object_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_objects_first_property", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return NULL; } if (object_number > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_objects_first_property", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)object_number, (long int)ver); streams_latin1_output("\n"); return NULL; } if (property_table_index == NULL) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_objects_first_property", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_NULL_POINTER_RECEIVED); streams_latin1_output("\n"); return NULL; } #endif // STRICT_Z TRACE_LOG("Property table located at $%lx.\n", (unsigned long int)(property_table_index - z_mem)); TRACE_LOG("Skipping property name (%d+1 bytes).\n", (*property_table_index)*2); property_table_index += (*property_table_index)*2 + 1; length_and_number = *property_table_index; if (length_and_number == 0) { TRACE_LOG("Object %d has no properties.\n", object_number); return NULL; } else { #ifdef ENABLE_TRACING if (ver <= 3) { TRACE_LOG("Found property %d.\n", length_and_number & 0x1f); } else { TRACE_LOG("Found property %d.\n", length_and_number & 0x3f); } #endif return property_table_index; } } /*@null@*/ /*@dependent@*/ static uint8_t *get_objects_next_property( /*@dependent@*/ uint8_t *property_index) { uint8_t length_code_size; uint8_t length; uint8_t length_and_number; #ifdef STRICT_Z if (property_index == NULL) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_objects_next_property", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_NULL_POINTER_RECEIVED); streams_latin1_output("\n"); return NULL; } #endif // STRICT_Z TRACE_LOG("Looking for next property behind property %d.\n", *property_index & 0x1f); if (*property_index == 0) return NULL; length_code_size = get_property_length_code_size(property_index); length = get_property_length(property_index); TRACE_LOG("Property %d has a length of %d and a length-code-size of %d.\n", *property_index & 0x1f, length, length_code_size); property_index += length + length_code_size; length_and_number = *property_index; if (length_and_number == 0) { TRACE_LOG("No property behind current property.\n"); return NULL; } else { #ifdef ENABLE_TRACING if (ver <= 3) { TRACE_LOG("Returning address of property %d.\n", *property_index & 0x1f); } else { TRACE_LOG("Returning address of property %d.\n", *property_index & 0x3f); } #endif return property_index; } } /*@null@*/ /*@dependent@*/ static uint8_t *get_object_property( uint16_t object_number, uint16_t property_number) { uint8_t *property_index; int current_prop_number; #ifdef STRICT_Z if (object_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_property", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return NULL; } if (object_number > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_property", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)object_number, (long int)ver); streams_latin1_output("\n"); return NULL; } if (property_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_property", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return NULL; } if (property_number > active_z_story->maximum_property_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_object_property", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)property_number, (long int)ver); streams_latin1_output("\n"); return NULL; } #endif // STRICT_Z property_index = get_objects_first_property(object_number); if (property_index != NULL) { if (ver >= 4) current_prop_number = (int)(*property_index & 0x3f); else current_prop_number = (int)(*property_index & 0x1f); TRACE_LOG("Processing property %d.\n", current_prop_number); } while ( (property_index != NULL) && // current_prop_number is defined, since property_index != NULL. (/*@-usedef@*/ current_prop_number /*@+usedef@*/ != (int)property_number) ) { property_index = get_objects_next_property(property_index); if (property_index != NULL) { if (ver >= 4) current_prop_number = (int)(*property_index & 0x3f); else current_prop_number = (int)(*property_index & 0x1f); TRACE_LOG("Processing property %d.\n", current_prop_number); } } return property_index; } static uint16_t get_property_value(uint16_t object_number, uint8_t property_number) { uint8_t *property_table_index; uint8_t length; uint8_t length_code_size; TRACE_LOG("Reading property %d from object %d.\n", property_number, object_number); #ifdef STRICT_Z if (object_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_property_value", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return 0; } if (object_number > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_property_value", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)object_number, (long int)ver); streams_latin1_output("\n"); return 0; } if (property_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_property_value", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return 0; } if (property_number > active_z_story->maximum_property_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_property_value", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)property_number, (long int)ver); streams_latin1_output("\n"); return 0; } #endif // STRICT_Z property_table_index = get_object_property(object_number, property_number); if (property_table_index == NULL) { #ifdef STRICT_Z i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_property_value", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_NO_PROPERTY_P0D_FOR_OBJECT_P1D); streams_latin1_output("\n"); #endif // STRICT_Z return 0; } length = get_property_length(property_table_index); length_code_size = get_property_length_code_size(property_table_index); TRACE_LOG("Property length: %d\n", length); if (length == 1) return *(property_table_index + length_code_size); else if (length == 2) return load_word(property_table_index + length_code_size); else { #ifdef IGNORE_TOO_LONG_PROPERTIES_ERROR return load_word(property_table_index + length_code_size); #else i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_CANNOT_READ_PROPERTIES_WITH_A_LENGTH_GREATER_THAN_2, -1); /*@-unreachable@*/ return 0; // To make compiler happy /*@+unreachable@*/ #endif // IGNORE_TOO_LONG_PROPERTIES_ERROR } } static void set_property_value(uint16_t object_number, uint8_t property_number, uint16_t new_value) { uint8_t *property_table_index; uint8_t length; uint8_t length_code_size; TRACE_LOG("Setting property %d from object %d to $%x.\n", property_number, object_number, new_value); #ifdef STRICT_Z if (object_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_property_value", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return; } if (object_number > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_property_value", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)object_number, (long int)ver); streams_latin1_output("\n"); return; } if (property_number == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_property_value", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return; } if (property_number > active_z_story->maximum_property_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "get_property_value", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)property_number, (long int)ver); streams_latin1_output("\n"); return; } #endif // STRICT_Z property_table_index = get_object_property(object_number, property_number); if (property_table_index == NULL) { #ifdef STRICT_Z i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "set_property_value", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_NO_PROPERTY_P0D_FOR_OBJECT_P1D, (long int)property_number, (long int)object_number); streams_latin1_output("\n"); #endif // STRICT_Z return; } length = get_property_length(property_table_index); length_code_size = get_property_length_code_size(property_table_index); if (length == 1) *(property_table_index + length_code_size) = new_value & 0xff; else if (length == 2) store_word(property_table_index + length_code_size, new_value); else i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_CANNOT_READ_PROPERTIES_WITH_A_LENGTH_GREATER_THAN_2, -1); return; } void opcode_get_prop(void) { TRACE_LOG("Opcode: GET_PROP.\n"); read_z_result_variable(); TRACE_LOG("Reading property #%x of object %x.\n", op[1], op[0]); #ifdef STRICT_Z if (op[0] == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_prop", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); return; } if (op[0] > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_prop", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[0], (long int)ver); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); return; } if (op[1] == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_prop", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); return; } if (op[1] > active_z_story->maximum_property_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_prop", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[1], (long int)ver); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); return; } #endif // STRICT_Z // Verify if the object has the requested property. if (get_object_property(op[0], op[1]) != NULL) { set_variable(z_res_var, get_property_value(op[0], op[1]), false); } else { TRACE_LOG("Property %d not found, returning default value %d.\n", op[1], get_default_property_value(op[1])); set_variable(z_res_var, get_default_property_value(op[1]), false); } } void opcode_put_prop(void) { TRACE_LOG("Opcode: PUT_PROP.\n"); TRACE_LOG("Putting %x into property %d of object %d.\n",op[2],op[1],op[0]); #ifdef STRICT_Z if (op[0] == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_put_prop", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return; } if (op[0] > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_put_prop", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[0], (long int)ver); streams_latin1_output("\n"); return; } if (op[1] == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_put_prop", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return; } if (op[1] > active_z_story->maximum_property_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_put_prop", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[1], (long int)ver); streams_latin1_output("\n"); return; } #endif // STRICT_Z (void)set_property_value(op[0], op[1], op[2]); } void opcode_get_prop_addr(void) { uint8_t *property_address; TRACE_LOG("Opcode: GET_PROP_ADDR.\n"); TRACE_LOG("Retrieving address of property %d in object %d.\n", op[1], op[0]); read_z_result_variable(); #ifdef STRICT_Z if (op[0] == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_prop_addr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); return; } if (op[0] > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_prop_addr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[0], (long int)ver); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); return; } if (op[1] == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_prop_addr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); return; } if (op[1] > active_z_story->maximum_property_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_prop_addr", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[1], (long int)ver); streams_latin1_output("\n"); set_variable(z_res_var, 0, false); return; } #endif // STRICT_Z property_address = get_object_property(op[0], op[1]); if (property_address == NULL) set_variable(z_res_var, 0, false); else { if ( (ver >= 4) && ((*property_address & 0x80) != 0) ) property_address += 2; else property_address += 1; TRACE_LOG("Returning %lx.\n", (long unsigned int)(property_address - z_mem)); set_variable(z_res_var, (uint16_t)(property_address - z_mem), false); } } void opcode_get_prop_len(void) { uint8_t *property_address; uint16_t result; TRACE_LOG("Opcode: GET_PROP_LEN.\n"); TRACE_LOG("Reading length of property at address $%x.\n", op[0]); read_z_result_variable(); if (op[0] == 0) { // From the 1.1 standard: @get_prop_len 0 must return 0. This is // required by some Infocom games and files generated by old // versions of Inform. result = 0; } else { property_address = z_mem + op[0] - 1; if ( (ver >= 4) && ((*property_address & 0x80) != 0) ) property_address--; result = get_property_length(property_address); TRACE_LOG("Setting variable with code %d to %d.\n", z_res_var, result); } set_variable(z_res_var, result, false); } void opcode_get_next_prop(void) { uint8_t *property_index; TRACE_LOG("Opcode: GET_NEXT_PROP\n"); read_z_result_variable(); #ifdef STRICT_Z if (op[0] == 0) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_next_prop", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID); streams_latin1_output("\n"); return; } if (op[0] > active_z_story->maximum_object_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_next_prop", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[0], (long int)ver); streams_latin1_output("\n"); return; } if (op[1] > active_z_story->maximum_property_number) { i18n_translate( libfizmo_module_name, i18n_libfizmo_WARNING_FOR_P0S_AT_P0X, "opcode_get_next_prop", (unsigned int)(current_instruction_location - z_mem)); streams_latin1_output(" "); i18n_translate( libfizmo_module_name, i18n_libfizmo_PROPERTY_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D, (long int)op[1], (long int)ver); streams_latin1_output("\n"); return; } #endif // STRICT_Z if (op[1] == 0) { TRACE_LOG("Looking for first property of object %d.\n", op[0]); // Retrieve object's first property property_index = get_objects_first_property(op[0]); if (property_index == NULL) { TRACE_LOG("Empty property list, returning 0.\n"); set_variable(z_res_var, 0, false); } else { TRACE_LOG("First property of object %d is %d.\n", op[0], *property_index & 0x1f); set_variable(z_res_var, *property_index & 0x1f, false); } } else { property_index = get_object_property(op[0], op[1]); if (property_index == NULL) { set_variable(z_res_var, 0, false); } else { property_index = get_objects_next_property(property_index); TRACE_LOG("Looking for property behind property %d.\n", op[1]); if (property_index == NULL) { TRACE_LOG("No more properties in object %d, returning 0.\n", op[0]); set_variable(z_res_var, 0, false); } else { TRACE_LOG("Returning %d od resulting property number.\n", *property_index & 0x1f); set_variable(z_res_var, *property_index & 0x1f, false); } } } } libfizmo-0.7.15/src/interpreter/savegame.c0000644000175000017500000014414013153330674020664 0ustar chrenderchrender /* savegame.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef savegame_c_INCLUDED #define savegame_c_INCLUDED #include #include #include #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "../tools/z_ucs.h" #include "../tools/filesys.h" #include "savegame.h" #include "streams.h" #include "fizmo.h" #include "iff.h" #include "stack.h" #include "zpu.h" #include "variable.h" #include "text.h" #include "routine.h" #include "filelist.h" #include "history.h" #include "output.h" #include "config.h" #include "../locales/libfizmo_locales.h" #define HISTORY_BUFFER_INPUT_SIZE 1024 z_ucs last_savegame_filename[MAXIMUM_SAVEGAME_NAME_LENGTH + 1]; static zscii current_savegame_filename_buffer[MAXIMUM_SAVEGAME_NAME_LENGTH + 1]; //static z_ucs savegame_output_buffer[MAXIMUM_SAVEGAME_NAME_LENGTH + 1]; static int save_stack_frame(uint16_t *current_frame_index, uint16_t current_frame_stack_usage, uint8_t current_frame_number_of_locals, z_file *out_file) { uint8_t previous_result_var; uint32_t previous_pc; uint16_t previous_stack_words_used; uint8_t previous_number_of_locals; bool previous_result_discard; uint8_t previous_argument_mask; uint8_t flags; uint16_t *data_index = current_frame_index; uint8_t i; TRACE_LOG("Saving stack frame.\n"); TRACE_LOG("Z-Stack at %p.\n", z_stack); TRACE_LOG("Z-Stack-Index: %ld.\n", (long int)(current_frame_index - z_stack)); TRACE_LOG("Data-Index: %ld.\n", (long int)(data_index - z_stack)); TRACE_LOG("Current frame index: %p.\n", current_frame_index); TRACE_LOG("Current frame stack usage: %d.\n", current_frame_stack_usage); TRACE_LOG("Current frame number of locals: %d.\n", current_frame_number_of_locals); current_frame_index--; previous_result_var = (*current_frame_index & 0xff); previous_pc = (*current_frame_index >> 8); current_frame_index--; previous_pc |= ((*current_frame_index) << 8); current_frame_index--; previous_stack_words_used = *current_frame_index; current_frame_index--; previous_number_of_locals = (*current_frame_index & 0xf); previous_result_discard = ((*(current_frame_index) & 0x10) != 0 ? true : false); previous_argument_mask = (*(current_frame_index) >> 8); TRACE_LOG("Previous result var: %d.\n", previous_result_var); TRACE_LOG("Previous PC: %x.\n", previous_pc); TRACE_LOG("Previous stack words used: %d.\n", previous_stack_words_used); TRACE_LOG("Previous number of locales: %d.\n", previous_number_of_locals); // Save lower stack level first so serialized stack on disk starts // with index 0. if (current_frame_index != z_stack) { if (save_stack_frame( current_frame_index - previous_stack_words_used - previous_number_of_locals, previous_stack_words_used, previous_number_of_locals, out_file) != 0) return -1; } flags = (bool_equal(previous_result_discard, true) ? 0x10 : 0) | current_frame_number_of_locals; TRACE_LOG("Flags: %x.\n", flags); if (fsi->writechar((int)(previous_pc >> 16), out_file) == EOF) return -1; if (fsi->writechar((int)(previous_pc >> 8), out_file) == EOF) return -1; if (fsi->writechar((int)(previous_pc ), out_file) == EOF) return -1; if (fsi->writechar((int)flags, out_file) == EOF) return -1; if (fsi->writechar((int)previous_result_var, out_file) == EOF) return -1; if (fsi->writechar((int)previous_argument_mask, out_file) == EOF) return -1; if (fsi->writechar((int)(current_frame_stack_usage >> 8), out_file) == EOF) return -1; if (fsi->writechar((int)(current_frame_stack_usage & 0xff), out_file) == EOF) return -1; TRACE_LOG("Data: ("); for (i=0; iwritechar((int)(data_index[i] >> 8), out_file) == EOF) return -1; if (fsi->writechar((int)(data_index[i] ), out_file) == EOF) return -1; } TRACE_LOG(")\n"); TRACE_LOG("Final stack index: %ld.\n", (long int)(data_index - z_stack)); return 0; } int ask_user_for_file(zscii *filename_buffer, int buffer_len, int preload_len, int filetype_or_mode, int fileaccess, z_file **result_file, char *directory) { int input_length; z_ucs filename[buffer_len + 1]; char *filename_utf8, *prefixed_filename; int i; input_length = active_interface->read_line( (uint8_t*)filename_buffer, buffer_len, 0, 0, preload_len, NULL, true, true); if (input_length == 0) *result_file = NULL; if (input_length < 1) return input_length; for (i=0; i<(int)input_length; i++) filename[i] = zscii_input_char_to_z_ucs(filename_buffer[i]); filename[i] = 0; filename_utf8 = dup_zucs_string_to_utf8_string(filename); if (directory != NULL) { prefixed_filename = fizmo_malloc(strlen(filename_utf8) + strlen(directory) + 2); strcpy(prefixed_filename, directory); strcat(prefixed_filename, "/"); strcat(prefixed_filename, filename_utf8); } else prefixed_filename = filename_utf8; TRACE_LOG("prefixed filename: \"%s\"\n.", prefixed_filename); *result_file = fsi->openfile(prefixed_filename, filetype_or_mode, fileaccess); if (directory != NULL) free(prefixed_filename); free(filename_utf8); return input_length; } static int ask_for_filename(char *filename_suggestion, z_file **result_file, char *directory, int filetype_or_mode, int fileaccess) { int16_t input_length; int length = 0; bool stream_1_active_buf; char *filename_utf8; int i; int return_code; return_code = active_interface->prompt_for_filename( filename_suggestion, result_file, directory, filetype_or_mode, fileaccess); // If return_code is == -3, this function is not implemented in the current // screen interface. if (return_code != -3) return return_code; /* There was no prompt_for_file, so the interpreter will have to ask for * a filename directly. */ TRACE_LOG("last:\""); TRACE_LOG_Z_UCS(last_savegame_filename); TRACE_LOG("\"\n"); if (filename_suggestion != NULL) { TRACE_LOG("suggestion: '%s'.\n", filename_suggestion); } if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); if (filename_suggestion != NULL) { TRACE_LOG("filename suggestion: %s.\n", filename_suggestion); length = strlen(filename_suggestion); i = 0; while ( (i < length) && (i + 1 < MAXIMUM_SAVEGAME_NAME_LENGTH) ) { current_savegame_filename_buffer[i] = latin1_char_to_zucs_char(filename_suggestion[i]); i++; } current_savegame_filename_buffer[i] = 0; length = i; } else { TRACE_LOG("No filename suggestion.\n"); length = z_ucs_len(last_savegame_filename); i = 0; while ( (i < length) && (i + 1 < MAXIMUM_SAVEGAME_NAME_LENGTH) ) { current_savegame_filename_buffer[i] = unicode_char_to_zscii_input_char(last_savegame_filename[i]); i++; } current_savegame_filename_buffer[i] = 0; } if (i18n_translate( libfizmo_module_name, i18n_libfizmo_PLEASE_ENTER_SAVEGAME_FILENAME) == (size_t)-1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "i18n_translate"); if (streams_latin1_output("\n>") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); if (streams_latin1_output((char*)current_savegame_filename_buffer) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); TRACE_LOG("Removing %d chars from history.\n", length); stream_2_remove_chars(length); #ifndef DISABLE_COMMAND_HISTORY remove_chars_from_history(outputhistory[active_window_number], length); #endif /* DISABLE_COMMAND_HISTORY */ TRACE_LOG("Prompting for filename.\n"); // Prompt for filename input_length = ask_user_for_file( (uint8_t*)current_savegame_filename_buffer, MAXIMUM_SAVEGAME_NAME_LENGTH, length, filetype_or_mode, fileaccess, result_file, directory); if (input_length == -2) { // User pressed ESC if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); return -2; } else if (input_length == 0) { if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); if (i18n_translate( libfizmo_module_name, i18n_libfizmo_FILENAME_MUST_NOT_BE_EMPTY) == (size_t)-1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "i18n_translate"); if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); return -1; } current_savegame_filename_buffer[input_length] = 0; i = 0; while (i <= (int)input_length) { last_savegame_filename[i] = zscii_output_char_to_z_ucs(current_savegame_filename_buffer[i]); i++; } last_savegame_filename[i] = 0; TRACE_LOG("From ZSCII translated filename: \""); TRACE_LOG_Z_UCS(last_savegame_filename); TRACE_LOG("\".\n"); stream_1_active_buf = stream_1_active; stream_1_active = active_interface->input_must_be_repeated_by_story(); (void)streams_z_ucs_output_user_input(last_savegame_filename); (void)streams_z_ucs_output_user_input(z_ucs_newline_string); stream_1_active = stream_1_active_buf; if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); if (*result_file == NULL) { filename_utf8 = dup_zucs_string_to_utf8_string(last_savegame_filename); if (i18n_translate( libfizmo_module_name, i18n_libfizmo_COULD_NOT_OPEN_FILE_NAMED_P0S, filename_utf8) == (size_t)-1) { free(filename_utf8); i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "i18n_translate"); } free(filename_utf8); if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); return -1; } return input_length; } // Returns the supplied result code. static int _store_save_or_restore_result(uint16_t result_code) { if (ver < 4) { evaluate_branch(result_code != 0 ? (uint8_t)1 : (uint8_t)0); } else { read_z_result_variable(); set_variable(z_res_var, result_code, false); } return result_code; } // Handle an error in the save or restore process. This always returns 0, // indicating failure. // If evaluate_result is true, this does a Z-machine store of 0. // If close_stream is true, this closes the file. static int _handle_save_or_restore_failure(bool evaluate_result, int i18n_message_code, z_file *iff_file, bool close_stream) { if (i18n_message_code >= 1) if (i18n_translate(libfizmo_module_name, i18n_message_code) == (size_t)-1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "i18n_translate"); if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); if (close_stream == true) if (fsi->closefile(iff_file) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "closefile"); if (bool_equal(evaluate_result, true)) _store_save_or_restore_result(0); return 0; } int get_paragraph_save_amount() { char *nof_paragraphs_as_string = get_configuration_value("save-text-history-paragraphs"); if (nof_paragraphs_as_string == NULL) return -1; else return strtol(nof_paragraphs_as_string, NULL, 10); } void save_game(uint16_t address, uint16_t length, char *filename, bool skip_asking_for_filename, bool evaluate_result, char *directory) { z_file *save_file; char *system_filename; char *str; TRACE_LOG("Save %d bytes from address %d.\n", length, address); if (filename != NULL) { if (bool_equal(skip_asking_for_filename, true)) { system_filename = filename; if (directory != NULL) { str = fizmo_malloc(strlen(system_filename) + strlen(directory) + 2); strcpy(str, directory); strcat(str, "/"); strcat(str, system_filename); } else str = system_filename; TRACE_LOG("Filename to save to: \"%s\".\n", str); save_file = fsi->openfile(str, FILETYPE_SAVEGAME, FILEACCESS_WRITE); if (directory != NULL) free(str); free(system_filename); } else { if ( ((ask_for_filename(filename, &save_file, directory, FILETYPE_SAVEGAME, FILEACCESS_WRITE)) < 0) || (save_file == NULL) ) { if (bool_equal(evaluate_result, true)) _store_save_or_restore_result(0); return; } str = save_file->filename; TRACE_LOG("filename from ask_for_filename: \"%s\".\n", str); } } else { if ( ((ask_for_filename(NULL, &save_file, directory, FILETYPE_SAVEGAME, FILEACCESS_WRITE)) < 0) || (save_file == NULL) ) { if (bool_equal(evaluate_result, true)) _store_save_or_restore_result(0); return; } str = save_file->filename; TRACE_LOG("filename from ask_for_filename: \"%s\".\n", str); } save_game_to_stream(address, length, save_file, evaluate_result); } /* Returns 0 for failure, 1 for success. This closes the save_file. */ int save_game_to_stream(uint16_t address, uint16_t length, z_file *save_file, bool evaluate_result) { uint32_t pc_on_restore = (uint32_t)(pc - z_mem); uint8_t *dynamic_index; uint16_t consecutive_zeros; int data; uint8_t *ptr; #ifndef DISABLE_OUTPUT_HISTORY z_ucs *hst_ptr; int nof_paragraphs_to_save; history_output *history; int return_code; #endif // DISABLE_OUTPUT_HISTORY TRACE_LOG("PC at: %x.\n", pc_on_restore); if (address != 0) { if ((fsi->writechars(z_mem + address, length, save_file)) != length) { return _handle_save_or_restore_failure( evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if ((fsi->closefile(save_file)) != 0) { return _handle_save_or_restore_failure( evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } } else { init_empty_file_for_iff_write(save_file); if (start_new_chunk("IFhd", save_file) != 0) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } // Save release number if ((fsi->writechar((int)z_mem[0x2], save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if ((fsi->writechar((int)z_mem[0x3], save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } // Save serial number if ((fsi->writechar((int)z_mem[0x12], save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if ((fsi->writechar((int)z_mem[0x13], save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if ((fsi->writechar((int)z_mem[0x14], save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if ((fsi->writechar((int)z_mem[0x15], save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if ((fsi->writechar((int)z_mem[0x16], save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if ((fsi->writechar((int)z_mem[0x17], save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } // Save checksum if ((fsi->writechar((int)z_mem[0x1c], save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if ((fsi->writechar((int)z_mem[0x1d], save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } // Save initial PC on restore if ((fsi->writechar((int)(pc_on_restore >> 16), save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if ((fsi->writechar((int)(pc_on_restore >> 8), save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if ((fsi->writechar((int)(pc_on_restore ), save_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if (end_current_chunk(save_file) != 0) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } dynamic_index = z_mem + address; if ( (active_z_story->z_story_file != NULL) && ((fsi->setfilepos( active_z_story->z_story_file, active_z_story->story_file_exec_offset, SEEK_SET)) == 0) && (strcmp(get_configuration_value("quetzal-umem"), "true") != 0) ) { // The original story file is availiable, use CMem. TRACE_LOG("Compressing memory from byte %d ...\n", address); if (start_new_chunk("CMem", save_file) != 0) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } ptr = z_mem + address + length; consecutive_zeros = 0; while (dynamic_index != ptr) { if ((data = fsi->readchar(active_z_story->z_story_file)) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } data ^= *dynamic_index; if (data == 0) { consecutive_zeros++; } else { TRACE_LOG("Altered byte at offset %ld.\n", (long int)(dynamic_index - z_mem)); TRACE_LOG("Memory-Data: %x.\n", *dynamic_index); //TRACE_LOG("Skipping %d equal bytes.\n", consecutive_zeros); while (consecutive_zeros != 0) { if (fsi->writechar(0, save_file) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if (consecutive_zeros > 256) { if (fsi->writechar(0xff, save_file) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } consecutive_zeros -= 256; } else { if (fsi->writechar((int)(consecutive_zeros - 1),save_file) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } consecutive_zeros = 0; } } if (fsi->writechar(data, save_file) == EOF) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } } dynamic_index++; } TRACE_LOG("... to byte %ld.\n", (long int)(ptr - z_mem)); if (end_current_chunk(save_file) != 0) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } } else { if (start_new_chunk("UMem", save_file) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "start_new_chunk"); while (dynamic_index != active_z_story->static_memory) { if ((fsi->writechar((int)(*dynamic_index), save_file)) == EOF) { return _handle_save_or_restore_failure( evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } dynamic_index++; } if (end_current_chunk(save_file) != 0) { return _handle_save_or_restore_failure( evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } } if (start_new_chunk("Stks", save_file) != 0) { return _handle_save_or_restore_failure( evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } #ifdef ENABLE_TRACING dump_stack_to_tracelog(); dump_dynamic_memory_to_tracelog(); #endif // ENABLE_TRACING // Save stack frames if (save_stack_frame( z_stack_index-stack_words_from_active_routine-number_of_locals_active, (uint16_t)stack_words_from_active_routine, number_of_locals_active, save_file) != 0) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if (end_current_chunk(save_file) != 0) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } if (start_new_chunk("ANNO", save_file) != 0) { return _handle_save_or_restore_failure( evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } fsi->fileprintf(save_file, "Interpreter: libfizmo, version: %s.\n", LIBFIZMO_VERSION); if (end_current_chunk(save_file) != 0) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } #ifndef DISABLE_OUTPUT_HISTORY nof_paragraphs_to_save = get_paragraph_save_amount(); if ( (nof_paragraphs_to_save > 0) && (outputhistory[0] != NULL) && (outputhistory[0]->z_history_buffer_size > 0) ) { history = init_history_output( outputhistory[0], NULL, Z_HISTORY_OUTPUT_WITHOUT_EXTRAS); do { return_code = output_rewind_paragraph(history, NULL, NULL, NULL); nof_paragraphs_to_save--; } while ( (nof_paragraphs_to_save > 0) && (return_code == 0) ); if (start_new_chunk("TxHs", save_file) != 0) { return _handle_save_or_restore_failure( evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } hst_ptr = history->current_paragraph_index; if (hst_ptr < outputhistory[0]->z_history_buffer_back_index) { while (hst_ptr != outputhistory[0]->z_history_buffer_end) { if (write_four_byte_number(*hst_ptr, save_file) != 0) { return _handle_save_or_restore_failure( evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } hst_ptr++; } hst_ptr = outputhistory[0]->z_history_buffer_start; } while (hst_ptr != outputhistory[0]->z_history_buffer_front_index) { if (write_four_byte_number(*hst_ptr, save_file) != 0) { return _handle_save_or_restore_failure( evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } hst_ptr++; } if (end_current_chunk(save_file) != 0) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } } #endif // DISABLE_OUTPUT_HISTORY if (close_simple_iff_file(save_file) != -0) { return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_WRITING_SAVE_FILE, save_file, true); } } if (bool_equal(evaluate_result, true)) _store_save_or_restore_result(1); return 1; } void opcode_save_0op(void) { TRACE_LOG("Opcode: SAVE.\n"); if (strcmp(get_configuration_value("disable-save"), "true") == 0) _store_save_or_restore_result(0); else save_game( 0, (uint16_t)(active_z_story->dynamic_memory_end - z_mem + 1), NULL, false, true, get_configuration_value("savegame-path")); } void opcode_save_ext(void) { uint16_t address; uint16_t length; char *filename = NULL; long memsize; uint8_t *ptr; int i; TRACE_LOG("Opcode: SAVE_EXT.\n"); TRACE_LOG("Operands provided: %d.\n", number_of_operands); if (strcmp(get_configuration_value("disable-save"), "true") == 0) { _store_save_or_restore_result(0); return; } if (number_of_operands >= 2) { address = op[0]; length = op[1]; if (number_of_operands >= 3) { ptr = z_mem + (uint16_t)op[2]; memsize = (*ptr) + 1; filename = (char*)fizmo_malloc(memsize); for (i=0; i<*ptr; i++) filename[i] = ptr[i+1]; filename[i] = 0; } } else { address = 0; length = (uint16_t)(active_z_story->dynamic_memory_end - z_mem + 1); } save_game( address, length, filename, false, true, get_configuration_value("savegame-path")); if (filename != NULL) free(filename); } /* Returns 0 for failure, 2 for successful restore. (These values match the Z-machine @save result codes.) This closes the iff_file. */ int restore_game_from_stream(uint16_t address, uint16_t length, z_file *iff_file, bool evaluate_result) { uint8_t release_number[2]; uint8_t serial_number[6]; uint8_t checksum[2]; uint8_t pc_on_restore_data[3]; uint32_t pc_on_restore; uint8_t *dynamic_index; int bytes_read; int chunk_length; uint16_t stack_word; int data, data2; int copylength; uint8_t *restored_story_mem; uint8_t *ptr; struct z_stack_container *saved_stack; uint32_t stack_frame_return_pc; bool stack_frame_discard_result; uint8_t stack_frame_result_var; uint8_t stack_frame_argument_mask; uint8_t stack_frame_arguments_supplied; // The following four variables are set to 0 to avoid compiler warnings. uint8_t current_stack_frame_nof_locals = 0; uint8_t last_stack_frame_nof_locals = 0; uint16_t current_stack_frame_nof_functions_stack_words = 0; uint16_t last_stack_frame_nof_functions_stack_words = 0; uint8_t flags2; int i; #ifndef DISABLE_OUTPUT_HISTORY z_ucs history_buffer[HISTORY_BUFFER_INPUT_SIZE]; int history_input_index; int nof_paragraphs_to_save; #ifdef ENABLE_TRACING z_ucs zucs_char_buffer[2]; #endif // ENABLE_TRACING #endif // DISABLE_OUTPUT_HISTORY if (find_chunk("IFhd", iff_file) == -1) return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_CANT_FIND_CHUNK_IFHD, iff_file, false); // Skip length code if (fsi->setfilepos(iff_file, 4, SEEK_CUR) != 0) return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); if (fsi->readchars(release_number, 2, iff_file) != 2) return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_COULD_NOT_READ_RELEASE_NUMBER, iff_file, false); if (fsi->readchars(serial_number, 6, iff_file) != 6) return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_COULD_NOT_READ_SERIAL_NUMBER, iff_file, false); if (fsi->readchars(checksum, 2, iff_file) != 2) return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_COULD_NOT_READ_CHECKSUM, iff_file, false); //TRACE_LOG("release_number: %x\n", release_number[0]<<8 | release_number[1]); //TRACE_LOG("serial_number: \"%6s\"\n", serial_number); //TRACE_LOG("checksum: %x\n", checksum[0]<<8 | checksum[1]); //TRACE_LOG("mem-release_number: %x\n", (*(z_mem+2)<<8)|*(z_mem+3)); //TRACE_LOG("mem-serial_number: \"%6s\"\n", z_mem+0x12); //TRACE_LOG("mem-checksum: %x\n", (*(z_mem+0x1c)<<8)|(*(z_mem+0x1d))) if ( (memcmp(release_number, z_mem+2, 2) != 0) || (memcmp(serial_number, z_mem+0x12, 6) != 0) || (memcmp(checksum, z_mem+0x1c, 2) != 0) ) return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_RELEASE_NR_SERIAL_NR_OR_CHECKSUM_DOESNT_MATCH, iff_file, false); if (fsi->readchars(pc_on_restore_data, 3, iff_file) != 3) return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_COULD_NOT_READ_RESTORE_PC, iff_file, false); pc_on_restore = 0; pc_on_restore |= pc_on_restore_data[0] << 16; pc_on_restore |= pc_on_restore_data[1] << 8; pc_on_restore |= pc_on_restore_data[2]; TRACE_LOG("PC on restore: $%x.\n", (unsigned)pc_on_restore); pc = z_mem + pc_on_restore; TRACE_LOG("Allocating %d bytes for restored dynamic memory.\n", length); restored_story_mem = (uint8_t*)fizmo_malloc(length); dynamic_index = restored_story_mem; if (find_chunk("CMem", iff_file) == 0) { if (read_chunk_length(iff_file) == -1) { free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_CANT_READ_CHUNK_LENGTH, iff_file, false); } chunk_length = get_last_chunk_length(); TRACE_LOG("CMem has chunk length %d.\n", chunk_length); if ( (active_z_story->z_story_file == NULL) || (fsi->setfilepos( active_z_story->z_story_file, active_z_story->story_file_exec_offset, SEEK_SET) != 0) ) { if (i18n_translate( libfizmo_module_name, i18n_libfizmo_COULD_NOT_FIND_ORIGINAL_STORY_FILE_P0S, active_z_story->absolute_file_name) == (size_t)-1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "i18n_translate"); if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, -1, iff_file, false); } bytes_read = 0; while (bytes_read < chunk_length) { // Read data from CMem chunk. data = fsi->readchar(iff_file); bytes_read++; if (data == EOF) { free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } if (data != 0) { data2 = fsi->readchar(active_z_story->z_story_file); // Found content difference to original story file. if (data2 == EOF) { free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_FATAL_ERROR_READING_STORY_FILE, iff_file, false); } TRACE_LOG("Altered byte at offset %ld.\n", (long int)(dynamic_index - restored_story_mem)); TRACE_LOG("CMem-Data: %x, Story-Data: %x.\n", data, data2); *dynamic_index = (uint8_t)(data2 ^ data); dynamic_index++; } else { // Found block identical to story file. data = fsi->readchar(iff_file); bytes_read++; if (data == EOF) { free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } copylength = data + 1; //TRACE_LOG("Skipping %d equal bytes.\n", copylength); for (i=0; ireadchar(active_z_story->z_story_file); if (data2 == EOF) { free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_FATAL_ERROR_READING_STORY_FILE, iff_file, false); } *dynamic_index = (uint8_t)data2; dynamic_index++; } } } TRACE_LOG("Successfully read %d bytes, uncompressed: %ld.\n", bytes_read, (long int)(dynamic_index - restored_story_mem + 1)); ptr = restored_story_mem + length; while (dynamic_index != ptr) { data = fsi->readchar(active_z_story->z_story_file); if (data == EOF) { free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_FATAL_ERROR_READING_STORY_FILE, iff_file, false); } *dynamic_index = (uint8_t)data; dynamic_index++; } TRACE_LOG("Filled undefined memory with source file up to byte: %ld.\n", (long int)(dynamic_index - restored_story_mem)); } else if (find_chunk("UMem", iff_file) == 0) { if (read_chunk_length(iff_file) == -1) { free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_CANT_READ_CHUNK_LENGTH, iff_file, false); } chunk_length = get_last_chunk_length(); if (chunk_length < length) { // Not enough bytes saved. free(restored_story_mem); return _handle_save_or_restore_failure( evaluate_result, -1, iff_file, false); } TRACE_LOG("Chunk length: %d, length-to-read: %d.\n", chunk_length, length); ptr = restored_story_mem + length; while (dynamic_index != ptr) { data = fsi->readchar(iff_file); if (data == EOF) { free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } *dynamic_index = (uint8_t)data; dynamic_index++; } } else { //FIXME: Rename error. free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_CANT_FIND_CMEM_OR_UMEM_CHUNK, iff_file, false); } if (find_chunk("Stks", iff_file) == -1) { free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_CANT_FIND_CHUNK_STKS, iff_file, false); } if (read_chunk_length(iff_file) == -1) { free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_CANT_READ_CHUNK_LENGTH, iff_file, false); } chunk_length = get_last_chunk_length(); // We create a new stack to store the now incoming data, but keep a // reference to the saved stack in "saved_stack", which allows us to // re-use it in case somwthing goes wrong during restore. saved_stack = create_new_stack(); bytes_read = 0; number_of_stack_frames = 0; while (bytes_read < chunk_length) { // Each while iteration processes a single stack frame. // PC Bits 16-23 data = fsi->readchar(iff_file); if (data == EOF) { free(restored_story_mem); restore_old_stack(saved_stack); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } stack_frame_return_pc = (data & 0xff) << 16; // PC Bits 8-15 data = fsi->readchar(iff_file); if (data == EOF) { free(restored_story_mem); restore_old_stack(saved_stack); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } stack_frame_return_pc |= (data & 0xff) << 8; // PC Bits 0-7 data = fsi->readchar(iff_file); if (data == EOF) { free(restored_story_mem); restore_old_stack(saved_stack); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } stack_frame_return_pc |= (data & 0xff); data = fsi->readchar(iff_file); if (data == EOF) { free(restored_story_mem); restore_old_stack(saved_stack); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } stack_frame_discard_result = ((data & 0x10) != 0 ? true : false); current_stack_frame_nof_locals = (data & 0xf); data = fsi->readchar(iff_file); if (data == EOF) { free(restored_story_mem); restore_old_stack(saved_stack); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } stack_frame_result_var = (data & 0xff); data = fsi->readchar(iff_file); if (data == EOF) { free(restored_story_mem); restore_old_stack(saved_stack); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } stack_frame_argument_mask = (data & 0xff); data = fsi->readchar(iff_file); if (data == EOF) { free(restored_story_mem); restore_old_stack(saved_stack); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } current_stack_frame_nof_functions_stack_words = ((data & 0xff) << 8); data = fsi->readchar(iff_file); if (data == EOF) { free(restored_story_mem); restore_old_stack(saved_stack); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } current_stack_frame_nof_functions_stack_words |= (data & 0xff); bytes_read += 8; stack_frame_arguments_supplied = 0; while (stack_frame_argument_mask != 0) { stack_frame_arguments_supplied++; stack_frame_argument_mask >>= 1; } if (number_of_stack_frames == 0) store_first_stack_frame(); else store_followup_stack_frame_header( last_stack_frame_nof_locals, stack_frame_discard_result, stack_frame_arguments_supplied, last_stack_frame_nof_functions_stack_words, stack_frame_return_pc, stack_frame_result_var); i = 0; // write locals and stack while (i < current_stack_frame_nof_locals + current_stack_frame_nof_functions_stack_words) { data = fsi->readchar(iff_file); if (data == EOF) { free(restored_story_mem); restore_old_stack(saved_stack); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } stack_word = (data & 0xff) << 8; data = fsi->readchar(iff_file); if (data == EOF) { free(restored_story_mem); restore_old_stack(saved_stack); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_ERROR_READING_SAVE_FILE, iff_file, false); } stack_word |= (data & 0xff); z_stack_push_word(stack_word); i++; } bytes_read += i * 2; last_stack_frame_nof_locals = current_stack_frame_nof_locals; last_stack_frame_nof_functions_stack_words = current_stack_frame_nof_functions_stack_words; number_of_stack_frames++; } TRACE_LOG("Number of stack frames: %d.\n", number_of_stack_frames); #ifndef DISABLE_OUTPUT_HISTORY nof_paragraphs_to_save = get_paragraph_save_amount(); if ( (nof_paragraphs_to_save > 0) && (outputhistory[0] != NULL) && (find_chunk("TxHs", iff_file) == 0) ) { if (read_chunk_length(iff_file) == -1) { free(restored_story_mem); return _handle_save_or_restore_failure(evaluate_result, i18n_libfizmo_CANT_READ_CHUNK_LENGTH, iff_file, false); } chunk_length = get_last_chunk_length(); TRACE_LOG("saved history size: %d bytes.\n", chunk_length); #ifdef ENABLE_TRACING zucs_char_buffer[1] = 0; i = 0; #endif // ENABLE_TRACING if (chunk_length > 0) { history_input_index = 0; while (chunk_length != 0) { history_buffer[history_input_index] = (z_ucs)read_four_byte_number(iff_file); #ifdef ENABLE_TRACING zucs_char_buffer[0] = history_buffer[history_input_index]; TRACE_LOG("read char %d: \"", i); TRACE_LOG_Z_UCS(zucs_char_buffer); TRACE_LOG("\"\n"); i++; #endif // ENABLE_TRACING chunk_length -= 4; history_input_index++; if ( (history_input_index == HISTORY_BUFFER_INPUT_SIZE - 1) || (chunk_length == 0) ) { store_data_in_history( outputhistory[0], history_buffer, history_input_index, true); history_input_index = 0; } } active_interface->game_was_restored_and_history_modified(); } } #endif // DISABLE_OUTPUT_HISTORY if (fsi->closefile(iff_file) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "closefile"); number_of_locals_active = current_stack_frame_nof_locals; stack_words_from_active_routine = current_stack_frame_nof_functions_stack_words; local_variable_storage_index = z_stack_index - current_stack_frame_nof_locals - current_stack_frame_nof_functions_stack_words; TRACE_LOG( "Restored stack: %d locals active, %d, words from active routine.\n", number_of_locals_active, stack_words_from_active_routine); if (saved_stack != NULL) delete_stack_container(saved_stack); // restored_story_mem has been filled via dynamix_index above so inhibit // warning is okay. // As with restart, the transcription and fixed font bits survive. flags2 = z_mem[0x11] & 0x3; /*@-compdef@*/ memcpy( z_mem + address, restored_story_mem, length); /*@+compdef@*/ z_mem[0x11] &= 0xfc; z_mem[0x11] |= flags2; free(restored_story_mem); fizmo_new_screen_size( active_interface->get_screen_width_in_characters(), active_interface->get_screen_height_in_lines()); #ifdef ENABLE_TRACING dump_stack_to_tracelog(); dump_dynamic_memory_to_tracelog(); #endif // ENABLE_TRACING if (bool_equal(evaluate_result, true)) _store_save_or_restore_result(2); return 2; } int restore_game(uint16_t address, uint16_t length, char *filename, bool skip_asking_for_filename, bool evaluate_result, char *directory) { z_file *save_file; char *str; char *system_filename; TRACE_LOG("Restore %d bytes to address %d.\n", length, address); if (filename != NULL) { if (bool_equal(skip_asking_for_filename, true)) { system_filename = filename; if (directory != NULL) { str = fizmo_malloc(strlen(directory) + strlen(system_filename) + 2); strcpy(str, directory); strcat(str, "/"); strcat(str, system_filename); } else str = system_filename; save_file = open_simple_iff_file( str, IFF_MODE_READ_SAVEGAME); if (directory != NULL) free(str); free(system_filename); } else { if ( ((ask_for_filename(NULL, &save_file, directory, FILETYPE_SAVEGAME, FILEACCESS_READ)) < 0) || (save_file == NULL) ) { if (bool_equal(evaluate_result, true)) _store_save_or_restore_result(0); return -1; } str = save_file->filename; TRACE_LOG("filename from ask_for_filename: \"%s\".\n", str); } } else { if ( ((ask_for_filename(NULL, &save_file, directory, FILETYPE_SAVEGAME, FILEACCESS_READ)) < 0) || (save_file == NULL) ) { if (bool_equal(evaluate_result, true)) _store_save_or_restore_result(0); return -1; } str = save_file->filename; TRACE_LOG("filename from ask_for_filename: \"%s\".\n", str); } return restore_game_from_stream(address, length, save_file, evaluate_result); } void opcode_restore_0op(void) { TRACE_LOG("Opcode: RESTORE.\n"); if (strcmp(get_configuration_value("disable-restore"), "true") == 0) _store_save_or_restore_result(0); else restore_game( 0, (uint16_t)(active_z_story->dynamic_memory_end - z_mem + 1), NULL, false, true, get_configuration_value("savegame-path")); } void opcode_restore_ext(void) { uint16_t address; uint16_t length; uint8_t *ptr; char *filename = NULL; long memsize; int i; TRACE_LOG("Opcode: RESTORE_EXT.\n"); if (strcmp(get_configuration_value("disable-restore"), "true") == 0) { _store_save_or_restore_result(0); return; } if (number_of_operands >= 2) { address = op[0]; length = op[1]; if (number_of_operands >= 3) { ptr = z_mem + (uint16_t)op[2]; memsize = *ptr + 1; filename = (char*)fizmo_malloc(memsize); for (i=0; i<*ptr; i++) filename[i] = ptr[i+1]; filename[i] = 0; } } else { address = 0; length = (uint16_t)(active_z_story->dynamic_memory_end - z_mem + 1); } restore_game( address, length, filename, false, true, get_configuration_value("savegame-path")); if (filename != NULL) free(filename); } #ifndef DISABLE_FILELIST bool detect_saved_game(char *file_to_check, char **story_file_to_load) { z_file *iff_file; uint8_t release_number_buf[2]; uint16_t release_number; char serial_number[7]; uint8_t checksum_buf[2]; uint16_t checksum; struct z_story_list_entry *story_entry; iff_file = open_simple_iff_file(file_to_check, IFF_MODE_READ_SAVEGAME); if (iff_file == NULL) { return false; } else if (find_chunk("RIdx", iff_file) == 0) { // We have an Blorb-IFF-file, no savegame. fsi->closefile(iff_file); return false; } else { if (find_chunk("IFhd", iff_file) == -1) { fsi->closefile(iff_file); return false; } // Skip length code if (fsi->setfilepos(iff_file, 4, SEEK_CUR) != 0) { fsi->closefile(iff_file); return false; } if (fsi->readchars(release_number_buf, 2, iff_file) != 2) { fsi->closefile(iff_file); return false; } if (fsi->readchars(serial_number, 6, iff_file) != 6) { fsi->closefile(iff_file); return false; } if (fsi->readchars(checksum_buf, 2, iff_file) != 2) { fsi->closefile(iff_file); return false; } fsi->closefile(iff_file); release_number = (release_number_buf[0] << 8) | release_number_buf[1]; serial_number[6] = 0; checksum = (checksum_buf[0] << 8) | checksum_buf[1]; if ((story_entry = get_z_story_entry_from_list( serial_number, release_number, checksum)) != NULL) { *story_file_to_load = fizmo_strdup(story_entry->filename); free_z_story_list_entry(story_entry); } return true; } } #endif // DISABLE_FILELIST #endif /* savegame_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/wordwrap.c0000644000175000017500000005353513153330674020750 0ustar chrenderchrender /* wordwrap.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef wordwrap_c_INCLUDED #define wordwrap_c_INCLUDED // The wordwrapper wraps words by using a space character as seperator only. // The details of word-wrapping are not specified in the Z-Machine // specification, so I'll not designate other characters than the space // as seperators. #include #include #include "../tools/tracelog.h" #include "../tools/types.h" #include "../tools/i18n.h" #include "../tools/z_ucs.h" #include "../locales/libfizmo_locales.h" #include "wordwrap.h" #include "fizmo.h" #include "hyphenation.h" // static z_ucs word_split_chars[] = { // Z_UCS_SPACE, Z_UCS_MINUS, Z_UCS_NEWLINE, Z_UCS_DOT, (z_ucs)',', // (z_ucs)'"', 0 }; // The "word_split_chars" will cause a word to be split, even if no // additional space is present. For example "foo bar", "foo-bar", // "foo--bar", "foo\nbar", "foo.bar", "foo,bar", and foo"bar are // all split before "bar". //static z_ucs word_split_chars[] = { // Z_UCS_SPACE, Z_UCS_MINUS, Z_UCS_NEWLINE, Z_UCS_DOT, (z_ucs)',', // (z_ucs)'"', 0 }; // The "word_interpunctation_chars" designate chars which may be // repeatatedly end a word. For example "foo--bar", "foo---bar" // and "foo...bar" are all split before "bar". //static z_ucs word_interpunctation_chars[] = { // Z_UCS_MINUS, Z_UCS_DOT, 0 }; static z_ucs word_split_chars[] = { Z_UCS_SPACE, Z_UCS_NEWLINE, 0 }; WORDWRAP *wordwrap_new_wrapper(size_t line_length, void (*wrapped_text_output_destination)(z_ucs *output, void *parameter), void *destination_parameter, bool add_newline_after_full_line, int left_side_padding, bool flush_after_newline, bool enable_hyphenation) { WORDWRAP *result = fizmo_malloc(sizeof(WORDWRAP)); int i; result->line_length = line_length; result->wrapped_text_output_destination = wrapped_text_output_destination; result->destination_parameter = destination_parameter; result->add_newline_after_full_line = add_newline_after_full_line; result->left_side_padding = left_side_padding; if (left_side_padding > 0) { result->padding_buffer = fizmo_malloc((left_side_padding + 1) * sizeof(z_ucs)); for (i=0; ipadding_buffer[i] = Z_UCS_SPACE; result->padding_buffer[i] = 0; } else result->padding_buffer = NULL; result->flush_after_newline = flush_after_newline; result->enable_hyphenation = enable_hyphenation; result->input_buffer_size = line_length * 4; result->input_buffer = fizmo_malloc(sizeof(z_ucs)*result->input_buffer_size); result->input_index = 0; result->chars_already_on_line = 0; result->metadata = NULL; result->metadata_size = 0; result->metadata_index = 0; return result; } void wordwrap_destroy_wrapper(WORDWRAP *wrapper_to_destroy) { free(wrapper_to_destroy->input_buffer); if (wrapper_to_destroy->padding_buffer != NULL) free(wrapper_to_destroy->padding_buffer); if (wrapper_to_destroy->metadata != NULL) free(wrapper_to_destroy->metadata); free(wrapper_to_destroy); } static void output_buffer(WORDWRAP *wrapper, z_ucs *buffer_start, int *metadata_offset) { long index, end_index, next_index; struct wordwrap_metadata *metadata_entry; z_ucs buf; TRACE_LOG("Output buffer: \""); TRACE_LOG_Z_UCS(buffer_start); TRACE_LOG("\""); if (*metadata_offset == wrapper->metadata_index) { wrapper->wrapped_text_output_destination( buffer_start, wrapper->destination_parameter); } else { index = buffer_start - wrapper->input_buffer; end_index = index + z_ucs_len(buffer_start); while (index < end_index) { TRACE_LOG("index: %ld, end_index: %ld.\n", index, end_index); TRACE_LOG("metadata-offset: %d.\n", *metadata_offset); if (*metadata_offset < wrapper->metadata_index) { TRACE_LOG("next metadata-index: %ld.\n", wrapper->metadata[*metadata_offset].output_index); while ( (*metadata_offset < wrapper->metadata_index) && (wrapper->metadata[*metadata_offset].output_index == index) ) { metadata_entry = &wrapper->metadata[*metadata_offset]; TRACE_LOG("Output metadata prm %d at %ld.\n", metadata_entry->int_parameter, index); metadata_entry->metadata_output_function( metadata_entry->ptr_parameter, metadata_entry->int_parameter); (*metadata_offset)++; } } next_index = ( (*metadata_offset < wrapper->metadata_index) && (wrapper->metadata[*metadata_offset].output_index < end_index) ) ? wrapper->metadata[*metadata_offset].output_index : end_index; TRACE_LOG("next-index: %ld.\n", next_index); buf = wrapper->input_buffer[next_index]; wrapper->input_buffer[next_index] = 0; wrapper->wrapped_text_output_destination( wrapper->input_buffer + index, wrapper->destination_parameter); wrapper->input_buffer[next_index] = buf; index = next_index; } } } static void flush_input_buffer(WORDWRAP *wrapper, bool force_flush) { z_ucs *index = NULL, *ptr, *hyphenated_word, *last_hyphen, *word_start; z_ucs *word_end, *input = wrapper->input_buffer, *first_space_or_newline; z_ucs buf=0, buf2; // buf initialized to avoid compiler warning z_ucs buf3 = '-'; // buf3 initialized to avoid compiler warning long len, chars_sent = 0; int metadata_offset = 0, i, chars_left_on_line; struct wordwrap_metadata *metadata_entry; int current_line_length = wrapper->line_length - wrapper->chars_already_on_line; input[wrapper->input_index] = 0; TRACE_LOG("input-index: %ld\n", wrapper->input_index); TRACE_LOG("metadata stored: %d.\n", wrapper->metadata_index); for (;;) { TRACE_LOG("Processing flush for line-length %d, already in line: %d.\n", current_line_length, wrapper->chars_already_on_line); if (*input != 0) { TRACE_LOG("flush wordwrap-buffer at %p: \"", input); TRACE_LOG_Z_UCS(input); TRACE_LOG("\".\n"); } if ((index = z_ucs_chr(input, Z_UCS_NEWLINE)) != NULL) { len = index - input; } else { len = z_ucs_len(input); TRACE_LOG("len:%ld, force:%d.\n", len, force_flush); if (len == 0) { if (force_flush == true) { // Force flush metadata behind end of output. while (metadata_offset < wrapper->metadata_index) { TRACE_LOG("flush post-output metadata at: %ld.\n", wrapper->metadata[metadata_offset].output_index); metadata_entry = &wrapper->metadata[metadata_offset]; TRACE_LOG("Output metadata prm %d.\n", metadata_entry->int_parameter); metadata_entry->metadata_output_function( metadata_entry->ptr_parameter, metadata_entry->int_parameter); metadata_offset++; } } wrapper->chars_already_on_line = 0; break; } if (len <= current_line_length) { if (force_flush == false) { // We're quitting on len == current_line_length since we can only // determine wether we can break cleanly is if a space follows // immediately after the last char. wrapper->chars_already_on_line = 0; break; } wrapper->chars_already_on_line = len; } // FIXME: Add break in case hyph is enabled and a word longer than // the line is not terminated with a space. } TRACE_LOG("wordwrap-flush-len: %ld.\n", len); if (len <= current_line_length) { // Line fits on screen. TRACE_LOG("Line fits on screen.\n"); if (index != NULL) { index++; len++; buf = *index; *index = 0; } chars_sent += len; output_buffer(wrapper, input, &metadata_offset); if (wrapper->left_side_padding != 0) wrapper->wrapped_text_output_destination( wrapper->padding_buffer, wrapper->destination_parameter); if (index != NULL) *index = buf; else { //wrapper->input_index = 0; break; } } else if (wrapper->enable_hyphenation == true) { // Line does not fit on screen and hyphenation is enabled, so we'll // try to hyphenate. // In this section we'll set "index" to the point where the line // should be split and "last_hyphen" to the word position where // hyphenation should take place -- if possible, otherwise NULL. // In case hyphenation is active we're looking at the word overruning // the line end. It has to be completed in order to make hyphenation // work. TRACE_LOG("to wrap/hyphenate (force:%d) to length %d : \"", force_flush, current_line_length); TRACE_LOG_Z_UCS(input); TRACE_LOG("\".\n"); // Get the char at the current line end. if (input[current_line_length] == Z_UCS_SPACE) { // Fine, we can wrap right here at this space. index = input + current_line_length; last_hyphen = NULL; } else { if ( ((first_space_or_newline = z_ucs_chrs( input + current_line_length, word_split_chars)) == NULL) && (force_flush == false) ) { // In case we can't find any space the word may not have been // completely written to the buffer. Wait until we've got more // input. TRACE_LOG("No word end found.\n"); break; } else { if (first_space_or_newline == NULL) { word_end = input + current_line_length; while (*(word_end + 1) != 0) { word_end++; } } else { // We've found a space behind the overrunning word so we're // able to correctly split the current line. word_end = first_space_or_newline - 1; } // Before hyphentation, check for dashes inside the last word. // Example: "first-class car", where the word end we've now // found is between "first-class" and "car". word_start = word_end - 1; while (word_start > input) { TRACE_LOG("examining word end: \"%c\".\n", *word_start); if (*word_start == Z_UCS_MINUS) { if (input + current_line_length > word_start) { // Found a dash to break on word_start++; break; } } else if (*word_start == Z_UCS_SPACE) { // We just passed the word-start. word_start++; break; } word_start--; } // FIXME: Do we need a space left from here? TRACE_LOG("word-start: %c\n", *word_start); TRACE_LOG("word-end: %c\n", *word_end); last_hyphen = NULL; if (word_end >= input + current_line_length) { // We only have to hyphenate in case the line is still too long. buf = *(word_end+ 1); *(word_end+ 1) = 0; TRACE_LOG("buffer terminated at word end: \""); TRACE_LOG_Z_UCS(input); TRACE_LOG("\".\n"); index = word_start; if ((hyphenated_word = hyphenate(index)) == NULL) { TRACE_LOG("Error hyphenating.\n"); i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_UNKNOWN_ERROR_CASE, -1); } TRACE_LOG("hyphenated word: \""); TRACE_LOG_Z_UCS(hyphenated_word); TRACE_LOG("\".\n"); *(word_end + 1) = buf; chars_left_on_line = current_line_length - (index - input); TRACE_LOG("chars left on line: %d\n", chars_left_on_line); ptr = hyphenated_word; while ((chars_left_on_line > 0) && (*ptr != 0)) { TRACE_LOG("Testing %c for soft-hyphen.\n", *ptr); if (*ptr == Z_UCS_SOFT_HYPEN) { last_hyphen = input + (current_line_length - chars_left_on_line); } else { chars_left_on_line--; } ptr++; } free(hyphenated_word); if (last_hyphen != NULL) { TRACE_LOG("Last hyphen at %ld.\n", last_hyphen - input); buf3 = *last_hyphen; *last_hyphen = '-'; index = last_hyphen + 1; } else { // We couldn't find a possibility to hyphenate the last // word in the line. TRACE_LOG("No hyphen found.\n"); if (index > input) { if (*(index-1) != Z_UCS_MINUS) { // In case the char before the last word is not a dash, // we'll skip the space before this word by moving back // the index by one. index--; } } else { // In case the current word is so long that it doesn't fit // on the line -- this may be the case if we're supposed // to display ASCII art and the linesize is to short -- we // have to advance the index to the line end. TRACE_LOG("This is the first word in the line, hard break.\n"); index = input + current_line_length; } } } else { index = word_end; last_hyphen = NULL; } } } // Output everything before *index and a newline after. TRACE_LOG("Input (%p, %p): \"", input, index); TRACE_LOG_Z_UCS(input); TRACE_LOG("\".\n"); buf2 = *index; *index = Z_UCS_NEWLINE; buf = *(index + 1); *(index + 1) = 0; output_buffer(wrapper, input, &metadata_offset); if (wrapper->left_side_padding != 0) wrapper->wrapped_text_output_destination( wrapper->padding_buffer, wrapper->destination_parameter); *(index + 1) = buf; *index = buf2; if (last_hyphen != NULL) { *last_hyphen = buf3; index--; } // if (*index == Z_UCS_SPACE) { while (*index == Z_UCS_SPACE) { index++; } len = index - input; chars_sent += len; TRACE_LOG("Processed %ld chars in hyphenated wordwrap.\n", len); } else { // Line won't fit completely and hyphenation is disabled. // Find the end of the last word or dash in it before the end of line // (opposed to looking at the word overring the line end in case of // hyphentation). TRACE_LOG("linelength: %d.\n", current_line_length); ptr = input + current_line_length - 1; while (ptr > input) { if (*ptr == Z_UCS_SPACE) { index = ptr; break; } else if (*ptr == Z_UCS_MINUS) { index = ptr + 1; break; } ptr--; } if (ptr == input) { // We couldn't find any space or dash in the whole line, so we're // forced to flush everything. index = input + current_line_length; } buf = *index; *index = Z_UCS_NEWLINE; buf2 = *(index+1); *(index+1) = 0; TRACE_LOG("Output from %p.\n", input); output_buffer(wrapper, input, &metadata_offset); if (wrapper->left_side_padding != 0) wrapper->wrapped_text_output_destination( wrapper->padding_buffer, wrapper->destination_parameter); *(index+1) = buf2; *index = buf; //if (*index == Z_UCS_SPACE) { while (*index == Z_UCS_SPACE) { index++; } len = index - input; chars_sent += len; } TRACE_LOG("len-after: %ld.\n", len); if (index != NULL) { TRACE_LOG("index: \""); TRACE_LOG_Z_UCS(index); TRACE_LOG("\".\n"); } input += len; current_line_length = wrapper->line_length; } TRACE_LOG("chars sent: %ld, moving: %ld.\n", chars_sent, wrapper->input_index - chars_sent + 1); TRACE_LOG("chars_already_on_line: %d\n", wrapper->chars_already_on_line); index = z_ucs_rchr(wrapper->input_buffer, Z_UCS_NEWLINE); memmove( wrapper->input_buffer, input, sizeof(z_ucs) * (wrapper->input_index - chars_sent + 1)); wrapper->input_index -= chars_sent; if (metadata_offset > 0) { memmove( wrapper->metadata, wrapper->metadata + metadata_offset, sizeof(struct wordwrap_metadata) * (wrapper->metadata_index - metadata_offset)); wrapper->metadata_index -= metadata_offset; TRACE_LOG("metadata stored: %d.\n", wrapper->metadata_index); } for (i=0; imetadata_index; i++) wrapper->metadata[i].output_index -= chars_sent; } void wordwrap_wrap_z_ucs(WORDWRAP *wrapper, z_ucs *input) { size_t len, chars_to_copy, space_in_buffer; len = z_ucs_len(input); while (len > 0) { space_in_buffer = wrapper->input_buffer_size - 1 - wrapper->input_index; chars_to_copy = len > space_in_buffer ? space_in_buffer : len; TRACE_LOG("chars_to_copy: %d, len:%d, space_in_buffer:%d.\n", chars_to_copy, len, space_in_buffer); z_ucs_ncpy( wrapper->input_buffer + wrapper->input_index, input, chars_to_copy); wrapper->input_index += chars_to_copy; wrapper->input_buffer[wrapper->input_index] = 0; input += chars_to_copy; len -= chars_to_copy; TRACE_LOG("chars copied: %d, chars left: %ld.\n",chars_to_copy,(long)len); if ( (wrapper->input_index == wrapper->input_buffer_size - 1) || ( (wrapper->flush_after_newline == true) && ( (wrapper->input_index + wrapper->chars_already_on_line > wrapper->line_length) || (z_ucs_chr(wrapper->input_buffer, Z_UCS_NEWLINE) != NULL) ) ) ) { flush_input_buffer(wrapper, false); //FIXME: Increase buffer size in case flush not possible. } } } void wordwrap_flush_output(WORDWRAP *wrapper) { flush_input_buffer(wrapper, true); } void wordwrap_insert_metadata(WORDWRAP *wrapper, void (*metadata_output)(void *ptr_parameter, uint32_t int_parameter), void *ptr_parameter, uint32_t int_parameter) { size_t bytes_to_allocate; // Before adding new metadata, check if we need to allocate more space. if (wrapper->metadata_index == wrapper->metadata_size) { bytes_to_allocate = (size_t)( (wrapper->metadata_size + 32) * sizeof(struct wordwrap_metadata)); TRACE_LOG("Allocating %d bytes for wordwrap-metadata.\n", (int)bytes_to_allocate); wrapper->metadata = (struct wordwrap_metadata*)fizmo_realloc( wrapper->metadata, bytes_to_allocate); wrapper->metadata_size += 32; TRACE_LOG("Wordwrap-metadata at %p.\n", wrapper->metadata); } TRACE_LOG("Current wordwrap-metadata-index is %d.\n", wrapper->metadata_index); TRACE_LOG("Current wordwrap-metadata-entry at %p.\n", &(wrapper->metadata[wrapper->metadata_index])); wrapper->metadata[wrapper->metadata_index].output_index = wrapper->input_index; wrapper->metadata[wrapper->metadata_index].metadata_output_function = metadata_output; wrapper->metadata[wrapper->metadata_index].ptr_parameter = ptr_parameter; wrapper->metadata[wrapper->metadata_index].int_parameter = int_parameter; TRACE_LOG("Added new metadata entry at %ld with int-parameter %ld, ptr:%p.\n", wrapper->input_index, (long int)int_parameter, ptr_parameter); wrapper->metadata_index++; } void wordwrap_adjust_line_length(WORDWRAP *wrapper, size_t new_line_length) { wrapper->line_length = new_line_length; } void wordwrap_remove_chars(WORDWRAP *wrapper, size_t num_chars_to_remove) { if ((long)num_chars_to_remove > wrapper->input_index) { wrapper->input_index = 0; } else { wrapper->input_index -= num_chars_to_remove; } while ( (wrapper->metadata_index > 0) && (wrapper->metadata[wrapper->metadata_index].output_index >= wrapper->input_index) ) { wrapper->metadata_index--; } } void wordwrap_set_line_index(WORDWRAP *wrapper, int new_line_index) { TRACE_LOG("Setting chars on line to %d.\n", new_line_index); wrapper->chars_already_on_line = new_line_index; } #endif /* wordwrap_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/blorb.c0000644000175000017500000001725613153330674020203 0ustar chrenderchrender /* blorb.c * * This file is part of fizmo. * * Copyright (c) 2011-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef blorb_c_INCLUDED #define blorb_c_INCLUDED #include #include #include "../tools/types.h" #include "../tools/filesys.h" #include "../tools/i18n.h" #include "../tools/tracelog.h" #include "../locales/libfizmo_locales.h" #include "blorb.h" #include "fizmo.h" #include "iff.h" struct fizmo_blorb_struct { int resource_number; int type; long offset; int v3_number_of_loops; }; typedef struct fizmo_blorb_struct fizmo_blorb; struct fizmo_blorb_map_struct { z_file *blorb_file; fizmo_blorb **blorbs; int frontispiece_image_no; }; typedef struct fizmo_blorb_map_struct fizmo_blorb_map; static fizmo_blorb *fizmo_get_blorb(z_blorb_map *blorb_map, int usage, int resnum) { int i = 0; fizmo_blorb_map *map; fizmo_blorb *blorb; if (blorb_map == NULL) return NULL; map = (fizmo_blorb_map*)blorb_map->blorb_map_implementation; blorb = map->blorbs[i++]; while (blorb != NULL) { if ( (blorb->resource_number == resnum) && (blorb->type == usage) ) return blorb; blorb = map->blorbs[i++]; } return NULL; } static z_blorb_map *fizmo_blorb_init(z_file *blorb_file) { z_blorb_map *result_wrapper; fizmo_blorb_map *result; fizmo_blorb *blorb; int resource_chunk_size; char buf[5]; int nof_resources, nof_loops, blorb_index, resource_number; if (find_chunk("RIdx", blorb_file) == -1) { fsi->closefile(blorb_file); return NULL; } if (read_chunk_length(blorb_file) == -1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_RETURNED_ERROR_CODE_P1D, -0x0101, "read_chunk_length", errno); result = fizmo_malloc(sizeof(fizmo_blorb_map)); result->blorb_file = blorb_file; result_wrapper = fizmo_malloc(sizeof(z_blorb_map)); result_wrapper->blorb_map_implementation = result; resource_chunk_size = get_last_chunk_length(); nof_resources = (resource_chunk_size - 4) / 12; // Skip next number of resources. if ((fsi->setfilepos(result->blorb_file, 4, SEEK_CUR)) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_RETURNED_ERROR_CODE_P1D, -0x0101, "setfilepos", errno); TRACE_LOG("Number of resources in blorb file: %d.\n", nof_resources); // Count number of images and sounds. result->blorbs = fizmo_malloc(sizeof(fizmo_blorb*) * (nof_resources+1)); buf[4] = '\0'; blorb_index = 0; while (nof_resources > 0) { blorb = fizmo_malloc(sizeof(fizmo_blorb)); if (fsi->readchars(buf, 4, result->blorb_file) != 4) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0106, "readchars"); TRACE_LOG("Type descriptor: %s\n", buf); if (strcmp(buf, "Pict") == 0) blorb->type = Z_BLORB_TYPE_PICT; else if (strcmp(buf, "Snd ") == 0) blorb->type = Z_BLORB_TYPE_SOUND; else if (strcmp(buf, "Exec") == 0) blorb->type = Z_BLORB_TYPE_EXEC; else // Unknown resource. i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_UNKNOWN_ERROR_CASE, -1); blorb->resource_number = read_four_byte_number(result->blorb_file); blorb->offset = read_four_byte_number(result->blorb_file) + 8; blorb->v3_number_of_loops = -1; result->blorbs[blorb_index++] = blorb; nof_resources--; } result->blorbs[blorb_index] = NULL; if (find_chunk("Fspc", result->blorb_file) == 0) { if ((fsi->setfilepos(result->blorb_file, 4, SEEK_CUR)) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_RETURNED_ERROR_CODE_P1D, -0x0101, "setfilepos", errno); result->frontispiece_image_no = read_four_byte_number(result->blorb_file); } else result->frontispiece_image_no = -1; if (ver < 5) { if (find_chunk("Loop", result->blorb_file) == 0) { nof_resources = read_four_byte_number(result->blorb_file) / 8; TRACE_LOG("Number of loop entries: %d.\n", nof_resources); while (nof_resources > 0) { resource_number = read_four_byte_number(result->blorb_file); nof_loops = read_four_byte_number(result->blorb_file); TRACE_LOG("Trying to find resource #%d.\n", resource_number); if ((blorb = fizmo_get_blorb( result_wrapper, Z_BLORB_TYPE_SOUND, resource_number)) != NULL) { TRACE_LOG("Resource found, setting nof_loops to %d.\n", nof_loops); blorb->v3_number_of_loops = nof_loops; } nof_resources--; } } } return result_wrapper; } static long fizmo_get_blorb_offset(z_blorb_map *blorb_map, int usage, int resnum) { fizmo_blorb *result_blorb; if ((result_blorb = fizmo_get_blorb(blorb_map, usage, resnum)) == NULL) return -1; else return result_blorb->offset; } static int fizmo_get_frontispiece_resource_number(z_blorb_map *blorb_map) { fizmo_blorb_map *map; if (blorb_map == NULL) return -1; map = (fizmo_blorb_map*)blorb_map->blorb_map_implementation; return map->frontispiece_image_no; } static int fizmo_free_blorb_map(z_blorb_map *blorb_map) { int i = 0; fizmo_blorb_map *map; fizmo_blorb *blorb; if (blorb_map == NULL) return -1; map = (fizmo_blorb_map*)blorb_map->blorb_map_implementation; blorb = map->blorbs[i++]; while (blorb != NULL) { free(blorb); blorb = map->blorbs[i++]; } free(map->blorbs); free(map); free(blorb_map); return 0; } int get_v3_sound_loops_from_blorb_map(z_blorb_map *blorb_map, int resnum) { fizmo_blorb *result_blorb; if ((result_blorb = fizmo_get_blorb(blorb_map, Z_BLORB_TYPE_SOUND, resnum)) == NULL) return -1; else return result_blorb->v3_number_of_loops; } struct z_blorb_interface fizmo_blorb_interface = { &fizmo_blorb_init, &fizmo_get_blorb_offset, &fizmo_get_frontispiece_resource_number, &fizmo_free_blorb_map }; struct z_blorb_interface *active_blorb_interface = &fizmo_blorb_interface; #endif /* blorb_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/misc.c0000644000175000017500000001435713153330674020035 0ustar chrenderchrender /* misc.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "../tools/filesys.h" #include "misc.h" #include "fizmo.h" #include "streams.h" #include "stack.h" #include "zpu.h" #include "routine.h" #include "variable.h" #include "../locales/libfizmo_locales.h" #ifdef ENABLE_DEBUGGER #include "debugger.h" #endif // ENABLE_DEBUGGER #if !defined(__WIN32__) static struct sigaction fizmo_sigactions; #endif // defined(__WIN32__) void opcode_restart(void) { TRACE_LOG("Opcode: RESTART.\n"); terminate_interpreter = INTERPRETER_QUIT_RESTART; } void opcode_verify(void) { uint16_t file_length = (z_mem[0x1a] << 8) | z_mem[0x1b]; uint16_t header_checksum = (z_mem[0x1c] << 8) | z_mem[0x1d]; uint16_t calculated_checksum = 0; int i, input, scale; TRACE_LOG("Opcode: VERIFY.\n"); if ( (file_length == 0) && (header_checksum == 0) ) evaluate_branch((uint8_t)1); if (ver <= 3) scale = 2; else if (ver <= 5) scale = 4; else scale = 8; if (file_length * scale - 1 >= 0x40) { if (fsi->setfilepos( active_z_story->z_story_file, 0x40 + active_z_story->story_file_exec_offset, SEEK_SET) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FATAL_ERROR_READING_STORY_FILE, -1); i = 0x40; while (i < file_length * scale) { if ((input = fsi->readchar(active_z_story->z_story_file)) == EOF) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FATAL_ERROR_READING_STORY_FILE, -1); calculated_checksum += input; i++; } } evaluate_branch( calculated_checksum == header_checksum ? (uint8_t)1 : (uint8_t)0); } void opcode_piracy(void) { TRACE_LOG("Opcode: PIRACY.\n"); evaluate_branch(1); } void abort_interpreter(int exit_code, z_ucs *error_message) { #ifdef THROW_SIGFAULT_ON_ERROR int x; #endif // THROW_SIGFAULT_ON_ERROR deactivate_signal_handlers(); #ifdef ENABLE_DEBUGGER streams_latin1_output("\nAborting due to:\n"); streams_z_ucs_output(error_message); streams_latin1_output("\n"); debugger(); debugger_interpreter_stopped(); #endif // ENABLE_DEBUGGER TRACE_LOG("Aborting interpreter.\n"); if (error_message != NULL) { TRACE_LOG("Abort with exit message \""); TRACE_LOG_Z_UCS(error_message); TRACE_LOG("\"\n"); } if (active_sound_interface != NULL) { TRACE_LOG("Sound interface at %p.\n", active_sound_interface); TRACE_LOG("Closing sound interface.\n"); active_sound_interface->close_sound(); } TRACE_LOG("Closing streams.\n"); close_streams(error_message); // From the OpenGroup: The value of status may be 0, EXIT_SUCCESS, // EXIT_FAILURE, [CX] [Option Start] or any other value, though only // the least significant 8 bits (that is, status & 0377) shall be // available to a waiting parent process. [Option End] // -> Thus, we print the exit code seperately. TRACE_LOG("Output exit code.\n"); //fprintf(stderr, "Exit code: %d.\n", exit_code); //(void)signal(SIGSEGV, SIG_DFL); TRACE_LOG("Exit.\n"); #ifdef THROW_SIGFAULT_ON_ERROR x = *((int*)NULL); #endif #if defined(__WIN32__) exit_code = 0; #endif // !defined(__WIN32__) exit(exit_code); } #if !defined(__WIN32__) static void catch_signal_and_abort(int sig_num) { TRACE_LOG("Caught signal %d.\n", sig_num); i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_CAUGHT_SIGNAL_P0D_ABORTING_INTERPRETER, -1, (long)sig_num); } #endif // defined(__WIN32__) void init_signal_handlers(void) { #if !defined(__WIN32__) TRACE_LOG("Initialiazing signal handlers.\n"); sigemptyset(&fizmo_sigactions.sa_mask); fizmo_sigactions.sa_flags = 0; fizmo_sigactions.sa_handler = &catch_signal_and_abort; sigaction(SIGSEGV, &fizmo_sigactions, NULL); sigaction(SIGTERM, &fizmo_sigactions, NULL); sigaction(SIGINT, &fizmo_sigactions, NULL); sigaction(SIGQUIT, &fizmo_sigactions, NULL); sigaction(SIGBUS, &fizmo_sigactions, NULL); sigaction(SIGILL, &fizmo_sigactions, NULL); #endif // !defined(__WIN32__) } void deactivate_signal_handlers(void) { #if !defined(__WIN32__) TRACE_LOG("Deactivating signal handlers.\n"); sigemptyset(&fizmo_sigactions.sa_mask); fizmo_sigactions.sa_flags = 0; fizmo_sigactions.sa_handler = NULL; sigaction(SIGSEGV, &fizmo_sigactions, NULL); sigaction(SIGTERM, &fizmo_sigactions, NULL); sigaction(SIGINT, &fizmo_sigactions, NULL); sigaction(SIGQUIT, &fizmo_sigactions, NULL); sigaction(SIGBUS, &fizmo_sigactions, NULL); sigaction(SIGILL, &fizmo_sigactions, NULL); #endif // !defined(__WIN32__) } libfizmo-0.7.15/src/interpreter/text.h0000644000175000017500000000542313153330674020065 0ustar chrenderchrender /* text.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef text_h_INCLUDED #define text_h_INCLUDED #include "../tools/types.h" #define Z_UCS_OUTPUT_BUFFER_SIZE 128 // According to Z-Spec 1.0, abbreviations may not continue further // abbreviations. #define MAX_ABBREVIATION_DEPTH 1 #ifndef text_c_INCLUDED extern uint8_t alphabet_table_v1[]; extern uint8_t alphabet_table_after_v1[]; extern z_ucs z_ucs_newline_string[]; #endif /* text_c_INCLUDED */ z_ucs zscii_input_char_to_z_ucs(zscii zscii_input); z_ucs zscii_output_char_to_z_ucs(zscii zscii_output); zscii unicode_char_to_zscii_input_char(z_ucs unicode_char); void opcode_print_paddr(void); void opcode_read(void); void opcode_print(void); void opcode_print_num(void); void opcode_print_char(void); void opcode_new_line(void); void opcode_print_obj(void); void opcode_print_ret(void); void opcode_print_addr(void); void opcode_show_status(void); void opcode_read_char(void); void opcode_tokenise(void); void opcode_print_table(void); void opcode_encode_text(void); void opcode_print_unicode(void); void opcode_check_unicode(void); // This is used by the interface code outside the module: /*@-exportlocal@*/ void display_status_line(void); /*@+exportlocal@*/ #endif /* text_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/variable.c0000644000175000017500000002356213153330674020665 0ustar chrenderchrender /* variable.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef variable_c_INCLUDED #define variable_c_INCLUDED #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "fizmo.h" #include "stack.h" #include "zpu.h" #include "config.h" #include "../locales/libfizmo_locales.h" /*@dependent@*/ uint16_t *local_variable_storage_index; uint8_t number_of_locals_active; void set_variable(uint8_t variable_number, uint16_t data, bool keep_stack_index) { if (variable_number == 0) { if (stack_words_from_active_routine == MAXIMUM_STACK_ENTRIES_PER_ROUTINE) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_MAXIMUM_NUMBER_OF_STACK_ENTRIES_PER_ROUTINE_P0D_EXCEEDED, -1, (long int)MAXIMUM_STACK_ENTRIES_PER_ROUTINE); if (bool_equal(keep_stack_index, true)) { z_stack_pull_word(); z_stack_push_word(data); } else { z_stack_push_word(data); stack_words_from_active_routine++; } } else if (variable_number < 0x10) { if (variable_number > number_of_locals_active) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_TRYING_TO_STORE_VARIABLE_L_P0D_BUT_ONLY_P1D_VARIABLES_ACTIVE, -1, (long int)variable_number-1, (long int)number_of_locals_active); variable_number--; TRACE_LOG("Storing %x in L0%x.\n", data, variable_number); local_variable_storage_index[variable_number] = data; } else { variable_number -= 0x10; TRACE_LOG("Setting global variable G%02x to %x.\n", variable_number, data); store_word( /*@-nullderef@*/ active_z_story->global_variables /*@-nullderef@*/ +(variable_number*2), data); } } uint16_t get_variable(uint8_t variable_number, bool keep_stack_index) { uint16_t result; if (variable_number == 0) { if (stack_words_from_active_routine == 0) { if (bool_equal(skip_active_routines_stack_check_warning, false)) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_NOT_ENOUGH_STACK_WORDS_FROM_LOCAL_ROUTINE_ON_STACK, -1); else return 0; } if (bool_equal(keep_stack_index, true)) result = z_stack_peek_word(); else { result = z_stack_pull_word(); stack_words_from_active_routine--; } return result; } else if (variable_number < 0x10) { if (variable_number > number_of_locals_active) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_TRYING_TO_STORE_VARIABLE_L_P0D_BUT_ONLY_P1D_VARIABLES_ACTIVE, -1, (long int)variable_number-1, (long int)number_of_locals_active); variable_number--; result = local_variable_storage_index[variable_number]; TRACE_LOG("Reading %x from L0%x.\n", result, variable_number); return result; } else { variable_number -= 0x10; result = load_word(active_z_story->global_variables+(variable_number*2)); TRACE_LOG("Reading %x from global variable G%02x.\n", result, variable_number); return result; } } void opcode_pull(void) { uint16_t value = 0; uint16_t spare_slots; uint8_t *user_stack; TRACE_LOG("Opcode: PULL.\n"); if (ver == 6) (void)read_z_result_variable(); if ( (ver != 6) || (number_of_operands < 1) ) { if ( (stack_words_from_active_routine == 0) && (bool_equal(skip_active_routines_stack_check_warning, false)) ) { i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_NOT_ENOUGH_STACK_WORDS_FROM_LOCAL_ROUTINE_ON_STACK, -1); } else { TRACE_LOG("Pulling to variable %x.\n", op[0]); value = z_stack_pull_word(); stack_words_from_active_routine--; } } else { user_stack = z_mem + (uint16_t)op[0]; spare_slots = load_word(user_stack); spare_slots++; value = load_word(user_stack + spare_slots); store_word(user_stack, spare_slots); } if (ver == 6) set_variable(z_res_var, value, true); else set_variable(op[0], value, true); } void opcode_push(void) { TRACE_LOG("Opcode: PUSH.\n"); TRACE_LOG("Pushing %x to stack.\n", op[0]); if (stack_words_from_active_routine == MAXIMUM_STACK_ENTRIES_PER_ROUTINE) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_MAXIMUM_NUMBER_OF_STACK_ENTRIES_PER_ROUTINE_P0D_EXCEEDED, -1, (long int)MAXIMUM_STACK_ENTRIES_PER_ROUTINE); z_stack_push_word(op[0]); stack_words_from_active_routine++; } void opcode_push_user_stack(void) { uint16_t spare_slots; uint8_t *user_stack; TRACE_LOG("Opcode: PUSH_USER_STACK.\n"); (void)read_z_result_variable(); user_stack = z_mem + (uint16_t)op[1]; if ((spare_slots = load_word(user_stack)) > 0) { store_word(user_stack + spare_slots, (uint16_t)op[0]); spare_slots--; store_word(user_stack, spare_slots); evaluate_branch((uint8_t)1); } else { evaluate_branch((uint8_t)0); } } void opcode_store(void) { TRACE_LOG("Opcode: STORE.\n"); TRACE_LOG("Writing %x to variable %x.\n", op[1], op[0]); set_variable(op[0], op[1], true); } void opcode_storew(void) { uint8_t *address = z_mem + (uint16_t)(op[0] + ((int16_t)op[1])*2); TRACE_LOG("Opcode: STOREW.\n"); if (address > active_z_story->dynamic_memory_end) { TRACE_LOG("Trying to storew to %x which is above dynamic memory.\n", address); } else { TRACE_LOG("Storing %x to %x.\n", op[2], address); store_word(z_mem + (uint16_t)(op[0] + ((int16_t)op[1])*2), op[2]); } } void opcode_loadw(void) { uint16_t value; uint8_t *address = z_mem + (uint16_t)(op[0] + ((int16_t)op[1])*2); TRACE_LOG("Opcode: LOADW.\n"); read_z_result_variable(); if (address > active_z_story->static_memory_end) { TRACE_LOG("ERROR: Trying to loadw from %x which is above static memory.\n", address); set_variable(z_res_var, 0, false); } else { value = load_word(address); TRACE_LOG("Loading %x from %x var %x.\n", value, address, z_res_var); set_variable(z_res_var, value, false); } } void opcode_storeb(void) { uint8_t *address = z_mem + (uint16_t)(op[0] + ((int16_t)op[1])); TRACE_LOG("Opcode: STOREB.\n"); if (address > active_z_story->dynamic_memory_end) { TRACE_LOG("Trying to storeb to %x which is above dynamic memory.", address); } else { TRACE_LOG("Storing %x to %x.\n", op[2], address); *(z_mem + (uint16_t)(op[0] + (int16_t)op[1])) = op[2]; } } void opcode_loadb(void) { uint8_t *address = z_mem + (uint16_t)(op[0] + (int16_t)op[1]); TRACE_LOG("Opcode: LOADB.\n"); read_z_result_variable(); if (address > active_z_story->static_memory_end) { TRACE_LOG("Static memory end: %x.\n", active_z_story->static_memory_end); TRACE_LOG("Trying to loadb from %x which is above static memory.\n", address); set_variable(z_res_var, 0, false); } else { TRACE_LOG("Loading from %x to var %x.\n", *address, z_res_var); set_variable(z_res_var, *address, false); } } void opcode_inc(void) { int16_t value; TRACE_LOG("Opcode: INC.\n"); value = (int16_t)get_variable(op[0], false); TRACE_LOG("Incrementing variable %d from %d to %d.\n", op[0], value, value+1); set_variable(op[0], (uint16_t)(value + 1), false); } void opcode_dec(void) { int16_t value; TRACE_LOG("Opcode: DEC.\n"); value = (int16_t)get_variable(op[0], false); TRACE_LOG("Decrementing variable %d from %d to %d.\n", op[0], value, value-1); set_variable(op[0], (uint16_t)(value - 1), false); } void opcode_load(void) { TRACE_LOG("Opcode: LOAD.\n"); read_z_result_variable(); TRACE_LOG("Loading variable with code %d to variable with code %d.\n", op[0], z_res_var); set_variable(z_res_var, get_variable(op[0], true), false); } void opcode_pop(void) { TRACE_LOG("Opcode: POP.\n"); if (stack_words_from_active_routine == 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_NOT_ENOUGH_STACK_WORDS_FROM_LOCAL_ROUTINE_ON_STACK, -1); (void)z_stack_pull_word(); stack_words_from_active_routine--; } void opcode_check_arg_count(void) { TRACE_LOG("Opcode: CHECK_ARG_COUNT.\n"); evaluate_branch( (uint8_t) ( ((int16_t)op[0]) <= ((int16_t)number_of_locals_from_function_call) ? 1 : 0) ); } #endif /* variable_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/hyphenation.h0000644000175000017500000000343613153330674021431 0ustar chrenderchrender /* hyphenation.h * * This file is part of fizmo. * * Copyright (c) 2010-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef hyphenation_h_INCLUDED #define hyphenation_h_INCLUDED z_ucs *hyphenate(z_ucs *word_to_hyphenate); void free_hyphenation_memory(void); #endif /* hyphenation_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/config.c0000644000175000017500000005111713153330674020342 0ustar chrenderchrender /* config.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef config_c_INCLUDED #define config_c_INCLUDED #include #include #include #include #include #if !defined (__WIN32__) #include #endif // !defined (__WIN32__) #include "../tools/tracelog.h" #include "config.h" #include "fizmo.h" #include "mathemat.h" #include "output.h" #include "../tools/types.h" #include "../tools/i18n.h" #include "../locales/libfizmo_locales.h" #define BUFSIZE 5 //int system_charset = SYSTEM_CHARSET_ASCII; bool auto_adapt_upper_window = true; bool auto_open_upper_window = true; bool skip_active_routines_stack_check_warning = false; char config_true_value[] = "true"; char config_false_value[] = "false"; char empty_string[] = ""; bool user_homedir_initialized = false; char *user_homedir = NULL; struct configuration_option configuration_options[] = { // String values: { "autosave-filename", NULL }, { "background-color", NULL }, { "foreground-color", NULL }, { "i18n-search-path", NULL }, { "input-command-filename", NULL }, { "locale", NULL }, { "max-undo-steps", NULL }, { "random-mode", NULL }, { "record-command-filename", NULL }, { "save-text-history-paragraphs", NULL }, { "savegame-default-filename", NULL }, { "savegame-path", NULL }, { "stream-2-left-margin", NULL }, { "stream-2-line-width", NULL }, { "transcript-filename", NULL }, { "z-code-path", NULL }, { "z-code-root-path", NULL }, // Boolean values: { "disable-external-streams", NULL }, { "disable-restore", NULL }, { "disable-save", NULL }, { "disable-sound", NULL }, { "disable-stream-2-hyphenation", NULL }, { "disable-stream-2-wrap", NULL }, { "dont-set-locale-from-config", NULL }, { "enable-font3-conversion", NULL }, { "quetzal-umem", NULL }, { "restore-after-save-and-quit-file-before-read", NULL }, { "save-and-quit-file-before-read", NULL }, { "set-tandy-flag", NULL }, { "start-command-recording-when-story-starts", NULL }, { "start-file-input-when-story-starts", NULL }, { "start-script-when-story-starts", NULL }, { "sync-transcript", NULL }, { "flush-output-on-newline", NULL }, // NULL terminates the option list. { NULL, NULL } }; static char *expand_configuration_value(char *unexpanded_value) { static char *homedir; static int homedir_len; char *ptr = unexpanded_value; int resultlen; char *result, *resultindex; char *var_name; char buf; if (unexpanded_value == NULL) return NULL; if ((homedir = get_user_homedir()) == NULL) homedir = empty_string; homedir_len = strlen(homedir); TRACE_LOG("Value to expand: \"%s\".\n", unexpanded_value); resultlen = 0; while (*ptr != 0) { if (*ptr == '$') { ptr++; if (*ptr == '(') { ptr++; var_name = ptr; while ( (*ptr != 0) && (*ptr != ')') ) ptr++; if (*ptr != ')') return NULL; buf = *ptr; *ptr = 0; if (strcmp(var_name, "HOME") == 0) { resultlen += strlen(homedir); } else { *ptr = buf; return NULL; } *ptr = buf; ptr++; } else return NULL; } else { ptr++; resultlen++; } } TRACE_LOG("result len: %d.\n", resultlen); result = fizmo_malloc(resultlen + 1); resultindex = result; ptr = unexpanded_value; while (*ptr != 0) { if (*ptr == '$') { ptr++; if (*ptr == '(') { ptr++; var_name = ptr; while ( (*ptr != 0) && (*ptr != ')') ) ptr++; if (*ptr != ')') { free(result); return NULL; } buf = *ptr; *ptr = 0; if (strcmp(var_name, "HOME") == 0) { strcpy(resultindex, homedir); resultindex += homedir_len; } else { *ptr = buf; // Can't ever reach this point due to loop 1. } *ptr = buf; ptr++; } } else { *resultindex = *ptr; ptr++; resultindex++; } } *resultindex = 0; TRACE_LOG("result expanded value: %s / %p.\n", result, result); return result; } int append_path_value(char *key, char *value_to_append) { char *str, *str2; int result; if ((str = get_configuration_value(key)) != NULL) { str2 = fizmo_malloc(strlen(str) + strlen(value_to_append) + 2); strcpy(str2, str); strcat(str2, ":"); strcat(str2, value_to_append); TRACE_LOG("Appended path: %s.\n", str2); result = set_configuration_value(key, str2); free(str2); return result; } else return set_configuration_value(key, value_to_append); } int set_configuration_value(char *key, char* new_unexpanded_value) { int i, return_code, result; char *new_value = NULL; char buf[BUFSIZE]; short color_code; char *endptr; if (key == NULL) return -1; if (new_unexpanded_value != NULL) if ((new_value = expand_configuration_value(new_unexpanded_value)) == NULL) return -1; #ifdef ENABLE_TRACING TRACE_LOG("Setting configuration key \"%s\".\n", key); if (new_value != NULL) { TRACE_LOG("New value: %s at %p.\n", new_value, new_value); } #endif //ENABLE_TRACING i = 0; while (configuration_options[i].name != NULL) { TRACE_LOG("i:%d, name:%s.\n", i, configuration_options[i].name); if (strcmp(configuration_options[i].name, key) == 0) { // Parse option values which cannot be simply copied: if (strcmp(key, "locale") == 0) { TRACE_LOG("Trying to set locale to \"%s\".\n", new_value); return_code = (strcmp(get_configuration_value( "dont-set-locale-from-config"), "true") == 0) ? 0 : set_current_locale_name(new_value); free(new_value); return return_code; } else if (strcmp(key, "random-mode") == 0) { if (new_value == NULL) return -1; else if (strcmp(new_value, "random") == 0) { if (configuration_options[i].value != NULL) free(configuration_options[i].value); configuration_options[i].value = new_value; seed_random_generator(); return 0; } else if (strcmp(new_value, "predictable") == 0) { if (configuration_options[i].value != NULL) free(configuration_options[i].value); configuration_options[i].value = new_value; TRACE_LOG("stored value: %p.\n", configuration_options[i].value); seed_random_generator(); return 0; } else return -1; } else if (strcmp(key, "i18n-search-path") == 0) { // Forward to i18n, since this is in tools and cannot access the // "config.c" file. return_code = set_i18n_search_path(new_value); free(new_value); return return_code; } // Options for values which can simply be copied. else if ( (strcmp(key, "z-code-path") == 0) || (strcmp(key, "z-code-root-path") == 0) || (strcmp(key, "autosave-filename") == 0) || (strcmp(key, "savegame-path") == 0) || (strcmp(key, "savegame-default-filename") == 0) || (strcmp(key, "transcript-filename") == 0) || (strcmp(key, "input-command-filename") == 0) || (strcmp(key, "record-command-filename") == 0) ) { if (configuration_options[i].value != NULL) free(configuration_options[i].value); configuration_options[i].value = new_value; return 0; } // Integer values else if ( (strcmp(key, "stream-2-line-width") == 0) || (strcmp(key, "stream-2-left-margin") == 0) || (strcmp(key, "max-undo-steps") == 0) || (strcmp(key, "save-text-history-paragraphs") == 0) ) { if (new_value == NULL) return -1; if (strlen(new_value) == 0) { free(new_value); return -1; } strtol(new_value, &endptr, 10); if (*endptr != 0) { free(new_value); return -1; } if (configuration_options[i].value != NULL) free(configuration_options[i].value); configuration_options[i].value = new_value; return 0; } // Color options else if (strcmp(key, "foreground-color") == 0) { if (new_value == NULL) return -1; color_code = color_name_to_z_colour(new_value); free(new_value); if (color_code == -1) return -1; if (snprintf(buf, BUFSIZE, "%d", color_code) >= BUFSIZE) return -1; if (configuration_options[i].value != NULL) free(configuration_options[i].value); configuration_options[i].value = fizmo_strdup(buf); default_foreground_colour = color_code; return 0; } else if (strcmp(key, "background-color") == 0) { if (new_value == NULL) return -1; color_code = color_name_to_z_colour(new_value); free(new_value); if (color_code == -1) return -1; if (snprintf(buf, BUFSIZE, "%d", color_code) >= BUFSIZE) return -1; if (configuration_options[i].value != NULL) free(configuration_options[i].value); configuration_options[i].value = fizmo_strdup(buf); default_background_colour = color_code; return 0; } // Boolean options else if ( (strcmp(key, "disable-external-streams") == 0) || (strcmp(key, "disable-restore") == 0) || (strcmp(key, "disable-save") == 0) || (strcmp(key, "disable-sound") == 0) || (strcmp(key, "enable-font3-conversion") == 0) || (strcmp(key, "quetzal-umem") == 0) || (strcmp(key, "random-mode") == 0) || (strcmp(key, "restore-after-save-and-quit-file-before-read") == 0) || (strcmp(key, "save-and-quit-file-before-read") == 0) || (strcmp(key, "set-tandy-flag") == 0) || (strcmp(key, "start-command-recording-when-story-starts") == 0) || (strcmp(key, "start-script-when-story-starts") == 0) || (strcmp(key, "start-file-input-when-story-starts") == 0) || (strcmp(key, "disable-stream-2-hyphenation") == 0) || (strcmp(key, "disable-stream-2-wrap") == 0) || (strcmp(key, "sync-transcript") == 0) || (strcmp(key, "dont-set-locale-from-config") == 0) || (strcmp(key, "flush-output-on-newline") == 0) ) { if ( (new_value == NULL) || (*new_value == 0) || (strcmp(new_value, config_true_value) == 0) ) { if (new_value != NULL) free(new_value); if (configuration_options[i].value != NULL) free(configuration_options[i].value); configuration_options[i].value = fizmo_strdup(config_true_value); return 0; } else if ((new_value != NULL) && (strcmp(new_value, config_false_value)==0)) { free(new_value); if (configuration_options[i].value != NULL) free(configuration_options[i].value); configuration_options[i].value = fizmo_strdup(config_false_value); return -1; } else { free(new_value); return -1; } } else { i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_UNKNOWN_CONFIGURATION_OPTION_P0S, -0x0101, key); } } i++; } if (active_interface != NULL) { result = active_interface->parse_config_parameter(key, new_value); if (result == -1) { i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INVALID_VALUE_P0S_FOR_PARAMETER_P1S, -0x0101, key, new_value); } } if (active_sound_interface == NULL) return -2; else { result = active_sound_interface->parse_config_parameter(key, new_value); if (result == -1) { i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INVALID_VALUE_P0S_FOR_PARAMETER_P1S, -0x0101, key, new_value); } } return result; } char *get_configuration_value(char *key) { int i = 0; char **interface_option_names; if (key == NULL) return NULL; TRACE_LOG("Retrieving config value: %s.\n", key); if (strcmp(key, "i18n-search-path") == 0) { // Forward to i18n, since this is in tools and cannot access the // "config.c" file. return get_i18n_search_path(); } else if (strcmp(key, "locale") == 0) { return get_current_locale_name_in_utf8(); } else if ( (strcmp(key, "background-color-name") == 0) || (strcmp(key, "foreground-color-name") == 0) ) { return z_colour_names[ atoi( get_configuration_value( ( strcmp(key, "background-color-name") == 0 ? "background-color" : "foreground-color")))]; } else { while (configuration_options[i].name != NULL) { TRACE_LOG("i:%d, name:%s.\n", i, configuration_options[i].name); if (strcmp(configuration_options[i].name, key) == 0) { // Boolean options if ( (strcmp(key, "disable-external-streams") == 0) || (strcmp(key, "disable-restore") == 0) || (strcmp(key, "disable-save") == 0) || (strcmp(key, "disable-sound") == 0) || (strcmp(key, "enable-font3-conversion") == 0) || (strcmp(key, "quetzal-umem") == 0) || (strcmp(key, "restore-after-save-and-quit-file-before-read") == 0) || (strcmp(key, "save-and-quit-file-before-read") == 0) || (strcmp(key, "set-tandy-flag") == 0) || (strcmp(key, "start-command-recording-when-story-starts") == 0) || (strcmp(key, "start-script-when-story-starts") == 0) || (strcmp(key, "start-file-input-when-story-starts") == 0) || (strcmp(key, "disable-stream-2-hyphenation") == 0) || (strcmp(key, "disable-stream-2-wrap") == 0) || (strcmp(key, "sync-transcript") == 0) || (strcmp(key, "dont-set-locale-from-config") == 0) || (strcmp(key, "flush-output-on-newline") == 0) ) { if (configuration_options[i].value == NULL) { TRACE_LOG("return \"false\".\n"); return config_false_value; } else { TRACE_LOG("return \"%s\".\n", configuration_options[i].value); return configuration_options[i].value; } } // String options else if ( (strcmp(key, "random-mode") == 0) || (strcmp(key, "z-code-path") == 0) || (strcmp(key, "z-code-root-path") == 0) || (strcmp(key, "autosave-filename") == 0) || (strcmp(key, "savegame-path") == 0) || (strcmp(key, "savegame-default-filename") == 0) || (strcmp(key, "transcript-filename") == 0) || (strcmp(key, "input-command-filename") == 0) || (strcmp(key, "record-command-filename") == 0) || (strcmp(key, "background-color") == 0) || (strcmp(key, "foreground-color") == 0) || (strcmp(key, "save-text-history-paragraphs") == 0) || (strcmp(key, "stream-2-line-width") == 0) || (strcmp(key, "stream-2-left-margin") == 0) || (strcmp(key, "max-undo-steps") == 0) ) { TRACE_LOG("Returning value at %p.\n", configuration_options[i].value); return configuration_options[i].value; } else { // Internal error: config-key was found in configuration_options[], // but not in the hardcoded keys above. TRACE_LOG("Unknown config key: \"%s\".", key); return NULL; } } i++; } if (active_interface != NULL) { if ((interface_option_names = active_interface->get_config_option_names()) != NULL) { i = 0; while (interface_option_names[i] != NULL) if (strcmp(interface_option_names[i++], key) == 0) return active_interface->get_config_value(key); } } if (active_sound_interface != NULL) { if ((interface_option_names = active_sound_interface->get_config_option_names()) != NULL) { i = 0; while (interface_option_names[i] != NULL) if (strcmp(interface_option_names[i++], key) == 0) return active_sound_interface->get_config_value(key); } } TRACE_LOG("Unknown config key: \"%s\".", key); return NULL; } } /* char **get_valid_configuration_options(char *key, ...) { char **result; int result_index; size_t memory_size; va_list ap; char *ptr; int i; if (strcmp(key, "locale") == 0) { va_start(ap, key); ptr = va_arg(ap, char*); va_end(ap); if (ptr == NULL) return NULL; result_index = 0; for (i=0; ipw_dir == NULL) user_homedir = NULL; else user_homedir = strdup(pw_entry->pw_dir); #else if ((user_homedir = getenv("HOME")) == NULL) user_homedir = getenv("HOMEPATH"); #endif // !defined (__WIN32__) user_homedir_initialized = true; } return user_homedir; } void init_config_default_values() { set_configuration_value("save-text-history-paragraphs", "1000"); } #endif /* config_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/streams.h0000644000175000017500000000565513153330674020566 0ustar chrenderchrender /* streams.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef streams_h_INCLUDED #define streams_h_INCLUDED #include "../tools/types.h" void init_streams(); void open_input_stream_1(void); void close_input_stream_1(void); int streams_z_ucs_output(z_ucs *z_ucs_output); int streams_z_ucs_output_user_input(z_ucs *z_ucs_output); int streams_latin1_output(char *latin1_output); void opcode_output_stream(void); void open_streams(void); void close_streams(/*@null@*/ z_ucs *error_message); void opcode_input_stream(void); z_file *get_stream_2(void); void restore_stream_2(z_file *str); void stream_2_remove_chars(size_t nof_chars_to_remove); void ask_for_stream2_filename(void); void ask_for_stream4_filename_if_required(void); void stream_4_latin1_output(char *latin1_output); void stream_4_z_ucs_output(z_ucs *z_ucs_output); void ask_for_input_stream_filename(void); #ifndef streams_c_INCLUDED extern bool stream_1_active; extern bool stream_4_active; extern bool input_stream_1_active; extern bool input_stream_1_was_already_active; extern z_file *input_stream_1; extern size_t input_stream_1_filename_size; extern char *input_stream_1_filename; extern z_ucs last_script_filename[]; /*@-exportlocal@*/ extern bool stream_output_has_occured; /*@+exportlocal@*/ // Since this flag is used by the screen interface, splint can not now about // it. #endif // streams_c_INCLUDED #endif // streams_h_INCLUDED libfizmo-0.7.15/src/interpreter/output.c0000644000175000017500000003044613153330674020437 0ustar chrenderchrender /* output.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef output_c_INCLUDED #define output_c_INCLUDED #include "../tools/tracelog.h" #include "../tools/types.h" #include "../tools/i18n.h" #include "output.h" #include "fizmo.h" #include "zpu.h" #include "variable.h" #include "config.h" #ifndef DISABLE_BLOCKBUFFER #include "blockbuf.h" #endif //DISABLE_BLOCKBUFFER #ifndef DISABLE_OUTPUT_HISTORY #include "history.h" #endif //DISABLE_OUTPUT_HISTORY bool lower_window_buffering_active = true; z_style current_style = Z_STYLE_ROMAN; z_style upper_window_style = Z_STYLE_ROMAN; //z_style lower_window_style = Z_STYLE_ROMAN; z_colour current_foreground_colour; z_colour current_background_colour; z_colour default_foreground_colour = Z_COLOUR_WHITE; z_colour default_background_colour = Z_COLOUR_BLACK; z_colour upper_window_foreground_colour; z_colour upper_window_background_colour; z_colour lower_window_foreground_colour; z_colour lower_window_background_colour; // The lower two values are initalized by the init in "fizmo.c". int16_t active_window_number; z_font current_font = Z_FONT_NORMAL; z_font current_resulting_font = Z_FONT_NORMAL; z_font lower_window_font = Z_FONT_NORMAL; static int upper_window_height = 0; void opcode_split_window(void) { TRACE_LOG("Opcode: SPLIT_WINDOW\n"); TRACE_LOG("Number of upper window lines: %d.\n", op[0]); upper_window_height = (int)op[0]; #ifndef DISABLE_BLOCKBUFFER if ((ver >= 3) && (ver != 6)) { blockbuf_resize( upper_window_buffer, (int)active_interface->get_screen_width_in_characters(), (int)op[0]); } #endif // DISABLE_BLOCKBUFFER active_interface->split_window((int16_t)op[0]); } void opcode_set_window(void) { TRACE_LOG("Opcode: SET_WINDOW\n"); TRACE_LOG("New window number: %d.\n", op[0]); if (op[0] == 1) { if ( (upper_window_height == 0) && (bool_equal(auto_open_upper_window, true)) ) { // Zokoban.z5 does set_window(1) without splitting the screen. //height = (int)(active_interface->get_screen_height() / 2); // -> If the height is larger than 1 or 2, the code above gives // a wrong cursor position after restoring "Lost Pig". TRACE_LOG("Opening upper window with 1 line for set_window.\n"); #ifndef DISABLE_BLOCKBUFFER blockbuf_resize( upper_window_buffer, (int)active_interface->get_screen_width_in_characters(), 1); #endif // DISABLE_BLOCKBUFFER active_interface->split_window((int16_t)1); upper_window_height = 1; } #ifndef DISABLE_BLOCKBUFFER if (active_window_number != 1) { set_blockbuf_cursor(upper_window_buffer, 0, 0); } #endif // DISABLE_BLOCKBUFFER } active_window_number = (int16_t)op[0]; active_interface->set_window((int16_t)op[0]); } void opcode_erase_window(void) { int window_id = (int16_t)op[0]; TRACE_LOG("Opcode: ERASE_WINDOW\n"); TRACE_LOG("Window to erase: %d.\n", (int16_t)op[0]); // //FIXME: Implement -2 if (window_id == -1) { active_interface->split_window(0); active_window_number = 0; active_interface->set_window(0); active_interface->erase_window(0); upper_window_height = 0; } else active_interface->erase_window((int16_t)op[0]); } void opcode_erase_line_value(void) { TRACE_LOG("Opcode: ERASE_LINE_VALUE\n"); active_interface->erase_line_value(op[0]); } void opcode_erase_line_pixels(void) { TRACE_LOG("Opcode: ERASE_LINE_PIXELS\n"); active_interface->erase_line_pixels(op[0]); } void process_set_cursor(int16_t y, int16_t x, int16_t window) { /* * From zmach06e.ps: * Flush the buffer and set the cursor for the given window (i.e., window * properties 4 and 5) at position (s, x). It is an error in V4-5 to use * this instruction when window 0 is selected. [Question: Is the window * operand optional or not?] Exception: The first argument can be negative. * If it is − 2 (and the second argument is 0), the screen cursor is turned * on. If it is − 1, it is turned off; the second argument is ignored in * that case. */ TRACE_LOG("Processing set cursor to %d, %d, %d.\n", y, x, window); if (ver == 6) { active_interface->set_cursor(x, y, window); } else { if (active_window_number == 1) { #ifndef DISABLE_BLOCKBUFFER if ( (ver >= 3) && (upper_window_buffer != NULL) && (x >= 1) && (y >= 1) ) set_blockbuf_cursor(upper_window_buffer, x-1, y-1); #endif // DISABLE_BLOCKBUFFER if ( (y >= upper_window_height) && (bool_equal(auto_adapt_upper_window, true)) ) { TRACE_LOG("Resizing upper window to %d lines for cursor movement.\n",y); #ifndef DISABLE_BLOCKBUFFER blockbuf_resize( upper_window_buffer, (int)active_interface->get_screen_width_in_characters(), (int)y); #endif // DISABLE_BLOCKBUFFER active_interface->split_window(y); upper_window_height = (int)y; } } active_interface->set_cursor(y, x, window); } } void opcode_set_cursor(void) { int16_t y = (int16_t)op[0]; int16_t x = (int16_t)op[1]; // These two adjustments make "painter.z5" work. if (y == 0) y = 1; if (x == 0) x = 1; if (ver == 6) { TRACE_LOG("Opcode: SET_CURSOR_LCW\n"); process_set_cursor(x, y, op[2]); } else { TRACE_LOG("Opcode: SET_CURSOR_LC\n"); process_set_cursor(y, x, active_window_number); } } void opcode_get_cursor_array(void) { TRACE_LOG("Opcode: GET_CURSOR\n"); store_word(z_mem + op[0] , active_interface->get_cursor_row()); store_word(z_mem + op[0] + 1, active_interface->get_cursor_column()); } void opcode_set_text_style(void) { z_style new_z_style; TRACE_LOG("Opcode: SET_TEXT_STYLE\n"); if (ver >= 4) { TRACE_LOG("Setting text style to %d.\n", op[0]); new_z_style = (int16_t)op[0]; // REVISIT: Implement warning. if ( (new_z_style < 0) || (new_z_style > 15) ) return; if (current_style != new_z_style) { // Since it's possible to have combinations of styles we'll handle // storing metadata and interface updates right here. #ifndef DISABLE_OUTPUT_HISTORY store_metadata_in_history( outputhistory[0], HISTORY_METADATA_TYPE_STYLE, new_z_style); #endif // DISABLE_OUTPUT_HISTORY //lower_window_style = current_style; active_interface->set_text_style(new_z_style); current_style = new_z_style; } } } void opcode_buffer_mode(void) { TRACE_LOG("Opcode: BUFFER_MODE.\n"); lower_window_buffering_active = ((int16_t)op[0] != 0 ? true : false); active_interface->set_buffer_mode(op[0]); } static void process_set_colour_opcode(uint16_t op0, uint16_t op1, uint16_t op2) { z_colour new_foreground_colour; z_colour new_background_colour; int16_t window_number; if (active_interface->is_colour_available() == false) return; new_foreground_colour = (int16_t)op0; new_background_colour = (int16_t)op1; window_number = (int16_t)op2; // REVISIT: Implement warning if ( (new_foreground_colour < -1) || (new_foreground_colour > 12) ) new_foreground_colour = 0; // REVISIT: Implement warning if ( (new_background_colour < -1) || (new_background_colour > 12) ) new_background_colour = 0; if (ver == 6) { if ( (new_foreground_colour < -1) || (new_foreground_colour > 12) ) return; if ( (new_background_colour < -1) || (new_background_colour > 12) ) return; } else { if ( (new_foreground_colour < 0) || (new_foreground_colour > 9) ) return; if ( (new_background_colour < 0) || (new_background_colour > 9) ) return; } if (new_foreground_colour == Z_COLOUR_CURRENT) new_foreground_colour = current_foreground_colour; else if (new_foreground_colour == Z_COLOUR_DEFAULT) new_foreground_colour = default_foreground_colour; if (new_background_colour == Z_COLOUR_CURRENT) new_background_colour = current_background_colour; else if (new_background_colour == Z_COLOUR_DEFAULT) new_background_colour = default_background_colour; current_foreground_colour = new_foreground_colour; current_background_colour = new_background_colour; TRACE_LOG("evaluated new foreground col: %d.\n", new_foreground_colour); TRACE_LOG("evaluated new background col: %d.\n", new_background_colour); active_interface->set_colour( new_foreground_colour, new_background_colour, window_number); } void opcode_set_colour_fb(void) { TRACE_LOG("Opcode: SET_COLOUR_FB\n"); TRACE_LOG("fg:%d, bg:%d.\n", op[0], op[1]); process_set_colour_opcode(op[0], op[1], (uint16_t)-1); } void opcode_set_colour_fbw(void) { TRACE_LOG("Opcode: SET_COLOUR_FBW\n"); process_set_colour_opcode(op[0], op[1], op[2]); } void opcode_set_font(void) { z_font new_z_font; // If the requested font is available, then it is chosen for the // current window, and the store value is the font ID of the previous // font (which is always positive). If the font is unavailable, // nothing will happen and the store value is 0. // Please note: I consider the "normal" -- code 1 -- and the courier, // fixed font -- code 4 -- to be always available. For simple interfaces, // these are probably the same. The availability of the character graphics // and picture font are read from interface definition. TRACE_LOG("Opcode: SET_FONT\n"); read_z_result_variable(); new_z_font = (int16_t)op[0]; // REVISIT: Implement warning. if ( ( (new_z_font < 0) || (new_z_font > 4) ) || ( (new_z_font == Z_FONT_PICTURE) && (active_interface->is_picture_font_availiable() != true) ) || ( (new_z_font == Z_FONT_CHARACTER_GRAPHICS) && (active_interface->is_character_graphics_font_availiable() != true) ) ) { set_variable(z_res_var, 0, false); return; } /* // REVISIT: Is it correct to not double-set fonts? if (new_z_font != current_font) { if (active_window_number == 0) { #ifndef DISABLE_OUTPUT_HISTORY store_metadata_in_history( outputhistory[0], HISTORY_METADATA_TYPE_FONT, new_z_font); #endif // DISABLE_OUTPUT_HISTORY } else if (active_window_number == 1) { #ifndef DISABLE_BLOCKBUFFER if (ver >= 5) { set_blockbuf_font(upper_window_buffer, new_z_font); } #endif // DISABLE_BLOCKBUFFER } active_interface->set_font(new_z_font); set_variable(z_res_var, (uint16_t)current_font, false); current_font = new_z_font; TRACE_LOG("New font is: %d\n", current_font); } else { set_variable(z_res_var, (uint16_t)current_font, false); } */ current_font = new_z_font; set_variable(z_res_var, (uint16_t)current_font, false); } #endif /* output_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/mt19937ar.c0000644000175000017500000001476613153330674020466 0ustar chrenderchrender /* mt19937ar.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*@-predboolint@*/ /* A C-program for MT19937, with initialization improved 2002/1/26. Coded by Takuji Nishimura and Makoto Matsumoto. Before using, initialize the state by using init_genrand(seed) or init_by_array(init_key, key_length). Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Any feedback is very welcome. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) */ #include "mt19937ar.h" /* Period parameters */ #define N 624 #define M 397 #define MATRIX_A 0x9908b0dfUL /* constant vector a */ #define UPPER_MASK 0x80000000UL /* most significant w-r bits */ #define LOWER_MASK 0x7fffffffUL /* least significant r bits */ static unsigned long mt[N]; /* the array for the state vector */ static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */ /* initializes mt[N] with a seed */ void init_genrand(unsigned long s) { mt[0]= s & 0xffffffffUL; for (mti=1; mti> 30)) + mti); /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ /* In the previous versions, MSBs of the seed affect */ /* only MSBs of the array mt[]. */ /* 2002/01/09 modified by Makoto Matsumoto */ mt[mti] &= 0xffffffffUL; /* for >32 bit machines */ } } /* initialize by an array with array-length */ /* init_key is the array for initializing keys */ /* key_length is its length */ /* slight change for C++, 2004/2/26 */ void init_by_array(unsigned long init_key[], int key_length) { int i, j, k; init_genrand(19650218UL); i=1; j=0; k = (N>key_length ? N : key_length); for (; k; k--) { mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL)) + init_key[j] + j; /* non linear */ mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; j++; if (i>=N) { mt[0] = mt[N-1]; i=1; } if (j>=key_length) j=0; } for (k=N-1; k; k--) { mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL)) - i; /* non linear */ mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; if (i>=N) { mt[0] = mt[N-1]; i=1; } } mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */ } /* generates a random number on [0,0xffffffff]-interval */ unsigned long genrand_int32(void) { unsigned long y; static unsigned long mag01[2]={0x0UL, MATRIX_A}; /* mag01[x] = x * MATRIX_A for x=0,1 */ if (mti >= N) { /* generate N words at one time */ int kk; if (mti == N+1) /* if init_genrand() has not been called, */ init_genrand(5489UL); /* a default initial seed is used */ for (kk=0;kk> 1) ^ mag01[y & 0x1UL]; } for (;kk> 1) ^ mag01[y & 0x1UL]; } y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK); mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1UL]; mti = 0; } y = mt[mti++]; /* Tempering */ y ^= (y >> 11); y ^= (y << 7) & 0x9d2c5680UL; y ^= (y << 15) & 0xefc60000UL; y ^= (y >> 18); return y; } libfizmo-0.7.15/src/interpreter/.splintrc0000644000175000017500000000001213153330674020554 0ustar chrenderchrender+posixlib libfizmo-0.7.15/src/interpreter/zpu.c0000644000175000017500000006657413153330674017730 0ustar chrenderchrender /* zpu.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef zpu_c_INCLUDED #define zpu_c_INCLUDED #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "zpu.h" #include "fizmo.h" #include "savegame.h" #include "misc.h" #include "routine.h" #include "variable.h" #include "property.h" #include "object.h" #include "mathemat.h" #include "text.h" #include "streams.h" #include "output.h" #include "sound.h" #include "stack.h" #include "table.h" #include "undo.h" #include "../locales/libfizmo_locales.h" #ifdef ENABLE_DEBUGGER #include "debugger.h" #endif // ENABLE_DEBUGGER uint8_t *z_mem; /*@dependent@*/ uint8_t *pc; static uint8_t z_instr; static uint8_t z_instr_form; uint8_t number_of_operands; uint16_t op[8]; uint8_t z_res_var; int terminate_interpreter; uint8_t number_of_locals_from_function_call; uint8_t *current_instruction_location; int zpu_step_number = 0; //uint16_t start_interrupt_routine = 0; typedef void /*@null@*/ (*z_opcode_function)(void); static z_opcode_function z_opcode_functions[0x7d]; void dump_locals() { uint8_t i; TRACE_LOG("Locals"); if (number_of_locals_active != 0) { TRACE_LOG(" (at stack index %ld): ", (long int)(local_variable_storage_index - z_stack)); for (i=0; iversion >= 5)) { TRACE_LOG("Instruction has extended form.\n"); *z_instr_form = INSTRUCTION_EXT; *z_instr = *((*instr_ptr)++); operand_types = (*((*instr_ptr)++) << 24) | 0xffffff; } else { TRACE_LOG("Instruction has short form.\n"); *z_instr = instrbyte0 & 0xf; if ((instrbyte0 & 0x30) == 0x30) { *z_instr_form = INSTRUCTION_0OP; operand_types = 0xffffffff; } else { *z_instr_form = INSTRUCTION_1OP; operand_types = (uint32_t)(0x3fffffff | ((instrbyte0 & 0x30) << 26)); } } } else { TRACE_LOG("Instruction has long form.\n"); // 4.3.2 In long form the operand count is always 2OP. The opcode // number is given in the bottom 5 bits. *z_instr_form = INSTRUCTION_2OP; *z_instr = instrbyte0 & 0x1f; // 4.4.2 In long form, bit 6 of the opcode gives the type of the // first operand, bit 5 of the second. A value of 0 means a small // constant and 1 means a variable. (If a 2OP instruction needs a // large constant as operand, then it should be assembled in // variable rather than long form.) if ((instrbyte0 & 0x40) != 0) operand_types = 0x8fffffff; else operand_types = 0x4fffffff; if ((instrbyte0 & 0x20) != 0) operand_types |= 0x20000000; else operand_types |= 0x10000000; } // Now, somewhere in the if/else lines above, the instruction_form might // not have been set. Just to be sure, we check that here. if (*z_instr_form == INSTRUCTION_UNDEF) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INSTRUCTION_FORM_NOT_INITIALIZED, -1); // 4.4.3: Example: $$00101111 means large constant followed by // variable (and no third or fourth opcode). TRACE_LOG("Parsing Operands by code %x.\n", (unsigned)operand_types); operand_index = 0; while ((current_operand_type = (operand_types &0xc0000000) >> 30) != 0x3) { TRACE_LOG("Current Operand code: %x.\n", current_operand_type); //current_instruction.operand_type[operand_index] = current_operand; if (current_operand_type == OPERAND_TYPE_LARGE_CONSTANT) { TRACE_LOG("Reading large constant.\n"); current_operand_value = (**instr_ptr << 8); current_operand_value |= *(++(*instr_ptr)); } else if (current_operand_type == OPERAND_TYPE_SMALL_CONSTANT) { TRACE_LOG("Reading small constant.\n"); current_operand_value = **instr_ptr; } else if (current_operand_type == OPERAND_TYPE_VARIABLE) { variable_number = **instr_ptr; TRACE_LOG("Reading variable with code %x.\n", variable_number); current_operand_value = get_variable(variable_number, false); } else i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_UNKNOWN_OPERAND_TYPE_P0D, -1, (long int)current_operand_type); (*instr_ptr)++; TRACE_LOG("op[%d] = %x.\n", operand_index, current_operand_value); op[operand_index++] = current_operand_value; operand_types <<= 2; } TRACE_LOG("Opcode code: %x.\n", *z_instr); *result_number_of_operands = operand_index; } // This function is not called directly, but invoked from a call // to "interpret_from_address", "interpret_from_call" or from // "interpret_from_call_without_result". static void interpret(/*@null@*/ int frame_index_to_quit_on) { z_opcode_function current_z_opcode_function; uint16_t start_interrupt_routine; //uint16_t start_interrupt_routine_buf; //int i; /* // The lower four "old.*" variables are used to store the state of the // interpreter before entering this function. This state is restored when // the function ends in order to allow the "parent interpreter level" to // continue correctly. uint8_t old_number_of_operands; uint16_t old_op[7]; uint8_t old_z_instr; uint8_t old_z_instr_form; // Store the current interpreter's status. old_z_instr = z_instr; old_z_instr_form = z_instr_form; for (i=0; i<7; i++) old_op[i] = op[i]; old_number_of_operands = number_of_operands; number_of_operands = 0; */ if (active_z_story == NULL) return; TRACE_LOG("Starting interpreting at %lx.\n", (unsigned long int)(pc - z_mem)); if ((frame_index_to_quit_on != -1) && (frame_index_to_quit_on >= number_of_stack_frames)) terminate_interpreter = INTERPRETER_QUIT_ALL; while (terminate_interpreter == INTERPRETER_QUIT_NONE) { /* if (start_interrupt_routine != 0) { TRACE_LOG("\nInvoking sound interrupt routine at %x.\n", get_packed_routinecall_address(start_interrupt_routine)); start_interrupt_routine_buf = start_interrupt_routine; start_interrupt_routine = 0; interpret_from_call_without_result( get_packed_routinecall_address(start_interrupt_routine_buf)); } */ if (active_sound_interface != NULL) { if ((start_interrupt_routine = active_sound_interface->get_next_sound_end_routine()) != 0) { TRACE_LOG("\nInvoking sound interrupt routine at %x.\n", get_packed_routinecall_address(start_interrupt_routine)); interpret_from_call_without_result( get_packed_routinecall_address(start_interrupt_routine)); } } TRACE_LOG("\nPC: %lx.\n", (unsigned long int)(pc - z_mem)); #ifdef ENABLE_DEBUGGER do_breakpoint_actions(); #endif // ENABLE_DEBUGGER #ifdef ENABLE_TRACING TRACE_LOG("Step #%d.\n", zpu_step_number); dump_locals(); dump_stack(); //dump_stack_to_tracelog(); #endif /* ENABLE_TRACING */ zpu_step_number++; // Remember PC for output of warnings and save-on-read. current_instruction_location = pc; parse_opcode( &z_instr, &z_instr_form, &number_of_operands, &pc); current_z_opcode_function = z_opcode_functions[z_instr_form + z_instr]; if (current_z_opcode_function == NULL) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_OPCODE_P0D_IN_FORM_P1D_NOT_IMPLEMENTED, -1, (long int)z_instr, (long int)z_instr_form); current_z_opcode_function(); if ((frame_index_to_quit_on != -1) && (frame_index_to_quit_on >= number_of_stack_frames)) terminate_interpreter = INTERPRETER_QUIT_ROUTINE; } TRACE_LOG("End of interpreting, PC now at %lx.\n", (unsigned long int)(pc - z_mem)); /* // Restore the interpreter's state as it was before this function was // called. number_of_operands = old_number_of_operands; z_instr = old_z_instr; z_instr_form = old_z_instr_form; for (i=0; i<7; i++) op[i] = old_op[i]; */ // In case we quit because of a return to the routine the interpreter // has called, we don't have to quit the whole program. Thus, we set // the flag to "no-quit" if we "only" quit because of a routine-return. if (terminate_interpreter == INTERPRETER_QUIT_ROUTINE) terminate_interpreter = INTERPRETER_QUIT_NONE; } void interpret_from_address(uint32_t start_address) { store_first_stack_frame(); number_of_stack_frames = 1; pc = z_mem + start_address; interpret(-1); } void interpret_resume() { // Used for restore-on-start. interpret(-1); } void interpret_from_call_without_result(uint32_t routine_address) { call_routine(routine_address, 0, true, 0); interpret(number_of_stack_frames - 1); } uint16_t interpret_from_call(uint32_t routine_address) { call_routine(routine_address, 0, false, 0); interpret(number_of_stack_frames - 1); return get_variable(0, false); } void read_z_result_variable(void) { TRACE_LOG("Reading z_result var from %lx.\n", (unsigned long int)((pc - z_mem))); z_res_var = *(pc++); TRACE_LOG("Current result variable code is %x.\n", z_res_var); } // This function is called with the result of a test and evaluates the // results according to 4.7: Instructions which test a condition are called // "branch" instructions. The branch information is stored in one or two // bytes, indicating what to do with the result of the test. If bit 7 of // the first byte is 0, a branch occurs when the condition was false; if 1, // then branch is on true. If bit 6 is set, then the branch occupies 1 byte // only, and the "offset" is in the range 0 to 63, given in the bottom 6 // bits. If bit 6 is clear, then the offset is a signed 14-bit number // given in bits 0 to 5 of the first byte followed by all 8 of the second. // An offset of 0 means "return false from the current routine", and 1 // means "return true from the current routine". // Otherwise, a branch moves execution to the instruction at address // Address after branch data + Offset - 2. void evaluate_branch(uint8_t test_result) { uint8_t branchbyte0 = *(pc++); int16_t branch_offset; if ((branchbyte0 & 0x40) != 0) { branch_offset = (int16_t)(branchbyte0 & 0x3f); } else { branch_offset = (int16_t)(branchbyte0 & 0x1f); TRACE_LOG("Branch offset is: $%x.\n", branch_offset); /*@-shiftimplementation@*/ branch_offset <<= 8; /*@+shiftimplementation@*/ TRACE_LOG("Branch offset is: $%x.\n", branch_offset); branch_offset |= *(pc++); TRACE_LOG("Branch offset is: $%x.\n", branch_offset); if ((branchbyte0 & 0x20) != 0) { branch_offset |= 0xe000; TRACE_LOG("Branch offset is: $%x.\n", branch_offset); } } TRACE_LOG("Test result is: %d.\n", test_result); TRACE_LOG("Branch offset is: %d.\n", branch_offset); if ((((branchbyte0 & 0x80) != 0) && (test_result == 1)) || (((branchbyte0 & 0x80) == 0) && (test_result == 0))) { // 4.7.1 An offset of 0 means "return false from the current routine", // and 1 means "return true from the current routine". if ((branch_offset & 0xfffe) == 0) { TRACE_LOG("Returning from routine with result: %x\n", branch_offset); return_from_routine(branch_offset); } else { TRACE_LOG("Branching to: %lx.\n", (unsigned long int)(pc + branch_offset - 2 - z_mem)); pc += branch_offset - 2; } } else { TRACE_LOG("Not branching.\n"); } } uint32_t get_packed_routinecall_address(uint16_t packed_address) { // 1.2.3 A packed address specifies where a routine or string begins // in high memory. Given a packed address P, the formula to obtain // the corresponding byte address B is: // 2P Versions 1, 2 and 3 // 4P Versions 4 and 5 // 4P + 8R_O Versions 6 and 7, for routine calls // 4P + 8S_O Versions 6 and 7, for print_paddr // 8P Version 8 if (ver <= 3) return ((uint32_t)packed_address) * 2; else if (ver <= 5) return ((uint32_t)packed_address) * 4; else if (ver <= 7) { // We'll assume "get_packed_routinecall_address" is only called when // active_z_story != NULL. /*@-nullderef@*/ return ((uint32_t)packed_address) * 4 + active_z_story->routine_offset; /*@+nullderef@*/ } else if (ver <= 8) return ((uint32_t)packed_address) * 8; i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_UNKNOWN_STORY_VERSION_P0D, -1, ver); // To make compiler happy. /*@-unreachable@*/ return 0; /*@+unreachable@*/ } uint32_t get_packed_string_address(uint16_t packed_address) { // 1.2.3 A packed address specifies [...] (see get_packed_routine_address()). if (ver <= 3) { TRACE_LOG("Decoded address: %ui.\n", ((unsigned)packed_address) * 2); } else if (ver <= 5) { TRACE_LOG("Decoded address: %ui.\n", ((unsigned)packed_address) * 4); } else if (ver <= 7) { // We'll assume "get_packed_string_address" is only called when // active_z_story != NULL. /*@-nullderef@*/ TRACE_LOG("Decoded address: %ui.\n", (unsigned)((packed_address) * 4 + active_z_story->string_offset)); /*@+nullderef@*/ } else if (ver <= 8) { TRACE_LOG("Decoded address: %ui.\n", ((unsigned)packed_address) * 8); } if (ver <= 3) return ((uint32_t)packed_address) * 2; else if (ver <= 5) return ((uint32_t)packed_address) * 4; else if (ver <= 7) { // We'll assume "get_packed_string_address" is only called when // active_z_story != NULL. /*@-nullderef@*/ return ((uint32_t)packed_address) * 4 + active_z_story->string_offset; /*@+nullderef@*/ } else if (ver <= 8) return ((uint32_t)packed_address) * 8; i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_UNKNOWN_STORY_VERSION_P0D, -1, ver); // To make compiler happy. /*@-unreachable@*/ return 0; /*@+unreachable@*/ } uint16_t load_word(uint8_t *ptr) { return (*ptr << 8) | (*(ptr + 1)); } void store_word(uint8_t *dest, uint16_t data) { *dest = data >> 8; *(dest + 1) = data & 0xff; } #ifdef ENABLE_TRACING void dump_dynamic_memory_to_tracelog() { int i = 0; while (i != active_z_story->dynamic_memory_end - z_mem) { TRACE_LOG("Dynamic-Memory-Dump [%05d]: %x\n", i, z_mem[i]); i++; } } #endif // ENABLE_TRACING void init_opcode_functions(void) { z_opcode_functions[INSTRUCTION_2OP + 0x00] = NULL; z_opcode_functions[INSTRUCTION_2OP + 0x01] = &opcode_je; z_opcode_functions[INSTRUCTION_2OP + 0x02] = &opcode_jl; z_opcode_functions[INSTRUCTION_2OP + 0x03] = &opcode_jg; z_opcode_functions[INSTRUCTION_2OP + 0x04] = &opcode_dec_chk; z_opcode_functions[INSTRUCTION_2OP + 0x05] = &opcode_inc_chk; z_opcode_functions[INSTRUCTION_2OP + 0x06] = &opcode_jin; z_opcode_functions[INSTRUCTION_2OP + 0x07] = &opcode_test; z_opcode_functions[INSTRUCTION_2OP + 0x08] = &opcode_or; z_opcode_functions[INSTRUCTION_2OP + 0x09] = &opcode_and; z_opcode_functions[INSTRUCTION_2OP + 0x0a] = &opcode_test_attr; z_opcode_functions[INSTRUCTION_2OP + 0x0b] = &opcode_set_attr; z_opcode_functions[INSTRUCTION_2OP + 0x0c] = &opcode_clear_attr; z_opcode_functions[INSTRUCTION_2OP + 0x0d] = &opcode_store; z_opcode_functions[INSTRUCTION_2OP + 0x0e] = &opcode_insert_obj; z_opcode_functions[INSTRUCTION_2OP + 0x0f] = &opcode_loadw; z_opcode_functions[INSTRUCTION_2OP + 0x10] = &opcode_loadb; z_opcode_functions[INSTRUCTION_2OP + 0x11] = &opcode_get_prop; z_opcode_functions[INSTRUCTION_2OP + 0x12] = &opcode_get_prop_addr; z_opcode_functions[INSTRUCTION_2OP + 0x13] = &opcode_get_next_prop; z_opcode_functions[INSTRUCTION_2OP + 0x14] = &opcode_add; z_opcode_functions[INSTRUCTION_2OP + 0x15] = &opcode_sub; z_opcode_functions[INSTRUCTION_2OP + 0x16] = &opcode_mul; z_opcode_functions[INSTRUCTION_2OP + 0x17] = &opcode_div; z_opcode_functions[INSTRUCTION_2OP + 0x18] = &opcode_mod; z_opcode_functions[INSTRUCTION_2OP + 0x19] = ver >= 4 ? &opcode_call_2s : NULL; z_opcode_functions[INSTRUCTION_2OP + 0x1a] = ver >= 5 ? &opcode_call_2n : NULL; z_opcode_functions[INSTRUCTION_2OP + 0x1b] = ver >= 5 ? ver == 6 ? &opcode_set_colour_fbw : &opcode_set_colour_fb : NULL; z_opcode_functions[INSTRUCTION_2OP + 0x1c] = ver >= 5 ? &opcode_throw: NULL; z_opcode_functions[INSTRUCTION_2OP + 0x1d] = NULL; z_opcode_functions[INSTRUCTION_2OP + 0x1e] = NULL; z_opcode_functions[INSTRUCTION_2OP + 0x1f] = NULL; z_opcode_functions[INSTRUCTION_1OP + 0x00] = &opcode_jz; z_opcode_functions[INSTRUCTION_1OP + 0x01] = &opcode_get_sibling; z_opcode_functions[INSTRUCTION_1OP + 0x02] = &opcode_get_child; z_opcode_functions[INSTRUCTION_1OP + 0x03] = &opcode_get_parent; z_opcode_functions[INSTRUCTION_1OP + 0x04] = &opcode_get_prop_len; z_opcode_functions[INSTRUCTION_1OP + 0x05] = &opcode_inc; z_opcode_functions[INSTRUCTION_1OP + 0x06] = &opcode_dec; z_opcode_functions[INSTRUCTION_1OP + 0x07] = &opcode_print_addr; z_opcode_functions[INSTRUCTION_1OP + 0x08] = ver >= 4 ? &opcode_call_1s : NULL; z_opcode_functions[INSTRUCTION_1OP + 0x09] = &opcode_remove_obj; z_opcode_functions[INSTRUCTION_1OP + 0x0a] = &opcode_print_obj; z_opcode_functions[INSTRUCTION_1OP + 0x0b] = &opcode_ret; z_opcode_functions[INSTRUCTION_1OP + 0x0c] = &opcode_jump; z_opcode_functions[INSTRUCTION_1OP + 0x0d] = &opcode_print_paddr; z_opcode_functions[INSTRUCTION_1OP + 0x0e] = &opcode_load; z_opcode_functions[INSTRUCTION_1OP + 0x0f] = ver >= 5 ? &opcode_call_1n : &opcode_not; z_opcode_functions[INSTRUCTION_0OP + 0x00] = &opcode_rtrue; z_opcode_functions[INSTRUCTION_0OP + 0x01] = &opcode_rfalse; z_opcode_functions[INSTRUCTION_0OP + 0x02] = &opcode_print; z_opcode_functions[INSTRUCTION_0OP + 0x03] = &opcode_print_ret; z_opcode_functions[INSTRUCTION_0OP + 0x04] = &opcode_nop; z_opcode_functions[INSTRUCTION_0OP + 0x05] = (ver <= 4) ? &opcode_save_0op : NULL; z_opcode_functions[INSTRUCTION_0OP + 0x06] = (ver <= 4) ? &opcode_restore_0op : NULL; z_opcode_functions[INSTRUCTION_0OP + 0x07] = &opcode_restart; z_opcode_functions[INSTRUCTION_0OP + 0x08] = &opcode_ret_popped; z_opcode_functions[INSTRUCTION_0OP + 0x09] = ver >= 5 ? &opcode_catch : opcode_pop; z_opcode_functions[INSTRUCTION_0OP + 0x0a] = &opcode_quit; z_opcode_functions[INSTRUCTION_0OP + 0x0b] = &opcode_new_line; z_opcode_functions[INSTRUCTION_0OP + 0x0c] = ver == 3 ? &opcode_show_status : NULL; z_opcode_functions[INSTRUCTION_0OP + 0x0d] = ver >= 3 ? &opcode_verify : NULL; z_opcode_functions[INSTRUCTION_0OP + 0x0e] = NULL; // (Extended opcode) z_opcode_functions[INSTRUCTION_0OP + 0x0f] = ver >= 5 ? &opcode_piracy : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x00] = &opcode_call; z_opcode_functions[INSTRUCTION_VAR + 0x01] = &opcode_storew; z_opcode_functions[INSTRUCTION_VAR + 0x02] = &opcode_storeb; z_opcode_functions[INSTRUCTION_VAR + 0x03] = &opcode_put_prop; z_opcode_functions[INSTRUCTION_VAR + 0x04] = &opcode_read; z_opcode_functions[INSTRUCTION_VAR + 0x05] = &opcode_print_char; z_opcode_functions[INSTRUCTION_VAR + 0x06] = &opcode_print_num; z_opcode_functions[INSTRUCTION_VAR + 0x07] = &opcode_random; z_opcode_functions[INSTRUCTION_VAR + 0x08] = &opcode_push; z_opcode_functions[INSTRUCTION_VAR + 0x09] = &opcode_pull; z_opcode_functions[INSTRUCTION_VAR + 0x0a] = ver >= 3 ? &opcode_split_window : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x0b] = ver >= 3 ? &opcode_set_window : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x0c] = ver >= 4 ? &opcode_call_vs2 : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x0d] = ver >= 4 ? &opcode_erase_window : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x0e] = ver >= 4 ? ver == 6 ? &opcode_erase_line_pixels : &opcode_erase_line_value : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x0f] = ver >= 4 ? &opcode_set_cursor : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x10] = ver >= 4 ? &opcode_get_cursor_array : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x11] = ver >= 4 ? &opcode_set_text_style : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x12] = &opcode_buffer_mode; z_opcode_functions[INSTRUCTION_VAR + 0x13] = &opcode_output_stream; z_opcode_functions[INSTRUCTION_VAR + 0x14] = ver >= 3 ? &opcode_input_stream : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x15] = ver >= 3 ? &opcode_sound_effect : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x16] = &opcode_read_char; z_opcode_functions[INSTRUCTION_VAR + 0x17] = &opcode_scan_table; z_opcode_functions[INSTRUCTION_VAR + 0x18] = ver >= 5 ? &opcode_not : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x19] = &opcode_call_vn; z_opcode_functions[INSTRUCTION_VAR + 0x1a] = ver >= 5 ? &opcode_call_vn2 : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x1b] = ver >= 5 ? &opcode_tokenise : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x1c] = (ver >= 5) ? opcode_encode_text : NULL; z_opcode_functions[INSTRUCTION_VAR + 0x1d] = opcode_copy_table; z_opcode_functions[INSTRUCTION_VAR + 0x1e] = opcode_print_table; z_opcode_functions[INSTRUCTION_VAR + 0x1f] = opcode_check_arg_count; z_opcode_functions[INSTRUCTION_EXT + 0x00] = ver >=5 ? &opcode_save_ext : NULL; z_opcode_functions[INSTRUCTION_EXT + 0x01] = ver >=5 ? &opcode_restore_ext : NULL; z_opcode_functions[INSTRUCTION_EXT + 0x02] = ver >= 5 ? &opcode_log_shift : NULL; z_opcode_functions[INSTRUCTION_EXT + 0x03] = ver >= 5 ? &opcode_art_shift : NULL; z_opcode_functions[INSTRUCTION_EXT + 0x04] = ver >= 4 ? &opcode_set_font : NULL; z_opcode_functions[INSTRUCTION_EXT + 0x05] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x06] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x07] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x08] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x09] = ver >= 5 ? &opcode_save_undo : NULL; z_opcode_functions[INSTRUCTION_EXT + 0x0a] = ver >= 5 ? &opcode_restore_undo : NULL; z_opcode_functions[INSTRUCTION_EXT + 0x0b] = ver >= 5 ? &opcode_print_unicode : NULL; z_opcode_functions[INSTRUCTION_EXT + 0x0c] = ver >= 5 ? &opcode_check_unicode : NULL; z_opcode_functions[INSTRUCTION_EXT + 0x0d] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x0e] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x0f] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x0f] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x10] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x11] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x12] = opcode_push_user_stack; z_opcode_functions[INSTRUCTION_EXT + 0x13] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x14] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x15] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x16] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x17] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x18] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x19] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x1a] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x1b] = NULL; z_opcode_functions[INSTRUCTION_EXT + 0x1c] = NULL; } #endif // zpu_c_INCLUDED libfizmo-0.7.15/src/interpreter/zscii.h0000644000175000017500000000471313153330674020223 0ustar chrenderchrender /* zscii.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef zscii_h_INCLUDED #define zscii_h_INCLUDED #define ZSCII_NULL 0 #define ZSCII_DELETE 8 #define ZSCII_TAB 9 #define ZSCII_SENTENCE_SPACE 11 #define ZSCII_NEWLINE 13 #define ZSCII_ESCAPE 27 #define ZSCII_CURSOR_UP 129 #define ZSCII_CURSOR_DOWN 130 #define ZSCII_CURSOR_LEFT 131 #define ZSCII_CURSOR_RIGHT 132 #define ZSCII_F1 133 #define ZSCII_F2 134 #define ZSCII_F3 135 #define ZSCII_F4 136 #define ZSCII_F5 137 #define ZSCII_F6 138 #define ZSCII_F7 139 #define ZSCII_F8 140 #define ZSCII_F9 141 #define ZSCII_F10 142 #define ZSCII_F11 143 #define ZSCII_F12 144 #define ZSCII_KEYPAD_0 145 #define ZSCII_KEYPAD_1 146 #define ZSCII_KEYPAD_2 147 #define ZSCII_KEYPAD_3 148 #define ZSCII_KEYPAD_4 149 #define ZSCII_KEYPAD_5 150 #define ZSCII_KEYPAD_6 151 #define ZSCII_KEYPAD_7 152 #define ZSCII_KEYPAD_8 153 #define ZSCII_KEYPAD_9 154 #endif /* zscii_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/fizmo.c0000644000175000017500000011420513153330674020217 0ustar chrenderchrender /* fizmo.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef fizmo_c_INCLUDED #define fizmo_c_INCLUDED #include #include #include #include //#include #include #include #include "fizmo.h" #include "zpu.h" #include "text.h" #include "mathemat.h" #include "stack.h" #include "misc.h" #include "streams.h" #include "config.h" #include "savegame.h" #include "output.h" #include "iff.h" #include "filelist.h" #include "routine.h" #include "variable.h" #include "undo.h" #include "blorb.h" #include "hyphenation.h" #include "undo.h" #include "../tools/z_ucs.h" #include "../tools/types.h" #include "../tools/i18n.h" #include "../tools/tracelog.h" #include "../tools/filesys.h" #include "../tools/unused.h" #include "../locales/libfizmo_locales.h" #ifndef DISABLE_OUTPUT_HISTORY #include "history.h" #endif // DISABLE_OUTPUT_HISTORY #ifndef DISABLE_BLOCKBUFFER #include "blockbuf.h" #endif // DISABLE_BLOCKBUFFER #ifdef ENABLE_DEBUGGER #include "debugger.h" #endif // ENABLE_DEBUGGER #define MAX_CONFIG_OPTION_LENGTH 512 struct z_story *active_z_story; struct z_screen_interface *active_interface = NULL; struct z_sound_interface *active_sound_interface = NULL; uint8_t ver = 0; uint8_t *header_extension_table; uint8_t header_extension_table_size; //static int16_t maximum_z_story_size[] // = { 128, 128, 128, 256, 256, 512, 512, 512 }; static int enable_script_after_start = 0; #ifndef DISABLE_CONFIGFILES char *fizmo_config_dir_name = NULL; char *xdg_config_home = NULL; static char *default_xdg_config_home = DEFAULT_XDG_CONFIG_HOME; static char *default_xdg_config_dirs = DEFAULT_XDG_CONFIG_DIRS; static bool fizmo_config_dir_name_initialized = false; static bool xdg_config_dir_name_initialized = false; static bool config_files_were_parsed = false; #endif // DISABLE_CONFIGFILES #ifndef DISABLE_BLOCKBUFFER /*@null@*/ BLOCKBUF *upper_window_buffer = NULL; #endif // DISABLE_BLOCKBUFFER #ifndef DISABLE_OUTPUT_HISTORY void (*paragraph_attribute_function)(int *parameter1, int *parameter2) = NULL; void (*paragraph_removal_function)(int parameter1, int parameter2) = NULL; #endif // DISABLE_OUTPUT_HISTORY // "load_z_story" returns malloc()ed z_story, may be freed using free_z_story(). static struct z_story *load_z_story(z_file *story_stream, z_file *blorb_stream) { struct z_story *result; int z_file_version; char *ptr, *ptr2; char *cwd = NULL; long len; long story_size = -1; char *absolute_directory_name; char *story_filename; uint8_t buf[30]; uint32_t val; #ifndef DISABLE_FILELIST struct z_story_list_entry *story_data; #endif result = (struct z_story*)fizmo_malloc(sizeof(struct z_story)); result->z_story_file = story_stream; // First, check if the input file is a blorb file. if (detect_simple_iff_stream(story_stream) == true) { // Check if the supplied z-code IFF file actually contains code. if ( (is_form_type(result->z_story_file, "IFRS") != true) || (find_chunk("ZCOD", result->z_story_file) == -1) ) { // The IFF file we've received is not an (Z-)executable blorb file // so there's nothing we can start. The IFF file can also not be // a savegame, since this case has already been handled in fizmo_start. i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_SUPPLIED_BLORB_FILE_PROVIDES_NO_ZCOD_CHUNK, -0x0101); } // The supplied first file is a valid .zblorb file so we can initiate // the story from it. if (read_chunk_length(result->z_story_file) == -1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_RETURNED_ERROR_CODE_P1D, -0x0101, "read_chunk_length", errno); if ((result->story_file_exec_offset = fsi->getfilepos(result->z_story_file)) == -1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_RETURNED_ERROR_CODE_P1D, -0x0101, "getfilepos", errno); story_size = get_last_chunk_length(); // Since we've got a .zblorb file, we also already know where to load // resources from. result->blorb_file = result->z_story_file; } else { // In case we don't have a .zblorb supplied as first argument, we should // have gotten some .z? file. We'll try to open it again, this time as // a regular file instead of an IFF file. if ((fsi->setfilepos(result->z_story_file, 0, SEEK_END)) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_RETURNED_ERROR_CODE_P1D, -0x0101, "setfilepos", errno); if ((story_size = fsi->getfilepos(result->z_story_file)) == -1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_RETURNED_ERROR_CODE_P1D, -0x0101, "getfilepos", errno); if ((fsi->setfilepos(result->z_story_file, 0, SEEK_SET)) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_RETURNED_ERROR_CODE_P1D, -0x0101, "setfilepos", errno); memset(buf, 0, 30); if (fsi->readchars(buf, 30, result->z_story_file) != 30) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_RETURNED_ERROR_CODE_P1D, -0x0101, "readchars", -1); val = (buf[16] << 24) | (buf[17] << 16) | (buf[18] << 8) | (buf[19]); if ( ((val & 0xbe00f0f0) != 0x3030) || (*buf < 1) || (*buf > 8) ) { i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_SUPPLIED_FILE_IS_NOT_A_VALID_Z_MACHINE_FILE, -0x0101); } result->story_file_exec_offset = 0; result->blorb_file = blorb_stream; } result->blorb_map = result->blorb_file != NULL ? active_blorb_interface->init_blorb_map(result->blorb_file) : NULL; // At this point we're sure that "input_filename" contains either the name // of a .zcode or a .zblorb file. ptr = fizmo_strdup(story_stream->filename); if ((ptr2 = strrchr(ptr, '/')) != NULL) { *ptr2 = '\0'; ptr2++; cwd = fsi->get_cwd(); fsi->ch_dir(ptr); } else { ptr2 = ptr; } absolute_directory_name = fsi->get_cwd(); TRACE_LOG("absdirname: %s.\n", absolute_directory_name); len = strlen(absolute_directory_name) + strlen(ptr2) + 2; // "absolute_file_name" may be required to locate ".SND" files. result->absolute_file_name = (char*)fizmo_malloc(len); strcpy(result->absolute_file_name, absolute_directory_name); free(absolute_directory_name); strcat(result->absolute_file_name, "/"); strcat(result->absolute_file_name, ptr2); if (cwd != NULL) fsi->ch_dir(cwd); free(cwd); free(ptr); if ((fsi->setfilepos( result->z_story_file, result->story_file_exec_offset, SEEK_SET)) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_RETURNED_ERROR_CODE_P1D, -0x0101, "setfilepos", errno); if ((z_file_version = fsi->readchar(result->z_story_file)) == EOF) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_ERROR_READING_FIRST_STORY_BYTE_FROM_P0S, -0x0102, story_stream->filename); result->version = (uint8_t)z_file_version; TRACE_LOG("Game is version %d.\n", result->version); if ((result->version < 1) || (result->version > 8)) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_UNKNOWN_STORY_VERSION_P0D, -0x0103, (long int)result->version); /* // No size check any more: Even the original Beyond Zork breaks the official // size barrier. if (story_size > (long)maximum_z_story_size[result->version-1] * 1024l) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_STORY_FILE_OF_SIZE_P0D_TOO_LARGE_ONLY_P1D_BYTES_ALLOWED, -0x0104, (long int)story_size, (long int)maximum_z_story_size[result->version-1] * 1024l); */ result->memory = (uint8_t*)fizmo_malloc((size_t)story_size); *(result->memory) = result->version; TRACE_LOG("Loading %li bytes from \"%s\".\n", story_size-1, story_stream->filename); if (fsi->readchars( result->memory+1, (size_t)(story_size - 1), result->z_story_file) != (size_t)(story_size - 1)) { story_filename = strdup(story_stream->filename); if (fsi->closefile(result->z_story_file) == EOF) (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_ERROR_WHILE_CLOSING_FILE_P0S, -0x0107, story_stream->filename); i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_ERROR_WHILE_READING_FILE_P0S, -0x0106, story_filename); free(story_filename); } result->high_memory_end = result->memory + story_size - 1; TRACE_LOG("High memory end: %x.\n", result->high_memory_end - result->memory); //result->memory[0x1e] = 1; //result->memory[0x1f] = 2; result->static_memory = result->memory + load_word(result->memory + 0xe); result->dynamic_memory_end = result->static_memory - 1; TRACE_LOG("Dynamic memory end: %x\n", result->dynamic_memory_end - result->memory); result->static_memory_end = result->memory + (story_size > 0xffff ? 0xffff : story_size); TRACE_LOG("Static memory end: %x\n", result->static_memory_end - result->memory); result->high_memory = result->memory + load_word(result->memory + 0x4); TRACE_LOG("High memory: %x\n", result->high_memory - result->memory); result->global_variables = result->memory + load_word(result->memory + 0xc); if (result->version >= 6) { result->routine_offset= 8 * load_word(result->memory + 0x28); result->string_offset = 8 * load_word(result->memory + 0x2a); } else { result->routine_offset= 0; result->string_offset = 0; } result->abbreviations_table = result->memory + load_word(result->memory+0x18); result->property_defaults = result->memory + load_word(result->memory+0xa)-2; if (result->version <= 3) { result->object_size = 9; result->object_tree = result->memory + load_word(result->memory + 0xa) + 31*2 - result->object_size; result->maximum_object_number = 255; result->maximum_property_number = 31; result->maximum_attribute_number = 31; result->object_node_number_index = 4; result->object_property_index = 7; } else { result->object_size = 14; result->object_tree = result->memory + load_word(result->memory + 0xa) + 63*2 - result->object_size; result->maximum_object_number = 65535; result->maximum_property_number = 63; result->maximum_attribute_number = 48; result->object_node_number_index = 6; result->object_property_index = 12; } if (result->version == 1) result->alphabet_table = alphabet_table_v1; else if ((result->version >= 5) && (load_word(result->memory + 0x34) != 0)) result->alphabet_table = result->memory + load_word(result->memory + 0x34); else result->alphabet_table = alphabet_table_after_v1; result->dictionary_table = result->memory + load_word(result->memory+0x8); // 8.2.1: In Versions 1 and 2, all games are "score games". In Version 3, // if bit 1 of 'Flags 1' is clear then the game is a "score game"; if it // is set, then the game is a "time game". if (result->version <= 2) { result->score_mode = SCORE_MODE_SCORE_AND_TURN; } else if (result->version == 3) { if ((result->memory[1] & 0x2) == 0) result->score_mode = SCORE_MODE_SCORE_AND_TURN; else result->score_mode = SCORE_MODE_TIME; } else result->score_mode = SCORE_MODE_UNKNOWN; if (enable_script_after_start != 0) result->memory[0x11] |= 1; result->release_code = load_word(result->memory + 0x2); memcpy(result->serial_code, result->memory+0x12, 6); result->serial_code[6] = (char)0; result->checksum = load_word(result->memory + 0x1c); header_extension_table = result->memory + load_word(result->memory + 0x36); header_extension_table_size = load_word(header_extension_table); #ifdef ENABLE_TRACING if (active_sound_interface != NULL) { TRACE_LOG("Sound interface available.\n"); } else { TRACE_LOG("No sound interface available.\n"); } #endif // ENABLE_TRACING if (result->version == 6) { if ( (active_sound_interface != NULL) //&& //(strcmp(get_configuration_value("force-8bit-sound"), "true") != 0) ) result->memory[1] |= 0x20; } else if ( ( (active_sound_interface == NULL) //|| //(strcmp(get_configuration_value("force-8bit-sound"), "true") == 0) ) && (result->version >= 5) ) result->memory[0x11] &= 0x7f; // No mouse currently implemented. result->memory[0x11] &= 0xdf; TRACE_LOG("flags2: %x.\n", result->memory[0x11]); if (result->version >= 6) result->max_nof_color_pairs = 11 * 11; // (2 to 12) ^2 else if (result->version == 5) result->max_nof_color_pairs = 8 * 8; // (2 to 9) ^2 else result->max_nof_color_pairs = 0; #ifndef DISABLE_FILELIST detect_and_add_single_z_file( story_stream->filename, blorb_stream != NULL ? blorb_stream->filename : NULL); if ((story_data = get_z_story_entry_from_list( result->serial_code, result->release_code, result->checksum)) != NULL) { if ( (result->blorb_file == NULL) && (story_data->blorbfile != NULL) && (strlen(story_data->blorbfile) != 0) ) { TRACE_LOG("Load blorb: %s\n", story_data->blorbfile); if ((result->blorb_file = open_simple_iff_file( story_data->blorbfile, IFF_MODE_READ)) != NULL) result->blorb_map = active_blorb_interface->init_blorb_map(result->blorb_file); } result->title = fizmo_strdup(story_data->title); if (story_data->language != NULL) set_configuration_value("locale", story_data->language); free_z_story_list_entry(story_data); } else { result->title = NULL; } #else result->title = NULL; #endif return result; } static void free_z_story(struct z_story *story) { free(story->memory); if (story->title != NULL) free(story->title); if (story->blorb_map != NULL) active_blorb_interface->free_blorb_map(story->blorb_map); if (story->blorb_file != NULL) fsi->closefile(story->blorb_file); free(story->absolute_file_name); free(story); } /* struct z_story_blorb_image *get_image_blorb_index(struct z_story *story, int resource_number) { int i; if ( (resource_number < 0) || (resource_number > story->nof_images) ) return NULL; for (i=0; inof_images; i++) if (story->blorb_images[i].resource_number == resource_number) return &story->blorb_images[i]; return NULL; } struct z_story_blorb_sound *get_sound_blorb_index(struct z_story *story, int resource_number) { int i; for (i=0; inof_sounds; i++) if (story->blorb_sounds[i].resource_number == resource_number) return &story->blorb_sounds[i]; return NULL; } */ int close_interface(z_ucs /*@null@*/ *error_message) { int return_code; if (active_interface != NULL) { return_code = active_interface->close_interface(error_message); active_interface = NULL; } else return_code = 0; /*@-globstate@*/ return return_code; /*@+globstate@*/ } void *fizmo_malloc(size_t size) { void *result; if ((result = malloc(size)) == NULL) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_MALLOC_P0D_RETURNED_NULL_PROBABLY_OUT_OF_MEMORY, -1, size); return result; } void *fizmo_realloc(void *ptr, size_t size) { void *result; if ((result = realloc(ptr, size)) == NULL) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_REALLOC_P0D_RETURNED_NULL_PROBABLY_OUT_OF_MEMORY, -1, size); return result; } char *fizmo_strdup(char *s1) { void *result; if ((result = strdup(s1)) == NULL) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_MALLOC_P0D_RETURNED_NULL_PROBABLY_OUT_OF_MEMORY, -1, strlen(s1)); return result; } int ensure_mem_size(char **ptr, int *current_size, int size) { if (size > *current_size) { if ((*ptr = fizmo_realloc(*ptr, size)) == NULL) return -1; *current_size = size; } return 0; } #ifndef DISABLE_CONFIGFILES char *get_xdg_config_dir_name() { char *config_dir_used, *home_dir; if (xdg_config_dir_name_initialized == true) return xdg_config_home; config_dir_used = getenv("XDG_CONFIG_HOME"); if ( (config_dir_used == NULL) || (strlen(config_dir_used) == 0) ) config_dir_used = default_xdg_config_home; // In case we don't have an absolute path here, resolve using home // directory. if (*config_dir_used != '/') { if ((home_dir = get_user_homedir()) == NULL) return NULL; xdg_config_home = (char*)fizmo_malloc( strlen(home_dir) + strlen(config_dir_used) + 2); sprintf(xdg_config_home, "%s/%s", home_dir, config_dir_used); } else { xdg_config_home = fizmo_strdup(config_dir_used); } xdg_config_dir_name_initialized = true; return xdg_config_home; } #endif // DISABLE_CONFIGFILES #ifndef DISABLE_CONFIGFILES char *get_fizmo_config_dir_name() { char *config_dir_used = NULL; if (bool_equal(fizmo_config_dir_name_initialized, false)) { config_dir_used = get_xdg_config_dir_name(); fizmo_config_dir_name = (char*)fizmo_malloc( strlen(config_dir_used) + strlen(FIZMO_CONFIG_DIR_NAME) + 2); sprintf(fizmo_config_dir_name, "%s/%s", config_dir_used, FIZMO_CONFIG_DIR_NAME); } fizmo_config_dir_name_initialized = true; return fizmo_config_dir_name; } #endif // DISABLE_CONFIGFILES #ifndef DISABLE_CONFIGFILES void ensure_dot_fizmo_dir_exists() { char *dir_name = get_fizmo_config_dir_name(); char *xdg_config_dir_name; z_dir *dir; // XDG guide says: If, when attempting to write a file, the destination // directory is non-existant an attempt should be made to create it with // permission 0700. if (dir_name == NULL) return; if ((dir = fsi->open_dir(dir_name)) != NULL) { fsi->close_dir(dir); return; } xdg_config_dir_name = get_xdg_config_dir_name(); if ((dir = fsi->open_dir(xdg_config_dir_name)) == NULL) { if (fsi->make_dir(xdg_config_dir_name) == -1) return; } else fsi->close_dir(dir); fsi->make_dir(dir_name); } #endif // DISABLE_CONFIGFILES void fizmo_new_screen_size(uint16_t width, uint16_t height) { if (!z_mem) { /* This shouldn't be called before z_mem is allocated. However, the startup sequence is complicated and I want to be extra careful. */ return; } #ifndef DISABLE_BLOCKBUFFER if ( (ver >= 3) && (upper_window_buffer != NULL) && (upper_window_buffer->height > 0) ) blockbuf_resize( upper_window_buffer, (int)width, upper_window_buffer->height); #endif // DISABLE_BLOCKBUFFER if (ver >= 4) { TRACE_LOG("Writing %d to $20, %d to $21.\n", height, width); z_mem[0x20] = (height > 255 ? 255 : height); z_mem[0x21] = (width > 255 ? 255 : width); } if (ver >= 5) { // 8.4.3: In Version 5 and later, the screen's width and height in // units should be written to the words at $22 and $24. TRACE_LOG("Writing %d to $22, %d to $24.\n", width, height); z_mem[0x22] = width >> 8; z_mem[0x23] = width & 0xff; z_mem[0x24] = height >> 8; z_mem[0x25] = height & 0xff; } } void write_interpreter_info_into_header() { uint16_t width, height; if (active_interface == NULL || z_mem == NULL) return; TRACE_LOG("Linking interface \"%s\" to active story.\n", active_interface->get_interface_name()); // Write status line informiation to the header if (ver <= 3) { // In Versions 1 to 3, a status line should be printed by the // interpreter, as follows. In Version 3, it must set bit 4 of // 'Flags 1' in the header if it is unable to produce a status line. if (active_interface->is_status_line_available() == true) { TRACE_LOG("Status line is availiable.\n"); z_mem[1] |= 0x10; } else { TRACE_LOG("Status line is not availiable.\n"); z_mem[1] &= (0xff & ~0x10); } if (active_interface->is_split_screen_available() == true) z_mem[1] |= 0x20; if (active_interface->is_variable_pitch_font_default() == true) z_mem[1] |= 0x40; if (strcmp(get_configuration_value("set-tandy-flag"), "true") == 0) z_mem[1] |= 0x08; } if (ver >= 4) { z_mem[0x1e] = FIZMO_INTERPRETER_NUMBER; z_mem[0x1f] = FIZMO_INTERPRETER_REVISION if (active_interface->is_bold_face_available() == true) { TRACE_LOG("Boldface is available.\n"); z_mem[1] |= 0x04; } else { TRACE_LOG("Boldface is not available.\n"); z_mem[1] &= (0xff & ~0x04); } if (active_interface->is_italic_available() == true) z_mem[1] |= 0x08; if (active_interface->is_fixed_space_font_available() == true) z_mem[1] |= 0x10; // Write information about timed input if (active_interface->is_timed_keyboard_input_available() == true) z_mem[1] |= 0x80; width = active_interface->get_screen_width_in_characters(); height = active_interface->get_screen_height_in_lines(); fizmo_new_screen_size(width, height); if (ver >= 5) { // Write color information into the header if (active_interface->is_colour_available() == true) z_mem[1] |= 0x1; // picture support / character font support for beyond zork if (active_interface->is_character_graphics_font_availiable() == false) z_mem[0x11] &= 0xf7; upper_window_foreground_colour = default_foreground_colour; upper_window_background_colour = default_background_colour; lower_window_foreground_colour = default_foreground_colour; lower_window_background_colour = default_background_colour; z_mem[0x2c] = (uint8_t)default_background_colour; z_mem[0x2d] = (uint8_t)default_foreground_colour; z_mem[0x26] = 1; z_mem[0x27] = 1; if (ver >= 6) { if (active_interface->is_picture_displaying_available() == true) z_mem[1] |= 0x2; } } } z_mem[0x32] = OBEYS_SPEC_MAJOR_REVISION_NUMER; z_mem[0x33] = OBEYS_SPEC_MINOR_REVISION_NUMER; } int fizmo_register_screen_interface(struct z_screen_interface *screen_interface) //, z_colour screen_default_foreground_color, //z_colour screen_default_background_color) { z_colour default_colour; if (active_interface != NULL) return -1; default_colour = screen_interface->get_default_foreground_colour(); if (is_regular_z_colour(default_colour) == false) return -2; default_foreground_colour = default_colour; if (set_configuration_value("foreground-color", z_colour_names[default_foreground_colour]) != 0) return -3; default_colour = screen_interface->get_default_background_colour(); if (is_regular_z_colour(default_colour) == false) return -4; default_background_colour = default_colour; if (set_configuration_value("background-color", z_colour_names[default_background_colour]) != 0) return -5; active_interface = screen_interface; register_i18n_stream_output_function(streams_z_ucs_output); register_i18n_abort_function(abort_interpreter); return 0; } void fizmo_register_sound_interface( struct z_sound_interface *sound_interface) { TRACE_LOG("Registered sound interface at %p.\n", sound_interface); active_sound_interface = sound_interface; } void fizmo_register_blorb_interface( struct z_blorb_interface *blorb_interface) { TRACE_LOG("Registered blorb interface at %p.\n", blorb_interface); active_blorb_interface = blorb_interface; } #ifndef DISABLE_CONFIGFILES static int parse_fizmo_config_file(char *filename) { char key[MAX_CONFIG_OPTION_LENGTH]; char value[MAX_CONFIG_OPTION_LENGTH]; int c, i; z_file *config_file; TRACE_LOG("Parsing config file \"%s\".\n", filename); if ((config_file = fsi->openfile(filename, FILETYPE_DATA, FILEACCESS_READ)) == NULL) return 0; while ((c = fsi->readchar(config_file)) != EOF) { i = 0; while ( (c != '=') && (c != '\n') && (c != EOF) ) { if ( (i < MAX_CONFIG_OPTION_LENGTH - 1) && ( ! ((i == 0) && (c == ' '))) ) key[i++] = (char)c; c = fsi->readchar(config_file); } if ( (c == '=') || (c == '\n') ) { while ( (i > 0) && (key[i-1] == ' ') ) i--; key[i] = '\0'; i = 0; if (c == '=') { do c = fsi->readchar(config_file); while (c == ' '); while ( (c != '\n') && (c != EOF) && (i < MAX_CONFIG_OPTION_LENGTH-1) ) { value[i++] = (char)c; c = fsi->readchar(config_file); } while ( (i > 0) && (value[i-1] == ' ') ) i--; } if (c == '\n') { value[i] = '\0'; if ( (key[0] != 0) && (key[0] != '#') ) { TRACE_LOG("Incoming config key: \"%s\".\n", key); // Don't set and overwrite path, append instead. if ( (strcmp(key, "z-code-path") == 0) || (strcmp(key, "z-code-root-path") == 0) ) { append_path_value(key, value); } else { set_configuration_value(key, value); } } } } } fsi->closefile(config_file); return 0; } #endif // DISABLE_CONFIGFILES #ifndef DISABLE_CONFIGFILES int parse_fizmo_config_files() { char *config_dirs, *dir; char *string_to_split, *split_index; char *filename = NULL; int filename_size = 0; if (bool_equal(config_files_were_parsed, true)) return 0; parse_fizmo_config_file(SYSTEM_FIZMO_CONF_FILE_NAME); config_dirs = getenv("XDG_CONFIG_DIRS"); if ( (config_dirs == NULL) || (strlen(config_dirs) == 0) ) config_dirs = default_xdg_config_dirs; string_to_split = fizmo_strdup(config_dirs); for(;;) { split_index = strrchr(string_to_split, ':'); if (split_index == NULL) dir = string_to_split; else { *split_index = '\0'; dir = split_index + 1; } ensure_mem_size(&filename, &filename_size, strlen(dir) + strlen(FIZMO_CONFIG_DIR_NAME) + strlen(FIZMO_CONFIG_FILE_NAME) + 3); sprintf(filename, "%s/%s/%s", dir, FIZMO_CONFIG_DIR_NAME, FIZMO_CONFIG_FILE_NAME); parse_fizmo_config_file(filename); if (split_index == NULL) break; } dir = get_fizmo_config_dir_name(); if (dir != NULL) { ensure_mem_size(&filename, &filename_size, strlen(dir) + strlen(FIZMO_CONFIG_FILE_NAME) + 2); sprintf(filename, "%s/%s", dir, FIZMO_CONFIG_FILE_NAME); parse_fizmo_config_file(filename); } config_files_were_parsed = true; if (filename != NULL) free(filename); return 0; } #endif // DISABLE_CONFIGFILES // This will quote all newlines, TABs and backslashes which must not appear // in a config-file. Returns a new malloced string which should be freed after // use. char *quote_special_chars(char *s) { char *ptr, *result; size_t len; if (s == NULL) return NULL; len = strlen(s) + 1; ptr = s; while (*ptr != '\0') { if ( (*ptr == '\n') || (*ptr == '\t') || (*ptr == '\\') ) len++; ptr++; } result = (char*)fizmo_malloc(len); ptr = result; while (*s != '\0') { if (*s == '\n') { *ptr = '\\'; ptr++; *ptr = 'n'; } else if (*s == '\t') { *ptr = '\\'; ptr++; *ptr = 't'; } else if (*s == '\\') { *ptr = '\\'; ptr++; *ptr = '\\'; } else { *ptr = *s; } s++; ptr++; } *ptr = '\0'; return result; } char *unquote_special_chars(char *s) { char *ptr, *result; size_t len; if (s == NULL) return NULL; len = strlen(s) + 1; ptr = s; while (*ptr != '\0') { if (*ptr == '\\') { ptr++; if ( (*ptr == 'n') || (*ptr == 't') || (*ptr = '\\') ) len--; else fprintf(stderr, "Invalid input: \"\\%c\".", *s); } ptr++; } result = (char*)fizmo_malloc(len); ptr = result; while (*s != '\0') { if (*s == '\\') { s++; if (*s == 'n') *ptr = '\n'; else if (*s == 't') *ptr = '\t'; else if (*s== '\\') *ptr = '\\'; } else *ptr = *s; ptr++; s++; } *ptr = 0; return result; } #ifndef DISABLE_OUTPUT_HISTORY void fizmo_register_paragraph_attribute_function( void (*new_paragraph_attribute_function)(int *parameter1, int *parameter2)) { paragraph_attribute_function = new_paragraph_attribute_function; } void fizmo_register_paragraph_removal_function( void (*new_paragraph_removal_function)(int parameter1, int parameter2)) { paragraph_removal_function = new_paragraph_removal_function; } #endif // DISABLE_OUTPUT_HISTORY void fizmo_start(z_file* story_stream, z_file *blorb_stream, z_file *restore_on_start_file) { char *value; bool evaluate_result; uint8_t flags2; int val; char *str, *default_savegame_filename = DEFAULT_SAVEGAME_FILENAME; if (active_interface == NULL) { TRACE_LOG("No active interface."); return; } init_config_default_values(); register_i18n_stream_output_function( streams_z_ucs_output); register_i18n_abort_function( abort_interpreter); #ifndef DISABLE_CONFIGFILES ensure_dot_fizmo_dir_exists(); #endif // DISABLE_CONFIGFILES if ((str = getenv("ZCODE_PATH")) == NULL) str = getenv("INFOCOM_PATH"); if (str != NULL) append_path_value("z-code-path", str); if ((str = getenv("ZCODE_ROOT_PATH")) != NULL) append_path_value("z-code-root-path", str); #ifndef DISABLE_CONFIGFILES parse_fizmo_config_files(); #endif // DISABLE_CONFIGFILES if (get_configuration_value("random-mode") == NULL) set_configuration_value("random-mode", "random"); //set_configuration_value("disable-external-streams", "true"); open_streams(); init_signal_handlers(); active_z_story = load_z_story(story_stream, blorb_stream); if ( (active_z_story->release_code == 2) && (strcmp(active_z_story->serial_code, "AS000C") == 0) ) skip_active_routines_stack_check_warning = true; z_mem = active_z_story->memory; TRACE_LOG("Z-Mem at %p.\n", z_mem); ver = active_z_story->version; #ifdef ENABLE_DEBUGGER debugger_story_has_been_loaded(); #endif // ENABLE_DEBUGGER init_opcode_functions(); if ((str = get_configuration_value("savegame-default-filename")) != NULL) default_savegame_filename = str; val = DEFAULT_MAX_UNDO_STEPS; if ((str = get_configuration_value("max-undo-steps")) != NULL) val = atoi(str); set_max_undo_steps(val); init_streams(default_savegame_filename); (void)latin1_string_to_zucs_string( last_savegame_filename, default_savegame_filename, MAXIMUM_SAVEGAME_NAME_LENGTH + 1); TRACE_LOG("Converted savegame default filename: '"); TRACE_LOG_Z_UCS(last_savegame_filename); TRACE_LOG("'.\n"); current_foreground_colour = default_foreground_colour; current_background_colour = default_background_colour; /* active_interface->set_colour( default_foreground_colour, default_background_colour, -1); */ active_interface->link_interface_to_story(active_z_story); TRACE_LOG("sound-strcmp: %d.\n", strcmp(get_configuration_value("disable-sound"), "true")); if ( (active_sound_interface != NULL) && (strcmp(get_configuration_value("disable-sound"), "true") != 0) ) { TRACE_LOG("Activating sound.\n"); active_sound_interface->init_sound(); } write_interpreter_info_into_header(); // REVISIT: Implement general initalization for restore / restart etc. active_window_number = 0; current_font = Z_FONT_NORMAL; #ifndef DISABLE_BLOCKBUFFER if (ver >= 3) upper_window_buffer = create_blockbuffer( Z_STYLE_ROMAN, Z_FONT_NORMAL, current_foreground_colour, current_background_colour); #endif // DISABLE_BLOCKBUFFER #ifndef DISABLE_OUTPUT_HISTORY outputhistory[0] = create_outputhistory( 0, Z_HISTORY_MAXIMUM_SIZE, Z_HISTORY_INCREMENT_SIZE, default_foreground_colour, default_background_colour, Z_FONT_NORMAL, Z_STYLE_ROMAN); #endif /* DISABLE_OUTPUT_HISTORY */ terminate_interpreter = INTERPRETER_QUIT_NONE; if ( (ver <= 8) && (ver != 6) ) { while (terminate_interpreter == INTERPRETER_QUIT_NONE) { if (restore_on_start_file != NULL && active_interface->restore_autosave) { /* Use the interface's restore routine. */ int res = active_interface->restore_autosave(restore_on_start_file); restore_on_start_file = NULL; if (res) interpret_resume(); else interpret_from_address(load_word(z_mem + 0x6)); } else if (restore_on_start_file != NULL) { value = get_configuration_value( "restore-after-save-and-quit-file-before-read"); if ( (value != NULL) && (strcmp(value, "true") == 0) ) evaluate_result = false; else evaluate_result = true; if (restore_game_from_stream( 0, (uint16_t)(active_z_story->dynamic_memory_end - z_mem + 1), restore_on_start_file, evaluate_result) == 2) { //TRACE_LOG("Redrawing screen from history.\n"); //active_interface->game_was_restored_and_history_modified(); interpret_resume(); } restore_on_start_file = NULL; } else interpret_from_address(load_word(z_mem + 0x6)); if (terminate_interpreter == INTERPRETER_QUIT_RESTART) { TRACE_LOG("Initiating restart.\n"); // Restart the game. (Any "Are you sure?" question must be asked by the // game, not the interpreter.) The only pieces of information surviving // from the previous state are the "transcribing to printer" bit (bit 0 // of 'Flags 2' in the header, at address $10) and the "use fixed pitch // font" bit (bit 1 of 'Flags 2'). flags2 = z_mem[0x11] & 0x3; drop_z_stack_words(z_stack_index - z_stack); number_of_stack_frames = 0; stack_words_from_active_routine = 0; number_of_locals_active = 0; store_first_stack_frame(true, 0, 0, 0); if ((fsi->setfilepos( active_z_story->z_story_file, active_z_story->story_file_exec_offset, SEEK_SET)) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_RETURNED_ERROR_CODE_P1D, -0x0101, "setfilepos", errno); TRACE_LOG("Loading %ld bytes.\n", (long int)(active_z_story->high_memory_end + 1 - z_mem)); if (fsi->readchars( z_mem, (size_t)(active_z_story->high_memory_end + 1 - z_mem), active_z_story->z_story_file) != (size_t)(active_z_story->high_memory_end + 1 - z_mem)) { i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FATAL_ERROR_READING_STORY_FILE, -1); } active_interface->reset_interface(); write_interpreter_info_into_header(); z_mem[0x11] &= 0xfc; z_mem[0x11] |= flags2; terminate_interpreter = INTERPRETER_QUIT_NONE; } } } else i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_NOT_YET_IMPLEMENTED, -0x010d); #ifdef ENABLE_DEBUGGER debugger_interpreter_stopped(); #endif // ENABLE_DEBUGGER if (active_sound_interface != NULL) active_sound_interface->close_sound(); // Close all streams, this will also close the active interface. close_streams(NULL); free_undo_memory(); free_hyphenation_memory(); free_i18n_memory(); #ifndef DISABLE_BLOCKBUFFER if (upper_window_buffer != NULL) destroy_blockbuffer(upper_window_buffer); upper_window_buffer = NULL; #endif // DISABLE_BLOCKBUFFER #ifndef DISABLE_OUTPUT_HISTORY destroy_outputhistory(outputhistory[0]); #endif // DISABLE_OUTPUT_HISTORY free_z_story(active_z_story); active_z_story = NULL; z_mem = NULL; #ifndef DISABLE_CONFIGFILES if (xdg_config_home != NULL) { free(xdg_config_home); xdg_config_home = NULL; } if (fizmo_config_dir_name != NULL) { free(fizmo_config_dir_name); fizmo_config_dir_name = NULL; } #endif // DISABLE_CONFIGFILES } #endif /* fizmo_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/stack.c0000644000175000017500000002611513153330674020202 0ustar chrenderchrender /* stack.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef stack_c_INCLUDED #define stack_c_INCLUDED #include #include #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "stack.h" #include "config.h" #include "routine.h" #include "variable.h" #include "fizmo.h" #include "../locales/libfizmo_locales.h" size_t current_z_stack_size = 0; /*@null@*/ /*@owned@*/ uint16_t *z_stack = NULL; /*@null@*/ /*@dependent@*/ uint16_t *z_stack_index = NULL; /*@null@*/ /*@dependent@*/ uint16_t *behind_z_stack = NULL; int stack_words_from_active_routine = 0; // This function is called by the z_stack_push_word function and the // "allocate_z_stack_words" function in case the capacity of the // current stack is too small to hold additional data. This function // will enlarge the current stack by a number of uint16_t words given // in the "added_capacity" parameter. static void resize_z_stack(int32_t added_capacity) { int index_position; size_t offset; if (added_capacity == 0) return; TRACE_LOG("Enlarging stack capacity by %d entries.\n", (int)added_capacity); // We'll have to remember the count of elements currently on the stack. // This is required since a call to realloc might move the stack to // some other place in memory. Keeping the current index number in mind // will allow us to create a corrent pointer to a possibly new location. index_position = z_stack_index - z_stack; TRACE_LOG("current stack size: %d.\n", current_z_stack_size); current_z_stack_size += added_capacity; offset = local_variable_storage_index - z_stack; TRACE_LOG("z_stack: %p, z_stack_index: %p, behind_z_stack: %p.\n", z_stack, z_stack_index, behind_z_stack); // Initially, z_stack is NULL. If realloc() is called with a pointer to // null it works like malloc() which suits just fine. z_stack = (uint16_t*)fizmo_realloc( z_stack, current_z_stack_size * sizeof(uint16_t)); behind_z_stack = z_stack + current_z_stack_size; local_variable_storage_index = z_stack + offset; if ((z_stack_index = z_stack + index_position) >= behind_z_stack) { // In case the stack has been shrunk the index may have to be re-adjusted. z_stack_index = behind_z_stack - 1; } TRACE_LOG("Z-Stack now at %p (element behind: %p, z_stack_index: %p).\n", z_stack, behind_z_stack, z_stack_index); TRACE_LOG("new stack size: %d.\n", current_z_stack_size); } // This function will push the given 16-bit-word on the Z-Stack. In case the // current stack is too small, it is enlarged by the size of the constant // Z_STACK_INCREMENT_SIZE which is defined in config.h void z_stack_push_word(uint16_t data) { TRACE_LOG("Pushing %x on stack.\n", data); TRACE_LOG("Stack pointer before operation: %ld.\n", (long int)(z_stack_index - z_stack)); if (z_stack_index == behind_z_stack) resize_z_stack(Z_STACK_INCREMENT_SIZE); *(z_stack_index++) = data; TRACE_LOG("Stack pointer after operation: %ld.\n", (long int)(z_stack_index - z_stack)); } // The "z_stack_pull_word" function will return the current topmost word // from the stack. In case the stack is empty, it will quit via a call to // "i18n_translate_and_exit". uint16_t z_stack_pull_word() { uint16_t result; if (z_stack_index == z_stack) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_CANNOT_PULL_FROM_EMPTY_STACK, -1); TRACE_LOG("Pulling %x from stack.\n", *(z_stack_index-1)); TRACE_LOG("Stack pointer before operation: %ld.\n", (long int)(z_stack_index - z_stack)); result = *(--z_stack_index); TRACE_LOG("Stack pointer after operation: %ld.\n", (long int)(z_stack_index - z_stack)); return result; } // The "z_stack_peek_word" function will return the topmost stack entry // without altering the stack contents. In case the stack is empty, it // will quit via a call to "i18n_translate_and_exit". uint16_t z_stack_peek_word() { if (z_stack_index == z_stack) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_CANNOT_PULL_FROM_EMPTY_STACK, -1); return *(z_stack_index - 1); } // This function is used by the restart-opcode and the save-game // functionality. It simply decreases the stack by a number of words // given in the "word_counter" and calls the "i18n_translate_and_exit" // function in case there are not enough words on the stack. void drop_z_stack_words(int word_counter) { if (z_stack_index - z_stack < word_counter) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_CANNOT_DROP_P0D_WORDS_FROM_STACK_NOT_ENOUGH_WORDS_STORED, -1, (long int)word_counter); z_stack_index -= word_counter; } // This function is used when a new routine is started and space should // be reserved for new locals. It returns a pointer to the reserved // space on the stack. /*@dependent@*/ uint16_t *allocate_z_stack_words(uint32_t word_counter) { uint16_t *result; TRACE_LOG("Allocating %d stack words.\n", word_counter); while (z_stack_index + word_counter >= behind_z_stack) { TRACE_LOG("Space on stack: %d.\n", behind_z_stack - z_stack_index); resize_z_stack(Z_STACK_INCREMENT_SIZE); } TRACE_LOG("Space on stack: %d.\n", behind_z_stack - z_stack_index); // z_stack_index can't be null, if it was the resize_z_stac would have // quit, so -nullpass and -nullret are okay. /*@-nullpass@*/ result = z_stack_index; /*@+nullpass@*/ z_stack_index += word_counter; /*@-nullret@*/ return result; /*@+nullret@*/ } /*@only@*/ struct z_stack_container *create_new_stack() { struct z_stack_container *current_z_stack_data; current_z_stack_data = (struct z_stack_container*)fizmo_malloc( sizeof(struct z_stack_container)); current_z_stack_data->current_z_stack_size = current_z_stack_size; current_z_stack_data->z_stack = z_stack; current_z_stack_data->z_stack_index = z_stack_index; current_z_stack_data->behind_z_stack = behind_z_stack; current_z_stack_data->stack_words_from_active_routine = stack_words_from_active_routine; current_z_stack_size = 0; z_stack = NULL; z_stack_index = NULL; behind_z_stack = NULL; stack_words_from_active_routine = 0; return current_z_stack_data; } void delete_stack_container(struct z_stack_container *stack_data) { if (stack_data == NULL) return; if (stack_data->z_stack != NULL) free(stack_data->z_stack); free(stack_data); } void restore_old_stack(/*@only@*/ struct z_stack_container *old_z_stack_data) { free(z_stack); current_z_stack_size = old_z_stack_data->current_z_stack_size; z_stack = old_z_stack_data->z_stack; z_stack_index = old_z_stack_data->z_stack_index; behind_z_stack = old_z_stack_data->behind_z_stack; stack_words_from_active_routine = old_z_stack_data->stack_words_from_active_routine; free(old_z_stack_data); } /* void store_first_stack_frame(bool discard_result, uint8_t nof_arguments_supplied, uint32_t return_pc, uint8_t result_var_number) { memset((uint8_t*)allocate_z_stack_words(4), 0, 8); number_of_stack_frames++; } */ void store_first_stack_frame() { memset((uint8_t*)allocate_z_stack_words(4), 0, 8); number_of_stack_frames++; } // It's not possible to use a stack in the quetzal format in memory // directly since we cannot back-step a step-frame without knowing // how much stack/variable-space was used by the last routine. Thus, // the following stack format is used: // -------------------------------------------------- // localvar0 ( <- *local_variable_storage_index before call) // ... // localvarn // stackword0 // ... // stackwordn // (routine call, new stack frame starts) // word1: bits 0-3 : number of local variables in use by last routine // bit 4 : discard result // bits 8-14 : args to last function call, quetzal-encoded // word2: bits 0-15 : number of stack words used by last routine // word3: bits 0-15 : return-PC bits 8-23 // word4: bits 8-15 : return-PC bits 0-7 // bist 0-7 : result variable number // localvar0 ( <- *local_variable_storage_index after call) // ... // localvarn // stackword0 // ... // stackwordn void store_followup_stack_frame_header(uint8_t number_of_locals, bool discard_result, uint8_t nof_arguments_supplied, uint16_t stack_words_from_routine, uint32_t return_pc, uint8_t result_var_number) { uint8_t argument_mask = 0; int i; for (i=0; i> 8) & 0xffff); z_stack_push_word( ((return_pc & 0xff) << 8) | ((bool_equal(discard_result, true) ? 0 : result_var_number) & 0xff) ); } void ensure_z_stack_size(uint32_t minimum_size) { while (current_z_stack_size < minimum_size) resize_z_stack(Z_STACK_INCREMENT_SIZE); } #ifdef ENABLE_TRACING void dump_stack_to_tracelog() { int i = 0; while (i != z_stack_index - z_stack) { TRACE_LOG("Stack-Dump [%03d]: %x\n", i, z_stack[i]); i++; } } #endif // ENABLE_TRACING #endif /* stack_c_INCLUDED */ libfizmo-0.7.15/src/interpreter/config.h0000644000175000017500000001004413153330674020341 0ustar chrenderchrender /* config.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef config_h_INCLUDED #define config_h_INCLUDED #include "../tools/types.h" #define FIZMO_CONFIG_DIR_NAME "fizmo" #define DEFAULT_XDG_CONFIG_HOME ".config" #define SYSTEM_FIZMO_CONF_FILE_NAME "/etc/fizmo.conf" #define DEFAULT_XDG_CONFIG_DIRS "/etc/xdg" #define FIZMO_CONFIG_FILE_NAME "config" #define BABEL_TIMESTAMP_FILE_NAME "babel-timestamps" #define NUMBER_OF_FILES_TO_SHOW_PROGRESS_FOR 10 #define DEFAULT_LOCALE "en_GB" #define FIZMO_COMMAND_PREFIX '/' #define Z_STACK_INCREMENT_SIZE 64 #define MAXIMUM_SAVEGAME_NAME_LENGTH 64 #define DEFAULT_SAVEGAME_FILENAME "savegame.qut" #define MAXIMUM_SCRIPT_FILE_NAME_LENGTH 64 #define DEFAULT_TRANSCRIPT_FILE_NAME "transcript.txt" #define DEFAULT_INPUT_COMMAND_FILE_NAME "input-script.txt" #define DEFAULT_RECORD_COMMAND_FILE_NAME "record.txt" #define DEFAULT_STREAM_2_LINE_WIDTH 78 // Note that some games (Aisle may be an example) format their output // (the title screen) according to the current screen width. #define DEFAULT_STREAM_2_LEFT_PADDING 1 #define DEFAULT_TRACE_FILE_NAME "tracelog.txt" #define MAXIMUM_STREAM_3_DEPTH 16 #define NUMBER_OF_REMEMBERED_COMMANDS 100 #define SYSTEM_CHARSET_ASCII 0 #define SYSTEM_CHARSET_ISO_8859_1 1 #define SYSTEM_CHARSET_UTF_8 2 // Assuming that the maximum dynamic memory of a story may be 100kb and // that we'll spare 10 Megabytes of RAM for undo purposes we can store // a maximum of 10240 undo steps. #define DEFAULT_MAX_UNDO_STEPS 10240 #define RANDOM_SEED_SIZE 32 // Ignorig this error makes "HugeCave.z8" work. #define IGNORE_TOO_LONG_PROPERTIES_ERROR 1 #define STREAM_2_PRELOAD_BUFFER_SIZE 1024 //#define THROW_SIGFAULT_ON_ERROR 1 struct configuration_option { char *name; char *value; }; #ifndef config_c_INCLUDED extern int system_charset; extern bool auto_adapt_upper_window; extern bool auto_open_upper_window; extern bool skip_active_routines_stack_check_warning; extern char config_true_value[]; extern char config_false_value[]; extern struct configuration_option configuration_options[]; extern bool foreground_color_was_changed; extern bool background_color_was_changed; #endif /* config_c_INCLUDED */ int set_configuration_value(char *key, char* new_value); int append_path_value(char *key, char *value_to_append); char *get_configuration_value(char *key); //char **get_valid_configuration_options(char *key, ...); bool is_valid_libfizmo_config_key(char *key); char *get_user_homedir(); void init_config_default_values(); #endif /* config_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/debugger.h0000644000175000017500000000373313153330674020667 0ustar chrenderchrender /* debugger.h * * This file is part of fizmo. * * Copyright (c) 2011-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef debugger_h_INCLUDED #define debugger_h_INCLUDED #include #include #define DEBUGGER_PORT 2048 #define DEBUGGER_IP_ADDRESS "127.0.0.1" void add_breakpoint(uint32_t breakpoint_pc); void debugger_story_has_been_loaded(); void do_breakpoint_actions(); void debugger(); void debugger_interpreter_stopped(); #endif /* debugger_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/cmd_hst.h0000644000175000017500000000360513153330674020522 0ustar chrenderchrender /* cmd_hst.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef cmd_hst_h_INCLUDED #define cmd_hst_h_INCLUDED #include "../tools/types.h" #include "config.h" void store_command_in_history(zscii *new_command); int get_number_of_stored_commands(); zscii *get_command_from_history(unsigned int command_index); #endif /* cmd_hst_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/table.c0000644000175000017500000001016413153330674020161 0ustar chrenderchrender /* table.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "table.h" #include "zpu.h" #include "variable.h" void opcode_scan_table(void) { // scan_table [form] uint16_t entry_size; uint16_t index; bool scan_words; bool entry_found = false; TRACE_LOG("Opcode: SCAN_TABLE.\n"); if (number_of_operands != 4) { entry_size = 2; scan_words = true; } else { entry_size = ((uint16_t)op[3]) & 0x7f; scan_words = ((op[3] & 0x80) != 0) ? true : false; } TRACE_LOG("Scanning table at %d/%d for %d in mode %d with entry size %d.\n", (uint16_t)op[1], (uint16_t)op[2], (uint16_t)op[0], scan_words, entry_size); index = op[1]; while (index < op[1] + ((uint16_t)op[2]*entry_size)) { if (bool_equal(scan_words, true)) { TRACE_LOG("Found %d at %d.\n", load_word(z_mem + index), index); if (load_word(z_mem + index) == (uint16_t)op[0]) { entry_found = true; break; } } else { if (z_mem[index] == (uint16_t)op[0]) { entry_found = true; break; } } index += entry_size; } TRACE_LOG("Scan result: %d.\n", entry_found); read_z_result_variable(); if (bool_equal(entry_found, true)) { set_variable(z_res_var, index, false); evaluate_branch(1); } else { set_variable(z_res_var, 0, false); evaluate_branch(0); } } void opcode_copy_table(void) { int size =(int16_t)op[2]; uint8_t *src, *dest, *last; TRACE_LOG("Opcode: COPY_TABLE.\n"); if (op[1] == 0) { if (size > 0) { TRACE_LOG("Zeroing first %d bytes from %ud.\n", size, op[0]); memset(z_mem + op[0], 0, size); } } else { src = z_mem + op[0]; dest = z_mem + op[1]; if ( (size < 0) || (op[0] > op[1]) ) { size = abs(size); TRACE_LOG("Forward-copying %u bytes from %u to %u.\n", size, op[0], op[1]); last = src + size - 1; while (src <= last) { //TRACE_LOG("%c from %d to %d.\n", *src, src-z_mem, dest-z_mem); *dest = *src; src++; dest++; } } else { TRACE_LOG("Backward-copying %u bytes from %u to %u.\n", size, op[0], op[1]); last = src; src += (size - 1); dest += (size - 1); while (src >= last) { //TRACE_LOG("%c from %d to %d.\n", *src, src-z_mem, dest-z_mem); *dest = *src; src--; dest--; } } } } libfizmo-0.7.15/src/interpreter/zpu.h0000644000175000017500000000671213153330674017721 0ustar chrenderchrender /* zpu.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef zpu_h_INCLUDED #define zpu_h_INCLUDED #include #define OPERAND_TYPE_LARGE_CONSTANT 0 #define OPERAND_TYPE_SMALL_CONSTANT 1 #define OPERAND_TYPE_VARIABLE 2 #define INSTRUCTION_2OP 0x00 #define INSTRUCTION_1OP 0x20 #define INSTRUCTION_0OP 0x30 #define INSTRUCTION_VAR 0x40 #define INSTRUCTION_EXT 0x60 #define INSTRUCTION_UNDEF 0xff #define INTERPRETER_QUIT_NONE 0 #define INTERPRETER_QUIT_ROUTINE 1 #define INTERPRETER_QUIT_ALL 2 #define INTERPRETER_QUIT_SAVE_BEFORE_READ 3 #define INTERPRETER_QUIT_RESTART 4 #ifndef zpu_c_INCLUDED extern uint8_t *z_mem; /*@dependent@*/ extern uint8_t *pc; extern uint16_t op[8]; extern uint8_t number_of_operands; extern uint8_t number_of_locals_from_function_call; extern uint8_t z_res_var; extern uint8_t *current_instruction_location; extern int zpu_step_number; extern uint16_t start_interrupt_routine; // Splint doesn't recognize that "terminate_interpreter" is used by routine.c. /*@-exportlocal@*/ extern int terminate_interpreter; /*@+exportlocal@*/ #endif // zpu_c_INCLUDED void parse_opcode(uint8_t *z_instr, uint8_t *z_instr_form, uint8_t *result_number_of_operands, uint8_t **instr_ptr); void interpret_from_address(uint32_t start_address); void interpret_resume(); uint16_t interpret_from_call(uint32_t routine_address); void interpret_from_call_without_result(uint32_t routine_address); void read_z_result_variable(void); uint32_t get_packed_routinecall_address(uint16_t packed_address); uint32_t get_packed_string_address(uint16_t packed_address); void evaluate_branch(uint8_t test_result); void parse_branch_bytes(void); uint16_t load_word(uint8_t *ptr); void store_word(uint8_t *dest, uint16_t data); void init_opcode_functions(void); void dump_stack(void); void dump_locals(void); #ifdef ENABLE_TRACING void dump_dynamic_memory_to_tracelog(); #endif // ENABLE_TRACING #endif // zpu_h_INCLUDED libfizmo-0.7.15/src/interpreter/variable.h0000644000175000017500000000455713153330674020675 0ustar chrenderchrender /* variable.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef variable_h_INCLUDED #define variable_h_INCLUDED #include #ifndef variable_c_INCLUDED /*@dependent@*/ extern uint16_t *local_variable_storage_index; extern uint8_t number_of_locals_active; #endif /* variable_c_INCLUDED */ void set_variable(uint8_t variable_number, uint16_t data, bool keep_stack_index); uint16_t get_variable(uint8_t variable_number, bool keep_stack_index); void opcode_pull(void); void opcode_push(void); void opcode_push_user_stack(void); void opcode_loadb(void); void opcode_loadw(void); void opcode_storew(void); void opcode_store(void); void opcode_inc(void); void opcode_storeb(void); void opcode_dec(void); void opcode_load(void); void opcode_pop(void); void opcode_check_arg_count(void); #endif /* variable_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/mathemat.h0000644000175000017500000000445313153330674020703 0ustar chrenderchrender /* mathemat.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This file was named "math.h" before but renamed to "mathemat.h" to avoid * collisions with the standard math.h include. */ #include #ifndef mathemat_h_INCLUDED #define mathemat_h_INCLUDED void opcode_and(void); void opcode_add(void); void opcode_sub(void); void opcode_je(void); void opcode_jz(void); void opcode_jg(void); void opcode_inc_chk(void); void opcode_test(void); void opcode_jl(void); void opcode_dec_chk(void); void opcode_mul(void); void opcode_random(void); void opcode_div(void); void opcode_or(void); void opcode_mod(void); void opcode_not(void); void opcode_art_shift(void); void opcode_log_shift(void); void seed_random_generator(void); #endif /* mathemat_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/mathemat.c0000644000175000017500000002636713153330674020706 0ustar chrenderchrender /* mathemat.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * * This file was named "math.h" before but renamed to "mathemat.h" to avoid * collisions with the standard math.h include. */ #ifndef mathemat_h_INCLUDED #define mathemat_h_INCLUDED #include #include #include #include // for rint (see above) #include // for [s]random on Mac OS X #include #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "math.h" #include "config.h" #include "mt19937ar.h" #include "variable.h" #include "zpu.h" #include "../locales/libfizmo_locales.h" static int16_t predictable_upper_border = 999; static int16_t last_predictable_random = 0; static unsigned uninitialized_unsigned; void opcode_and(void) { TRACE_LOG("Opcode: AND.\n"); read_z_result_variable(); TRACE_LOG("ANDing %x and %x to %x.\n", op[0], op[1], op[0] & op[1]); set_variable(z_res_var, op[0] & op[1], false); } void opcode_add(void) { TRACE_LOG("Opcode: ADD.\n"); read_z_result_variable(); TRACE_LOG("Adding %d and %d.\n", (int16_t)op[0], (int16_t)op[1]); set_variable(z_res_var, (uint16_t)(((int16_t)op[0]) + ((int16_t) op[1])), false); } void opcode_sub(void) { TRACE_LOG("Opcode: SUB.\n"); read_z_result_variable(); // (Updates / Clarifications): Opcode operands are always evaluated // from first to last -- this order is important when the stack // pointer appears as an argument. Thus "@sub sp sp" subtracts the // second-from-top stack item from the topmost stack item. TRACE_LOG("Subtracting %x from %x.\n", (int16_t)op[0], (int16_t)op[1]); set_variable(z_res_var, (uint16_t)(((int16_t)op[0]) - ((int16_t)op[1])), false); } void opcode_je(void) { uint8_t result = 0; uint8_t i; TRACE_LOG("Opcode: JE.\n"); // je can take between 2 and 4 operands. je with just 1 operand // is not permitted. if (number_of_operands == 1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_OPCODE_JE_WITH_ONLY_1_OPERAND_IS_ILLEGAL, -1); TRACE_LOG("Number of operands for JE: %d.\n", number_of_operands); for (i=1; i ((int16_t)op[1]) ? (uint8_t)1 : (uint8_t)0); } void opcode_inc_chk(void) { int16_t value; // FIXME: Is all this signed? I hope so, because JG is singed. TRACE_LOG("Opcode: INC_CHK.\n"); //Indirect variable references // In the seven opcodes that take indirect variable references // (inc, dec, inc_chk, dec_chk, load, store, pull), an indirect // reference to the stack pointer does not push or pull the top // item of the stack -- it is read or written in place. value = (int16_t)get_variable(op[0], false); TRACE_LOG("Incrementing variable with code %d from %d to %d.\n", op[0], value, value+1); value++; set_variable(op[0], (uint16_t)value, false); TRACE_LOG("Checking whether %d > %d.\n", value, (int16_t)op[1]); evaluate_branch(value > ((int16_t)op[1]) ? (uint8_t)1 : (uint8_t)0); } void opcode_test(void) { TRACE_LOG("Opcode: TEST.\n"); TRACE_LOG("Testing if %x in %x is set.\n", op[0], op[1]); evaluate_branch(((op[0] & op[1]) == op[1]) ? (uint8_t)1 : (uint8_t)0); } void opcode_jl(void) { // Jump if a < b (using a signed 16-bit comparison). TRACE_LOG("Opcode: JL.\n"); TRACE_LOG("Testing if %i is smaller than %i.\n", (int16_t)op[0], (int16_t)op[1]); evaluate_branch( (((int16_t)op[0]) < ((int16_t)op[1])) ? (uint8_t)1: (uint8_t)0); } void opcode_dec_chk(void) { int16_t value; // FIXME: Is all this signed? I hope so, because JG is singed. TRACE_LOG("Opcode: DEC_CHK.\n"); value = (int16_t)get_variable(op[0], false); TRACE_LOG("Decrementing variable with code %d from %d to %d.\n", op[0], value, value-1); value--; set_variable(op[0], (uint16_t)value, false); TRACE_LOG("Checking whether %d < %d.\n", value, (int16_t)op[1]); evaluate_branch(value < ((int16_t)op[1]) ? (uint8_t)1 : (uint8_t)0); } void opcode_mul(void) { TRACE_LOG("Opcode: MUL.\n"); read_z_result_variable(); TRACE_LOG("Multiplying %d and %d.\n", (int16_t)op[0], (int16_t)op[1]); set_variable(z_res_var, (uint16_t)(((int16_t)op[0]) * ((int16_t) op[1])), false); } void seed_random_generator(void) { unsigned long init[RANDOM_SEED_SIZE]; time_t seconds; int i; if ((seconds = time(NULL)) == (time_t)-1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_TIME_RETURNED_NEG_1, -1); srand(((unsigned)seconds) ^ uninitialized_unsigned); // Init parameters are alternately seeded with a pseudo-random value and // the uninitialzed stack memory. for (i=0; i= 1000) ) { TRACE_LOG("Result should be >= 1 and <= %d.\n", op[0]); random_number = genrand_int32(); TRACE_LOG("Random number drawn: %ld.\n", random_number); multiplier = (double)(op[0] - 1) / (double)GENRAND_INT32_MAX; // Subtract 1 from op[0] since we want to cover the range from 1 to op[0], // not 0 to op[0]. TRACE_LOG("Result: %d.\n", ((uint16_t)rint((double)random_number * multiplier)) + 1); set_variable( z_res_var, ((uint16_t)rint((double)random_number * multiplier)) + 1, false); } else { TRACE_LOG("Random generator in predictable mode.\n"); last_predictable_random++; if (last_predictable_random > predictable_upper_border) last_predictable_random = 1; TRACE_LOG("Returning random value %d\n", last_predictable_random); set_variable( z_res_var, (uint16_t)last_predictable_random, false); } } } void opcode_div(void) { TRACE_LOG("Opcode: DIV.\n"); read_z_result_variable(); if (op[1] == 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_CANNOT_DIVIDE_BY_ZERO, -1); TRACE_LOG("Dividing %d by %d.\n", (int16_t)op[0], (int16_t)op[1]); set_variable(z_res_var, (uint16_t)(((int16_t)op[0]) / ((int16_t)op[1])), false); } void opcode_or(void) { TRACE_LOG("Opcode: OR.\n"); read_z_result_variable(); TRACE_LOG("ORing %x and %x to %x.\n", op[0], op[1], op[0] | op[1]); set_variable(z_res_var, op[0] | op[1], false); } void opcode_mod(void) { TRACE_LOG("Opcode: MOD.\n"); if (op[1] == 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_CANNOT_DIVIDE_BY_ZERO, -1); read_z_result_variable(); TRACE_LOG("MODing %d and %d to %d.\n", (int16_t)op[0], (int16_t)op[1], (uint16_t)((int16_t)op[0] % (int16_t)op[1])); set_variable(z_res_var, (uint16_t)((int16_t)op[0] % (int16_t)op[1]), false); } void opcode_not(void) { TRACE_LOG("Opcode: NOT.\n"); read_z_result_variable(); TRACE_LOG("NOTing %x to %x.\n", op[0], ~op[0]); set_variable(z_res_var, ~op[0], false); } void opcode_art_shift(void) { int16_t result = (int16_t)op[0]; int16_t shift_places = (int16_t)op[1]; TRACE_LOG("Opcode: ART_SHIFT.\n"); read_z_result_variable(); /*@-shiftnegative@*/ /*@-shiftimplementation@*/ if (shift_places > 0) result <<= shift_places; else if (shift_places < 0) result >>= (-shift_places); /*@+shiftimplementation@*/ /*@+shiftnegative@*/ set_variable(z_res_var, (uint16_t)result, false); } void opcode_log_shift(void) { uint16_t result = (uint16_t)op[0]; int16_t shift_places = (int16_t)op[1]; read_z_result_variable(); if (shift_places > 0) result <<= shift_places; else if (shift_places < 0) result >>= (-shift_places); set_variable(z_res_var, result, false); } #endif /* mathemat_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/Makefile.in0000644000175000017500000005520013153330676020775 0ustar chrenderchrender# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # Makefile.am # # This file is part of fizmo. # # Copyright (c) 2009-2017 Christoph Ender. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : @ENABLE_TRACING_TRUE@am__append_1 = -DENABLE_TRACING= @FIZMO_DIST_VERSION_TRUE@am__append_2 = -DFIZMO_DIST_VERSION=\"$(FIZMO_DIST_VERSION)\" @ENABLE_BABEL_TRUE@am__append_3 = -DUSE_LIBXML2 @ENABLE_BABEL_TRUE@am__append_4 = $(libxml2_CFLAGS) @ENABLE_BABEL_TRUE@am__append_5 = $(libxml2_LIBS) @ENABLE_BABEL_FALSE@am__append_6 = -DDISABLE_BABEL= @ENABLE_STRICT_Z_TRUE@am__append_7 = -DSTRICT_Z= @ENABLE_SEGFAULT_ON_ERROR_TRUE@am__append_8 = -DTHROW_SIGFAULT_ON_ERROR= @ENABLE_FILELIST_TRUE@am__append_9 = filelist.c @ENABLE_FILELIST_FALSE@am__append_10 = -DDISABLE_FILELIST= @ENABLE_BLOCKBUFFER_TRUE@am__append_11 = blockbuf.c @ENABLE_BLOCKBUFFER_FALSE@am__append_12 = -DDISABLE_BLOCKBUFFER= @ENABLE_COMMAND_HISTORY_TRUE@am__append_13 = cmd_hst.c @ENABLE_COMMAND_HISTORY_FALSE@am__append_14 = -DDISABLE_COMMAND_HISTORY= @ENABLE_OUTPUT_HISTORY_TRUE@am__append_15 = history.c @ENABLE_OUTPUT_HISTORY_FALSE@am__append_16 = -DDISABLE_OUTPUT_HISTORY= @ENABLE_CONFIG_FILES_FALSE@am__append_17 = -DDISABLE_CONFIGFILES= @ENABLE_PREFIX_COMMANDS_FALSE@am__append_18 = -DDISABLE_PREFIX_COMMANDS= @ENABLE_DEBUGGER_TRUE@am__append_19 = debugger.c @ENABLE_DEBUGGER_TRUE@am__append_20 = -DENABLE_DEBUGGER= subdir = src/interpreter ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config-flags.m4 \ $(top_srcdir)/config-libs.m4 $(top_srcdir)/config-conds.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libinterpreter_a_AR = $(AR) $(ARFLAGS) libinterpreter_a_LIBADD = am__libinterpreter_a_SOURCES_DIST = babel.c blorb.c config.c fizmo.c \ hyphenation.c iff.c mathemat.c misc.c mt19937ar.c object.c \ output.c property.c routine.c savegame.c sound.c stack.c \ streams.c table.c text.c undo.c variable.c wordwrap.c zpu.c \ filelist.c blockbuf.c cmd_hst.c history.c debugger.c @ENABLE_FILELIST_TRUE@am__objects_1 = filelist.$(OBJEXT) @ENABLE_BLOCKBUFFER_TRUE@am__objects_2 = blockbuf.$(OBJEXT) @ENABLE_COMMAND_HISTORY_TRUE@am__objects_3 = cmd_hst.$(OBJEXT) @ENABLE_OUTPUT_HISTORY_TRUE@am__objects_4 = history.$(OBJEXT) @ENABLE_DEBUGGER_TRUE@am__objects_5 = debugger.$(OBJEXT) am_libinterpreter_a_OBJECTS = babel.$(OBJEXT) blorb.$(OBJEXT) \ config.$(OBJEXT) fizmo.$(OBJEXT) hyphenation.$(OBJEXT) \ iff.$(OBJEXT) mathemat.$(OBJEXT) misc.$(OBJEXT) \ mt19937ar.$(OBJEXT) object.$(OBJEXT) output.$(OBJEXT) \ property.$(OBJEXT) routine.$(OBJEXT) savegame.$(OBJEXT) \ sound.$(OBJEXT) stack.$(OBJEXT) streams.$(OBJEXT) \ table.$(OBJEXT) text.$(OBJEXT) undo.$(OBJEXT) \ variable.$(OBJEXT) wordwrap.$(OBJEXT) zpu.$(OBJEXT) \ $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) $(am__objects_5) libinterpreter_a_OBJECTS = $(am_libinterpreter_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libinterpreter_a_SOURCES) DIST_SOURCES = $(am__libinterpreter_a_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBFIZMO_REQS = @LIBFIZMO_REQS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBXML2_NONPKG_CFLAGS = @LIBXML2_NONPKG_CFLAGS@ LIBXML2_NONPKG_LIBS = @LIBXML2_NONPKG_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_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ # Don't run ranlib directly, since in case OS X universal libraries are # built, files processed by ranlib cannot be any longer processed by ar # (which is required to assemble libfizmo later on). RANLIB = true SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ 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@ libxml2_CFLAGS = @libxml2_CFLAGS@ libxml2_LIBS = @libxml2_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ AM_CFLAGS = -fPIC $(am__append_1) $(am__append_2) $(am__append_4) \ $(am__append_6) $(am__append_7) $(am__append_8) \ $(am__append_10) $(am__append_12) $(am__append_14) \ $(am__append_16) $(am__append_17) $(am__append_18) \ $(am__append_20) AM_CPPFLAGS = $(am__append_3) LDADD = $(am__append_5) noinst_LIBRARIES = libinterpreter.a # Using clang-800.0.42.1 on macOS Sierra causes an EXC_BAD_ACCESS # when loading the hyphenation patterns in case "hyphenation.c" is # compiled with -O2. Using -O0 works around this issue. Solution by # Sander Niemeijer at http://gnu-automake.7480.n7.nabble.com/ # Force-O0-flags-inhibit-the-default-O2-flags-td422.html. DISOPT_FLAG = -O0 HYPHENATION_O = hyphenation.o libinterpreter_a_SOURCES = babel.c blorb.c config.c fizmo.c \ hyphenation.c iff.c mathemat.c misc.c mt19937ar.c object.c \ output.c property.c routine.c savegame.c sound.c stack.c \ streams.c table.c text.c undo.c variable.c wordwrap.c zpu.c \ $(am__append_9) $(am__append_11) $(am__append_13) \ $(am__append_15) $(am__append_19) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/interpreter/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/interpreter/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 $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libinterpreter.a: $(libinterpreter_a_OBJECTS) $(libinterpreter_a_DEPENDENCIES) $(EXTRA_libinterpreter_a_DEPENDENCIES) $(AM_V_at)-rm -f libinterpreter.a $(AM_V_AR)$(libinterpreter_a_AR) libinterpreter.a $(libinterpreter_a_OBJECTS) $(libinterpreter_a_LIBADD) $(AM_V_at)$(RANLIB) libinterpreter.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blockbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blorb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmd_hst.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debugger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filelist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fizmo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/history.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hyphenation.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iff.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mathemat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mt19937ar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/property.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/routine.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/savegame.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sound.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/streams.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/table.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/undo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/variable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wordwrap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zpu.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am .PRECIOUS: Makefile $(HYPHENATION_O): hyphenation.c $(MAKE) hyphenation.o CFLAGS="$(CFLAGS) $(DISOPT_FLAG)" HYPHENATION_O=dummy-hyphenation.o # 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: libfizmo-0.7.15/src/interpreter/object.h0000644000175000017500000000417313153330674020350 0ustar chrenderchrender /* object.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef object_h_INCLUDED #define object_h_INCLUDED #include #define OBJECT_NODE_PARENT 0 #define OBJECT_NODE_SIBLING 1 #define OBJECT_NODE_CHILD 2 /*@dependent@*/ uint8_t *get_objects_property_table(uint16_t object_number); void opcode_get_sibling(void); void opcode_get_parent(void); void opcode_get_child(void); void opcode_jin(void); void opcode_set_attr(void); void opcode_test_attr(void); void opcode_insert_obj(void); void opcode_clear_attr(void); void opcode_remove_obj(void); #endif /* object_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/streams.c0000644000175000017500000013730013153330674020552 0ustar chrenderchrender /* streams.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef streams_c_INCLUDED #define streams_c_INCLUDED #include #include "../screen_interface/screen_interface.h" #include "../tools/types.h" #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "../tools/z_ucs.h" #include "../tools/unused.h" #include "../tools/filesys.h" #include "streams.h" #include "config.h" #include "fizmo.h" #include "wordwrap.h" #include "text.h" #include "zpu.h" #include "output.h" #include "../locales/libfizmo_locales.h" #ifndef DISABLE_BLOCKBUFFER #include "blockbuf.h" #endif /* DISABLE_BLOCKBUFFER */ #ifndef DISABLE_OUTPUT_HISTORY #include "history.h" #endif /* DISABLE_OUTPUT_HISTORY */ #define ASCII_TO_Z_UCS_BUFFER_SIZE 64 #define FONT3_CONVERSION_BUF_SIZE 128 //int stream_active[5] = { 0, 1, 0, 0, 0 }; bool stream_1_active = true; bool stream_2_filename_stored = false; // stream2 is stored in dynamic memory at z_mem[0x11]. // stream3 is active when stream_3_current_depth >= -1 bool stream_4_active = false; /*@dependent@*/ /*@null@*/ static z_file *stream_2 = NULL; /*@only@*/ char *stream_2_filename = NULL; static size_t stream_2_filename_size = 0; /*@only@*/ static WORDWRAP *stream_2_wrapper = NULL; static zscii current_filename_buffer[MAXIMUM_SCRIPT_FILE_NAME_LENGTH+1]; z_ucs last_script_filename[MAXIMUM_SCRIPT_FILE_NAME_LENGTH + 1]; static bool script_wrapper_active = true; static uint8_t *stream_3_start[MAXIMUM_STREAM_3_DEPTH]; static uint8_t *stream_3_index[MAXIMUM_STREAM_3_DEPTH]; static int stream_3_current_depth = -1; z_file *stream_4 = NULL; /*@only@*/ static char *stream_4_filename; static size_t stream_4_filename_size = 0; z_ucs last_stream_4_filename[MAXIMUM_SCRIPT_FILE_NAME_LENGTH + 1]; z_ucs last_input_stream_filename[MAXIMUM_SCRIPT_FILE_NAME_LENGTH + 1]; static bool stream_4_init_underway = false; char *input_stream_1_filename = NULL; size_t input_stream_1_filename_size = 0; z_file *input_stream_1 = NULL; static bool input_stream_init_underway = false; bool input_stream_1_active = false; bool input_stream_1_was_already_active = false; static z_ucs stream_2_preload_buffer[STREAM_2_PRELOAD_BUFFER_SIZE]; static z_ucs *stream_2_preload_buffer_index = stream_2_preload_buffer; static z_ucs *stream_2_preload_output_start = stream_2_preload_buffer; static z_ucs *stream_2_preload_buffer_last_index = ( stream_2_preload_buffer + STREAM_2_PRELOAD_BUFFER_SIZE - 1); // This flag is used for the timed input. Since the verification routine // may print some text to the screen, the interpreter must be able to // restore the input line once it resumes input. bool stream_output_has_occured = false; static bool stream_2_init_underway = false; static bool stream_4_was_already_active = false; static bool stream_2_wrapping_disabled; static int stream2margin; void open_streams() { #ifdef ENABLE_TRACING turn_on_trace(); #endif /* ENABLE_TRACING */ } static void stream_2_output_destination(z_ucs *z_ucs_output, void *UNUSED(dummy)) { if (*z_ucs_output != 0) { fsi->writeucsstring(z_ucs_output, stream_2); if (strcmp(get_configuration_value("sync-transcript"), "true") == 0) fsi->flushfile(stream_2); } } static void flush_stream_2_buffer_output() { z_ucs *index; z_ucs *newline_index = NULL; z_ucs buf; TRACE_LOG("stream_2_preload_flush:\n"); index = stream_2_preload_buffer_index == stream_2_preload_buffer ? stream_2_preload_buffer_last_index - 1 : stream_2_preload_buffer_index -1; while (index != stream_2_preload_output_start) { if (*index == '\n') { newline_index = index; break; } if (index == stream_2_preload_buffer) { index = stream_2_preload_buffer_last_index; } index--; } if (newline_index == NULL) { index = stream_2_preload_output_start + (STREAM_2_PRELOAD_BUFFER_SIZE / 2); if (index >= stream_2_preload_buffer_last_index) { index = stream_2_preload_buffer + (index - stream_2_preload_buffer_last_index); } } else { if ((index = newline_index + 1) == stream_2_preload_buffer_last_index) { index = stream_2_preload_buffer; } } if (stream_2_preload_output_start > index) { TRACE_LOG("stream_2_preload in wrap-around.\n"); TRACE_LOG("flushs2: \""); TRACE_LOG_Z_UCS(stream_2_preload_output_start); TRACE_LOG("\".\n"); // In wrap-around stream_2_output_destination(stream_2_preload_output_start, NULL); stream_2_preload_output_start = stream_2_preload_buffer; } buf = *index; *index = 0; TRACE_LOG("flushs2:\""); TRACE_LOG_Z_UCS(stream_2_preload_output_start); TRACE_LOG("\".\n"); stream_2_output_destination(stream_2_preload_output_start, NULL); *index = buf; stream_2_preload_output_start = index; } static void stream_2_buffer_output(z_ucs *z_ucs_output) { //z_ucs buf; while (*z_ucs_output != 0) { TRACE_LOG("stream_2_preload_buffer_index: %x\n", stream_2_preload_buffer_index); TRACE_LOG("stream_2_preload_buffer_last_index: %x\n", stream_2_preload_buffer_last_index); TRACE_LOG("stream_2_preload_output_start: %x\n", stream_2_preload_output_start); if (stream_2_preload_buffer_index == stream_2_preload_buffer_last_index) { // output-start following buffer_index in wrap-around: if (stream_2_preload_output_start == stream_2_preload_buffer) { flush_stream_2_buffer_output(); } stream_2_preload_buffer_index = stream_2_preload_buffer; } // output-start following buffer_index as non-wrap-around: if (stream_2_preload_buffer_index + 1 == stream_2_preload_output_start) { flush_stream_2_buffer_output(); } TRACE_LOG("Writing %c to %x.\n", *z_ucs_output, stream_2_preload_buffer_index); *stream_2_preload_buffer_index = *z_ucs_output; stream_2_preload_buffer_index++; z_ucs_output++; } } int stream_2_buffer_remove_chars(size_t nof_chars_to_remove) { while (nof_chars_to_remove > 0) { if (stream_2_preload_buffer_index == stream_2_preload_output_start) { TRACE_LOG("remove-s2 hit output start.\n"); return -1; } if (stream_2_preload_buffer_index == stream_2_preload_buffer) { stream_2_preload_buffer_index = stream_2_preload_buffer_last_index - 1; } else { stream_2_preload_buffer_index--; } TRACE_LOG("Removing %c.\n", *stream_2_preload_buffer_index); TRACE_LOG("stream_2_preload_buffer_index: %x\n", stream_2_preload_buffer_index); TRACE_LOG("stream_2_preload_buffer_last_index: %x\n", stream_2_preload_buffer_last_index); TRACE_LOG("stream_2_preload_output_start: %x\n", stream_2_preload_output_start); nof_chars_to_remove--; } return 0; } void init_streams() { char *src; size_t bytes_required; char *stream_2_line_width = get_configuration_value("stream-2-line-width"); char *stream_2_left_margin = get_configuration_value("stream-2-left-margin"); stream_2_wrapping_disabled = (strcmp(get_configuration_value("disable-stream-2-wrap"), "true") == 0); int stream2width; stream2width = stream_2_line_width != NULL ? atoi(stream_2_line_width) : DEFAULT_STREAM_2_LINE_WIDTH; stream2margin = stream_2_left_margin != NULL ? atoi(stream_2_left_margin) : DEFAULT_STREAM_2_LEFT_PADDING; if (stream_2_wrapping_disabled == false) stream_2_wrapper = wordwrap_new_wrapper( stream2width, &stream_2_output_destination, NULL, true, stream2margin, (strcmp(get_configuration_value("sync-transcript"), "true") == 0 ? true : false), (strcmp(get_configuration_value("disable-stream-2-hyphenation") ,"true") == 0 ? false : true)); *stream_2_preload_buffer_last_index = 0; if (strcmp(get_configuration_value("start-script-when-story-starts"), "true") == 0) z_mem[0x11] |= 1; if (strcmp(get_configuration_value( "start-command-recording-when-story-starts"), "true") == 0) stream_4_active = true; if ((src = get_configuration_value("transcript-filename")) != NULL) { bytes_required = strlen(src) + 1; if ((stream_2_filename == NULL) || (bytes_required>stream_2_filename_size)) { stream_2_filename = (char*)fizmo_realloc(stream_2_filename, bytes_required); stream_2_filename_size = bytes_required; } strcpy(stream_2_filename, src); stream_2_filename_stored = true; } else src = DEFAULT_TRANSCRIPT_FILE_NAME; (void)latin1_string_to_zucs_string( last_script_filename, src, strlen(src) + 1); TRACE_LOG("Converted script default filename: '"); TRACE_LOG_Z_UCS(last_script_filename); TRACE_LOG("'.\n"); if ((src = get_configuration_value("input-command-filename")) != NULL) { bytes_required = strlen(src) + 1; if ((input_stream_1_filename == NULL) || (bytes_required > input_stream_1_filename_size)) { input_stream_1_filename = (char*)fizmo_realloc(input_stream_1_filename, bytes_required); input_stream_1_filename_size = bytes_required; } strcpy(input_stream_1_filename, src); input_stream_1_was_already_active = true; } else src = DEFAULT_INPUT_COMMAND_FILE_NAME; (void)latin1_string_to_zucs_string( last_input_stream_filename, src, strlen(src) + 1); if ((src = get_configuration_value("record-command-filename")) != NULL) { bytes_required = strlen(src) + 1; if ((stream_4_filename == NULL) || (bytes_required>stream_4_filename_size)) { stream_4_filename = (char*)fizmo_realloc(stream_4_filename, bytes_required); stream_4_filename_size = bytes_required; } strcpy(stream_4_filename, src); stream_4_was_already_active = true; } else src = DEFAULT_RECORD_COMMAND_FILE_NAME; (void)latin1_string_to_zucs_string( last_stream_4_filename, src, strlen(src) + 1); if (strcmp(get_configuration_value( "start-file-input-when-story-starts"), "true") == 0) input_stream_1_active = true; } z_file *get_stream_2(void) { return stream_2; } /* Accept a new open stream as the current stream_2. The previous stream_2 is closed. Pass in NULL to just close the previous stream_2. The interpreter's transcript bit is set appropriately. */ void restore_stream_2(z_file *str) { if (stream_2) { (void)fsi->closefile(stream_2); stream_2 = NULL; z_mem[0x11] &= 0xfe; } if (str) { stream_2 = str; z_mem[0x11] |= 1; } } void ask_for_input_stream_filename(void) { bool stream_1_active_buf; int16_t input_length; int16_t i; size_t bytes_required; z_ucs *ptr; int len; input_stream_init_underway = true; stream_1_active_buf = stream_1_active; stream_1_active = true; (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_PLEASE_ENTER_NAME_FOR_COMMANDFILE); (void)streams_latin1_output("\n>"); (void)streams_z_ucs_output(last_input_stream_filename); len = z_ucs_len(last_input_stream_filename); stream_2_remove_chars(len); #ifndef DISABLE_OUTPUT_HISTORY remove_chars_from_history(outputhistory[active_window_number], len); #endif /* DISABLE_OUTPUT_HISTORY */ for (i=0; iread_line( (zscii*)current_filename_buffer, MAXIMUM_SCRIPT_FILE_NAME_LENGTH, 0, 0, len, NULL, true, false); if (input_length == 0) { if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); if (i18n_translate( libfizmo_module_name, i18n_libfizmo_FILENAME_MUST_NOT_BE_EMPTY) == (size_t)-1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "i18n_translate"); if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); } } while (input_length == 0); for (i=0; iinput_must_be_repeated_by_story(); (void)streams_z_ucs_output_user_input(last_script_filename); (void)streams_z_ucs_output_user_input(z_ucs_newline_string); stream_1_active = stream_1_active_buf; TRACE_LOG("From ZSCII translated filename: \""); TRACE_LOG_Z_UCS(last_script_filename); TRACE_LOG("\".\n"); ptr = last_script_filename; bytes_required = (size_t)zucs_string_to_utf8_string(NULL, &ptr, 0); if ( (input_stream_1_filename == NULL) || (bytes_required > input_stream_1_filename_size) ) { TRACE_LOG("(Re-)allocating %zd bytes.\n", bytes_required); input_stream_1_filename = (char*)fizmo_realloc(input_stream_1_filename, bytes_required); input_stream_1_filename_size = bytes_required; } ptr = last_script_filename; TRACE_LOG("From ZSCII translated filename: \""); TRACE_LOG_Z_UCS(ptr); TRACE_LOG("\".\n"); // FIXME: Charsets may differ on operating systems. (void)zucs_string_to_utf8_string( input_stream_1_filename, &ptr, bytes_required); TRACE_LOG("Converted filename: '%s'.\n", input_stream_1_filename); input_stream_init_underway = false; } void ask_for_stream2_filename() { bool stream_1_active_buf; int16_t input_length; int16_t i; size_t bytes_required; z_ucs *ptr; int len; stream_2_init_underway = true; stream_1_active_buf = stream_1_active; stream_1_active = true; (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_PLEASE_ENTER_SCRIPT_FILENAME); (void)streams_latin1_output("\n>"); if (streams_z_ucs_output(last_script_filename) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_z_ucs_output"); len = z_ucs_len(last_script_filename); stream_2_remove_chars(len); #ifndef DISABLE_OUTPUT_HISTORY remove_chars_from_history(outputhistory[active_window_number], len); #endif /* DISABLE_OUTPUT_HISTORY */ for (i=0; iread_line( (zscii*)current_filename_buffer, MAXIMUM_SCRIPT_FILE_NAME_LENGTH, 0, 0, len, NULL, true, false); if (input_length == 0) { if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); if (i18n_translate( libfizmo_module_name, i18n_libfizmo_FILENAME_MUST_NOT_BE_EMPTY) == (size_t)-1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "i18n_translate"); if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); } } while (input_length == 0); for (i=0; iinput_must_be_repeated_by_story(); (void)streams_z_ucs_output_user_input(last_script_filename); (void)streams_z_ucs_output_user_input(z_ucs_newline_string); stream_1_active = stream_1_active_buf; TRACE_LOG("From ZSCII translated filename: \""); TRACE_LOG_Z_UCS(last_script_filename); TRACE_LOG("\".\n"); ptr = last_script_filename; bytes_required = (size_t)zucs_string_to_utf8_string(NULL, &ptr, 0); if ( (stream_2_filename == NULL) || (bytes_required > stream_2_filename_size) ) { TRACE_LOG("(Re-)allocating %zd bytes.\n", bytes_required); stream_2_filename = (char*)fizmo_realloc(stream_2_filename, bytes_required); stream_2_filename_size = bytes_required; } ptr = last_script_filename; TRACE_LOG("From ZSCII translated filename: \""); TRACE_LOG_Z_UCS(ptr); TRACE_LOG("\".\n"); // FIXME: Charsets may differ on operating systems. (void)zucs_string_to_utf8_string( stream_2_filename, &ptr, bytes_required); TRACE_LOG("Converted filename: '%s'.\n", stream_2_filename); stream_2_filename_stored = true; stream_2_init_underway = false; } static void stream_2_output_write(z_ucs *z_ucs_output) { if (stream_2_wrapping_disabled == true) stream_2_buffer_output(z_ucs_output); else wordwrap_wrap_z_ucs(stream_2_wrapper, z_ucs_output); } static void stream_2_print_header() { z_ucs dashes[] = { '-', '-', '-', '\n', '\n', 0 }; stream_2_output_write(z_ucs_newline_string); stream_2_output_write(dashes); } void stream_2_remove_chars(size_t nof_chars_to_remove) { if (stream_2 != NULL) { if (stream_2_wrapping_disabled == true) { stream_2_buffer_remove_chars(nof_chars_to_remove); } else { wordwrap_remove_chars(stream_2_wrapper, nof_chars_to_remove); } } } static void stream_2_output(z_ucs *z_ucs_output) { int return_code; z_file *transcript_stream = NULL; if ( (active_interface == NULL) || (active_window_number != 0) || (stream_2_init_underway == true) ) return ; if (stream_2 == NULL) { if (stream_2_filename_stored == false) { return_code = active_interface->prompt_for_filename( "transcript", &transcript_stream, NULL, FILETYPE_TRANSCRIPT, FILEACCESS_APPEND); if (return_code == -3) { // No support for "prompt_for_filename" in screen_interface, default // to built-in method. ask_for_stream2_filename(); // This method will not open a file, but instead store the filename in //"stream_2_filename". TRACE_LOG("Opening script-file '%s' for writing.\n", stream_2_filename); stream_2 = fsi->openfile( stream_2_filename, FILETYPE_TRANSCRIPT, FILEACCESS_APPEND); } else if (return_code < 0) { /* The user cancelled out. We'll have to silently turn off stream 2. Not the best option, but the best option I can see how to do. */ z_mem[0x11] &= 0xfe; return; } else { stream_2 = transcript_stream; } } else { stream_2 = fsi->openfile( stream_2_filename, FILETYPE_TRANSCRIPT, FILEACCESS_APPEND); } stream_2_print_header(); } if (bool_equal(lower_window_buffering_active, true)) { if (script_wrapper_active == false) { flush_stream_2_buffer_output(); script_wrapper_active = true; } stream_2_output_write(z_ucs_output); } else { if (bool_equal(script_wrapper_active, true)) { if (stream_2_wrapping_disabled == false) wordwrap_flush_output(stream_2_wrapper); script_wrapper_active = false; } stream_2_buffer_output(z_ucs_output); } } void ask_for_stream4_filename_if_required(void) { bool stream_1_active_buf; int16_t input_length; int16_t i; size_t bytes_required; z_ucs *ptr; int len; int return_code; if ( (bool_equal(stream_4_active, true)) && (stream_4_was_already_active == false) && (stream_4_init_underway == false) ) { stream_4_init_underway = true; return_code = active_interface->prompt_for_filename( "transcript", &stream_4, NULL, FILETYPE_INPUTRECORD, FILEACCESS_APPEND); if (return_code >= 0) { // Success. stream_4_was_already_active = true; stream_4_init_underway = false; } else if ( (return_code == -1) || (return_code == -2) ) { stream_4_active = false; } else if (return_code == -3) { // No support for UI-specific filename prompt. stream_1_active_buf = stream_1_active; stream_1_active = true; do { (void)streams_latin1_output("\n"); (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_PLEASE_ENTER_NAME_FOR_COMMANDFILE); (void)streams_latin1_output("\n>"); (void)streams_z_ucs_output(last_stream_4_filename); len = z_ucs_len(last_stream_4_filename); stream_2_remove_chars(len); #ifndef DISABLE_OUTPUT_HISTORY remove_chars_from_history(outputhistory[active_window_number], len); #endif /* DISABLE_OUTPUT_HISTORY */ for (i=0; iread_line( (zscii*)current_filename_buffer, MAXIMUM_SCRIPT_FILE_NAME_LENGTH, 0, 0, len, NULL, true, false); if (input_length == 0) { if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); if (i18n_translate( libfizmo_module_name, i18n_libfizmo_FILENAME_MUST_NOT_BE_EMPTY) == (size_t)-1) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "i18n_translate"); if (streams_latin1_output("\n") != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -0x0100, "streams_latin1_output"); } } while (input_length == 0); stream_1_active = stream_1_active_buf; for (i=0; i stream_4_filename_size) ) { TRACE_LOG("(Re-)allocating %zd bytes.\n", bytes_required); stream_4_filename = (char*)fizmo_realloc(stream_4_filename, bytes_required); stream_4_filename_size = bytes_required; } // FIXME: Charsets may differ on operating systems. ptr = last_stream_4_filename; (void)zucs_string_to_utf8_string( stream_4_filename, &ptr, bytes_required); stream_4_was_already_active = true; stream_4_init_underway = false; } } } void stream_4_latin1_output(char *latin1_output) { if ( (active_interface == NULL) || (active_window_number != 0) ) return ; // We'll ask at this point for the filename, since asking directly when // the OUTPUT_STREAM opcode is processed might garble then screen output. // So we'll just wait until the user has finished with the input and ask // for the filename to save to once he's finished. ask_for_stream4_filename_if_required(); if (stream_4_init_underway == false) { if (stream_4 == NULL) { TRACE_LOG("Opening script-file '%s' for writing.\n", stream_4_filename); stream_4 = fsi->openfile(stream_4_filename, FILETYPE_INPUTRECORD, FILEACCESS_APPEND); } fsi->writechars(latin1_output, strlen(latin1_output), stream_4); } } void stream_4_z_ucs_output(z_ucs *z_ucs_output) { char buf[128]; while (*z_ucs_output != 0) { zucs_string_to_utf8_string(buf, &z_ucs_output, 128); stream_4_latin1_output(buf); } } static void close_script_file() { if (stream_2 != NULL) { TRACE_LOG("Closing script-file.\n"); if (stream_2_wrapping_disabled == false) wordwrap_flush_output(stream_2_wrapper); else flush_stream_2_buffer_output(); fsi->writechar('\n', stream_2); (void)fsi->closefile(stream_2); stream_2 = NULL; } } static void send_to_stream1_targets(z_ucs *z_ucs_output) { #ifndef DISABLE_OUTPUT_HISTORY if ((active_window_number == 0) && (outputhistory[0] != NULL) ) { store_z_ucs_output_in_history( outputhistory[0], z_ucs_output); } #endif /* DISABLE_OUTPUT_HISTORY */ #ifndef DISABLE_BLOCKBUFFER if (active_window_number == 1) { store_z_ucs_output_in_blockbuffer( upper_window_buffer, z_ucs_output); } #endif /* DISABLE_BLOCKBUFFER */ if (active_interface != NULL) { active_interface->z_ucs_output(z_ucs_output); } } static int _streams_z_ucs_output(z_ucs *z_ucs_output, bool is_user_input) { int16_t conversion_result; zscii zscii_char; z_ucs *src; uint16_t len; z_ucs font3_conversion_buf[FONT3_CONVERSION_BUF_SIZE]; z_ucs char_to_convert, converted_char; int font3_buf_index; z_ucs *processed_output, *output_pos, *processed_output_pos; z_ucs *next_newline_pos; //int size; int parameter1, parameter2; bool font_conversion_active = ( (current_font == Z_FONT_CHARACTER_GRAPHICS) && (strcmp(get_configuration_value("enable-font3-conversion"),"true") == 0) ) ? true : false; TRACE_LOG("Streams-output of \""); TRACE_LOG_Z_UCS(z_ucs_output); TRACE_LOG("\".\n"); if ( (stream_3_current_depth != -1) && (bool_equal(is_user_input, false)) ) { src = z_ucs_output; while (*src != 0) { conversion_result = (int16_t)unicode_char_to_zscii_input_char(*src); if (conversion_result == 10) zscii_char = (zscii)13; else if (conversion_result == -1) zscii_char = (zscii)'?'; else zscii_char = (zscii)conversion_result; *(stream_3_index[stream_3_current_depth]++) = zscii_char; TRACE_LOG("Writing ZSCII '%c' / %d to %ld.\n", zscii_char, zscii_char, (long int)(stream_3_index[stream_3_current_depth] - z_mem)); src++; } len = load_word(stream_3_start[stream_3_current_depth]); TRACE_LOG("Loaded current stream-3-length %d.\n", len); len += (src - z_ucs_output); store_word(stream_3_start[stream_3_current_depth], len); TRACE_LOG("Stored current stream-3-length %d.\n", len); } else { if (bool_equal(is_user_input, false)) stream_output_has_occured = true; if ( (active_z_story != NULL) && ((z_mem[0x11] & 0x1) != 0) && (ver != 6) && (strcasecmp(get_configuration_value( "disable-external-streams"), "true") != 0) ) { stream_2_output(z_ucs_output); } else if (stream_2 != NULL) { close_script_file(); } output_pos = z_ucs_output; processed_output = font_conversion_active == true ? font3_conversion_buf : z_ucs_output; while (*output_pos != 0) { if (font_conversion_active == true) { TRACE_LOG("Converting to font 3.\n"); // In case we're converting we'll process a maximum of // (FONT3_CONVERSION_BUF_SIZE) chars in one iteration. font3_buf_index = 0; char_to_convert = *output_pos; while ( (char_to_convert != 0) && (font3_buf_index < FONT3_CONVERSION_BUF_SIZE) ) { if ( (char_to_convert == 32) || (char_to_convert == 37) ) // empty converted_char = ' '; if (char_to_convert == 33) // arrow left converted_char = 0x2190; else if (char_to_convert == 34) // arrow right converted_char = 0x2192; else if (char_to_convert == 35) // diagonal //converted_char = 0x2571; converted_char = '/'; else if (char_to_convert == 36) // diagonal //converted_char = 0x2572; converted_char = '\\'; else if (char_to_convert == 38) // horizontal converted_char = 0x2500; else if (char_to_convert == 39) // horizontal converted_char = 0x2500; else if (char_to_convert == 40) converted_char = 0x2502; else if (char_to_convert == 41) converted_char = 0x2502; else if (char_to_convert == 42) converted_char = 0x2534; else if (char_to_convert == 43) converted_char = 0x252C; else if (char_to_convert == 44) converted_char = 0x251C; else if (char_to_convert == 45) converted_char = 0x2524; else if (char_to_convert == 46) converted_char = 0x230A; else if (char_to_convert == 47) converted_char = 0x2308; else if (char_to_convert == 48) converted_char = 0x2309; else if (char_to_convert == 49) converted_char = 0x230B; else if (char_to_convert == 50) // FIXME: Better symbol converted_char = 0x2534; else if (char_to_convert == 51) // FIXME: Better symbol converted_char = 0x252C; else if (char_to_convert == 52) // FIXME: Better symbol converted_char = 0x251C; else if (char_to_convert == 53) // FIXME: Better symbol converted_char = 0x2524; else if (char_to_convert == 54) // full block converted_char = 0x2588; else if (char_to_convert == 55) // upper half block converted_char = 0x2580; else if (char_to_convert == 56) // lower half block converted_char = 0x2584; else if (char_to_convert == 57) // left half block converted_char = 0x258C; else if (char_to_convert == 58) // right half block converted_char = 0x2590; else if (char_to_convert == 59) // FIXME: Better symbol converted_char = 0x2584; else if (char_to_convert == 60) // FIXME: Better symbol converted_char = 0x2580; else if (char_to_convert == 61) // FIXME: Better symbol converted_char = 0x258C; else if (char_to_convert == 62) // FIXME: Better symbol converted_char = 0x2590; else if (char_to_convert == 63) // upper right block converted_char = 0x259D; else if (char_to_convert == 64) // lower right block converted_char = 0x2597; else if (char_to_convert == 65) // lower left block converted_char = 0x2596; else if (char_to_convert == 66) // upper left block converted_char = 0x2598; else if (char_to_convert == 67) // FIXME: Better symbol converted_char = 0x259D; else if (char_to_convert == 68) // FIXME: Better symbol converted_char = 0x2597; else if (char_to_convert == 69) // FIXME: Better symbol converted_char = 0x2596; else if (char_to_convert == 70) // FIXME: Better symbol converted_char = 0x2598; else if (char_to_convert == 71) // dot upper right, FIXME: Better symbol converted_char = '+'; else if (char_to_convert == 72) // dot lower right, FIXME: Better symbol converted_char = '+'; else if (char_to_convert == 73) // dot lower left, FIXME: Better symbol converted_char = '+'; else if (char_to_convert == 74) // dot upper left, FIXME: Better symbol converted_char = '+'; else if (char_to_convert == 75) // line top converted_char = 0x2594; else if (char_to_convert == 76) // line bottom converted_char = '_'; else if (char_to_convert == 77) // line left converted_char = 0x23B9; else if (char_to_convert == 78) // line right converted_char = 0x2595; else if (char_to_convert == 79) // status bar, filled 0/8 converted_char = ' '; else if (char_to_convert == 80) // status bar, filled 1/8 converted_char = 0x258F; else if (char_to_convert == 81) // status bar, filled 2/8 converted_char = 0x258E; else if (char_to_convert == 82) // status bar, filled 3/8 converted_char = 0x258D; else if (char_to_convert == 83) // status bar, filled 4/8 converted_char = 0x258C; else if (char_to_convert == 84) // status bar, filled 5/8 converted_char = 0x258B; else if (char_to_convert == 85) // status bar, filled 6/8 converted_char = 0x258A; else if (char_to_convert == 86) // status bar, filled 7/8 converted_char = 0x2589; else if (char_to_convert == 87) // status bar, filled 8/8 converted_char = 0x2588; else if (char_to_convert == 88) // status bar, padding right converted_char = 0x2595; else if (char_to_convert == 89) // status bar, padding left converted_char = 0x258F; else if (char_to_convert == 90) // diagonal cross converted_char = 0x2573; else if (char_to_convert == 91) // vertical / horizontal cross converted_char = 0x253C; else if (char_to_convert == 92) // arrow up converted_char = 0x2191; else if (char_to_convert == 93) // arrow down converted_char = 0x2193; else if (char_to_convert == 94) // arrow up-down converted_char = 0x2195; else if (char_to_convert == 95) // square char_to_convert =0x25A2; else if (char_to_convert == 96) // question mark converted_char = '?'; // runic else if (char_to_convert == 97) converted_char = 0x16aa; else if (char_to_convert == 98) converted_char = 0x16d2; else if (char_to_convert == 99) converted_char = 0x16c7; else if (char_to_convert == 100) converted_char = 0x16de; else if (char_to_convert == 101) converted_char = 0x16d6; else if (char_to_convert == 102) converted_char = 0x16a0; else if (char_to_convert == 103) converted_char = 0x16b7; else if (char_to_convert == 104) converted_char = 0x16bb; else if (char_to_convert == 105) converted_char = 0x16c1; else if (char_to_convert == 106) converted_char = 0x16e8; else if (char_to_convert == 107) converted_char = 0x16e6; else if (char_to_convert == 108) converted_char = 0x16da; else if (char_to_convert == 109) converted_char = 0x16d7; else if (char_to_convert == 110) converted_char = 0x16be; else if (char_to_convert == 111) converted_char = 0x16a9; else if (char_to_convert == 112) // FIXME: better symbol? converted_char = 0x16b3; else if (char_to_convert == 113) converted_char = 'h'; // FIXME: better symbol?; else if (char_to_convert == 114) converted_char = 0x16b1; else if (char_to_convert == 115) converted_char = 0x16cb; else if (char_to_convert == 116) converted_char = 0x16cf; else if (char_to_convert == 117) converted_char = 0x16a2; else if (char_to_convert == 118) converted_char = 0x16e0; else if (char_to_convert == 119) converted_char = 0x16b9; else if (char_to_convert == 120) converted_char = 0x16c9; else if (char_to_convert == 121) converted_char = 0x16a5; else if (char_to_convert == 122) converted_char = 0x16df; // inverted else if (char_to_convert == 123) // inverted arrow up, FIXME: symbol converted_char = 0x2191; else if (char_to_convert == 124) // inverted arrow down, FIXME: symbol converted_char = 0x2193; else if (char_to_convert == 125) // inverted arrow up-down, FIXME: symbol converted_char = 0x2195; else if (char_to_convert == 126) // inverted question mark, FIXME: symbol converted_char = '?'; // no match else converted_char = char_to_convert; font3_conversion_buf[font3_buf_index] = converted_char; font3_buf_index++; output_pos++; char_to_convert = *output_pos; } font3_conversion_buf[font3_buf_index] = 0; } if (bool_equal(stream_1_active, true)) { #ifndef DISABLE_OUTPUT_HISTORY if (active_window_number == 0) { // outputhistory[0] is always defined if DISABLE_OUTPUT_HISTORY is not // defined (see fizmo.c). if ( (lower_window_foreground_colour != current_foreground_colour) || (lower_window_background_colour != current_background_colour) ) { store_metadata_in_history( outputhistory[0], HISTORY_METADATA_TYPE_COLOUR, current_foreground_colour, current_background_colour); lower_window_foreground_colour = current_foreground_colour; lower_window_background_colour = current_background_colour; } } if ( (active_z_story != NULL) && (z_mem[0x11] & 2) ) { current_resulting_font = Z_FONT_COURIER_FIXED_PITCH; //printf("force fixed on: %d\n", current_resulting_font); } else { current_resulting_font = current_font; //printf("force fixed off: %d\n", current_resulting_font); } if (lower_window_font != current_resulting_font) { store_metadata_in_history( outputhistory[0], HISTORY_METADATA_TYPE_FONT, current_resulting_font); lower_window_font = current_resulting_font; active_interface->set_font(current_resulting_font); } #endif /* DISABLE_OUTPUT_HISTORY */ #ifndef DISABLE_BLOCKBUFFER if ((active_window_number == 1) && (upper_window_buffer != NULL)) { if (upper_window_style != current_style) { set_blockbuf_style(upper_window_buffer, current_style); upper_window_style = current_style; } if (upper_window_foreground_colour != current_foreground_colour) { set_blockbuf_foreground_colour( upper_window_buffer, current_foreground_colour); upper_window_foreground_colour = current_foreground_colour; } if (upper_window_background_colour != current_background_colour) { set_blockbuf_background_colour( upper_window_buffer, current_background_colour); upper_window_background_colour = current_background_colour; } } #endif /* DISABLE_BLOCKBUFFER */ if (strcasecmp(get_configuration_value("flush-output-on-newline"), "true") != 0) { // No split required, process all at once. send_to_stream1_targets(processed_output); } else { // Split output in newlines and process one by one. processed_output_pos = processed_output; next_newline_pos = NULL; // We'll try to find a newline in the current string. In case this // is the first iteration, next_newline_pos == NULL and we'll start // looking from the front. In case we've already found a newline // we'll start at the char behind it. This helps to ensure that // the newline is actually included in the next output. while ((next_newline_pos = z_ucs_chr(processed_output_pos, Z_UCS_NEWLINE)) != NULL) { *next_newline_pos = 0; send_to_stream1_targets(processed_output_pos); *next_newline_pos = Z_UCS_NEWLINE; processed_output_pos = next_newline_pos; #ifndef DISABLE_OUTPUT_HISTORY if (paragraph_attribute_function != NULL) { //paragraph_attribute_function(¶meter1, ¶meter2); // Write paragraph attribute metadata dummy block. It is // written to make sure the block is placed before the // paragraph's final newline, but we'll replace it's contents // later (since we can only know the correct contents once the // newline char has been flushed). if (outputhistory[0] != NULL) { store_metadata_in_history( outputhistory[0], HISTORY_METADATA_TYPE_PARAGRAPHATTRIBUTE, 0, 0); } // Write newline and advance stream accordingly. send_to_stream1_targets(z_ucs_newline_string); processed_output_pos++; paragraph_attribute_function(¶meter1, ¶meter2); if (outputhistory[0] != NULL) { alter_last_written_paragraph_attributes( outputhistory[0], parameter1, parameter2); } } #endif /* DISABLE_OUTPUT_HISTORY */ } send_to_stream1_targets(processed_output_pos); } } // In case we're not converting and input == output we know that // once we arrive here the entire output has been processed, so // we can quit right away. if (font_conversion_active == false) break; } if (bool_equal(is_user_input, true)) { if ( (bool_equal(stream_4_active, true)) && (strcasecmp(get_configuration_value("disable-external-streams"), "true") != 0) ) stream_4_z_ucs_output(z_ucs_output); else { if (stream_4 != NULL) { (void)fsi->closefile(stream_4); stream_4 = NULL; } } } } /*@-globstate@*/ return 0; /*@+globstate@*/ // For some reason splint thinks that comparison with NULL might set // active_z_story or active_interface to NULL. The "globstate" annotations // above inhibit these warnings. } int streams_z_ucs_output(z_ucs *z_ucs_output) { return _streams_z_ucs_output(z_ucs_output, false); } int streams_z_ucs_output_user_input(z_ucs *z_ucs_output) { return _streams_z_ucs_output(z_ucs_output, true); } int streams_latin1_output(/*@in@*/ char *latin1_output) { z_ucs output_buffer_z_ucs[ASCII_TO_Z_UCS_BUFFER_SIZE]; //FIXME: latin1 != utf8 while (latin1_output != NULL) { latin1_output = utf8_string_to_zucs_string( output_buffer_z_ucs, latin1_output, ASCII_TO_Z_UCS_BUFFER_SIZE); if (streams_z_ucs_output(output_buffer_z_ucs) != 0) return -1; } return 0; } void opcode_output_stream(void) { int16_t stream_number =(int16_t) op[0]; TRACE_LOG("Opcode: OUTPUT_STREAM.\n"); if (stream_number == 0) return; #ifdef ENABLE_TRACING if (((int16_t)op[0]) < 0) { TRACE_LOG("Closing stream "); } else { TRACE_LOG("Opening stream "); } TRACE_LOG("%d.\n", (((int16_t)op[0]) < 0 ? -((int16_t)op[0]) : op[0])); #endif if ((stream_number < -4) || (stream_number > 4)) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INVALID_OUTPUT_STREAM_NUMBER_P0D, -1, (long int)stream_number); if (stream_number == 1) stream_1_active = true; else if (stream_number == -1) stream_1_active = false; else if (stream_number == 2) z_mem[0x11] |= 1; else if (stream_number == -2) z_mem[0x11] &= 0xfe; else if (stream_number == 3) { if (++stream_3_current_depth == MAXIMUM_STREAM_3_DEPTH) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_MAXIMUM_STREAM_3_DEPTH_P0D_EXCEEDED, -1, MAXIMUM_STREAM_3_DEPTH); stream_3_start[stream_3_current_depth] = z_mem + op[1]; stream_3_index[stream_3_current_depth] = z_mem + op[1] + 2; store_word(stream_3_start[stream_3_current_depth], 0); TRACE_LOG("stream-3 depth: %d.\n", stream_3_current_depth); TRACE_LOG("Current stream-3 dest is %p.\n", stream_3_start[stream_3_current_depth]); } else if (stream_number == -3) { if (stream_3_current_depth >= 0) { TRACE_LOG("stream-3 depth: %d.\n", stream_3_current_depth); stream_3_current_depth--; } } else if (stream_number == 4) stream_4_active = true; else if (stream_number == -4) stream_4_active = false; } void close_streams(z_ucs *error_message) { TRACE_LOG("Closing all streams.\n"); // Close the interface first. This will allow stream 2 to capture // any pending output. (void)close_interface(error_message); if (stream_2 != NULL) close_script_file(); if (stream_2_wrapper != NULL) { wordwrap_destroy_wrapper(stream_2_wrapper); stream_2_wrapper = NULL; } if (stream_4 != NULL) { (void)fsi->closefile(stream_4); stream_4 = NULL; } } void open_input_stream_1(void) { if (strcasecmp(get_configuration_value("disable-external-streams"), "true") != 0) { input_stream_1_active = true; } else { (void)i18n_translate( libfizmo_module_name, i18n_libfizmo_THIS_FUNCTION_HAS_BEEN_DISABLED); (void)streams_latin1_output("\n"); } } void close_input_stream_1(void) { if (input_stream_1 != NULL) { fsi->closefile(input_stream_1); input_stream_1 = NULL; } } void opcode_input_stream(void) { TRACE_LOG("Opcode: INPUT_STREAM.\n"); if (((int16_t)op[0]) == 1) { open_input_stream_1(); } else { close_input_stream_1(); } } #endif // streams_c_INCLUDED libfizmo-0.7.15/src/interpreter/iff.c0000644000175000017500000002114413153330674017636 0ustar chrenderchrender /* iff.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // iff.c provides a simple wrapper for managing IFF files. "Simple" meaning // that it has been tailored around the needs for the quetzal save file // format and thus will almost certainly not work with other iff related // data. #include #include #include #include #include "../tools/tracelog.h" #include "../tools/i18n.h" #include "../tools/types.h" #include "../tools/filesys.h" #include "iff.h" #include "../locales/libfizmo_locales.h" static int current_mode; //static int current_form_length; static long current_chunk_offset; static char four_chars[5]; static int last_chunk_length; //static int filename_utf8_size = 0; static int read_four_chars(z_file *iff_file) { int data; int i; four_chars[4] = '\0'; for (i=0; i<4; i++) { data = fsi->readchar(iff_file); if (data == EOF) return -1; four_chars[i] = (char)data; } return 0; } bool detect_simple_iff_stream(z_file *iff_file) { if (fsi->setfilepos(iff_file, 0, SEEK_SET) == -1) return false; if (read_four_chars(iff_file) != 0) return false; if (strcmp(four_chars, "FORM") != 0) return false; if (read_chunk_length(iff_file) != 0) return false; if (read_four_chars(iff_file) != 0) return false; return true; } int init_empty_file_for_iff_write(z_file *file_to_init) { if ((fsi->writechars("FORM\0\0\0\0IFZS", 12, file_to_init)) != 12) return -1; else return 0; } z_file *open_simple_iff_file(char *filename, int mode) { z_file *iff_file; if (filename == NULL) return NULL; TRACE_LOG("Trying to open IFF file \"%s\".\n", filename); current_mode = mode; if ( (mode == IFF_MODE_READ) || (mode == IFF_MODE_READ_SAVEGAME) ) { iff_file = mode == IFF_MODE_READ_SAVEGAME ? fsi->openfile(filename, FILETYPE_SAVEGAME, FILEACCESS_READ) : fsi->openfile(filename, FILETYPE_DATA, FILEACCESS_READ); if (iff_file == NULL) return NULL; if (detect_simple_iff_stream(iff_file) == false) { (void)fsi->closefile(iff_file); return NULL; } } else if ( (mode == IFF_MODE_WRITE) || (mode == IFF_MODE_WRITE_SAVEGAME) ) { iff_file = mode == IFF_MODE_WRITE_SAVEGAME ? fsi->openfile(filename, FILETYPE_SAVEGAME, FILEACCESS_WRITE) : fsi->openfile(filename, FILETYPE_DATA, FILEACCESS_WRITE); if (iff_file == NULL) return NULL; if (init_empty_file_for_iff_write(iff_file) == -1) { (void)fsi->closefile(iff_file); return NULL; } } else { i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INVALID_IFF_ACCESS_MODE_P0D, -1, (long int)mode); /*@-unreachable@*/ return NULL; // Will never be executed, just to put compiler at ease. /*@+unreachable@*/ } return iff_file; } int get_last_chunk_length() { return last_chunk_length; } int read_chunk_length(z_file *iff_file) { last_chunk_length = read_four_byte_number(iff_file); TRACE_LOG("last_chunk_length set to %d.\n", last_chunk_length); return 0; } int start_new_chunk(char *id, z_file *iff_file) { if (fsi->writechars(id, 4, iff_file) != 4) return -1; if (fsi->writechars("\0\0\0\0", 4, iff_file) != 4) return -1; if ((current_chunk_offset = fsi->getfilepos(iff_file)) == -1) return -1; return 0; } int write_four_byte_number(uint32_t number, z_file *iff_file) { if (fsi->writechar((int)(number >> 24), iff_file) == EOF) return -1; if (fsi->writechar((int)(number >> 16), iff_file) == EOF) return -1; if (fsi->writechar((int)(number >> 8), iff_file) == EOF) return -1; if (fsi->writechar((int)(number ), iff_file) == EOF) return -1; return 0; } int end_current_chunk(z_file *iff_file) { long current_offset; long chunk_length; uint32_t chunk_length_uint32_t; if ((current_offset = fsi->getfilepos(iff_file)) == -1) return -1; chunk_length = current_offset - current_chunk_offset; TRACE_LOG("Chunk length: %ld.\n", chunk_length); if ((uint32_t)chunk_length > UINT32_MAX) return -1; chunk_length_uint32_t = (uint32_t)chunk_length; if ((chunk_length_uint32_t & 1) != 0) { // 8.4.1: If length is odd, these are followed by a single zero // byte. This byte is *not* included in the chunk length ... if (fsi->writechar(0, iff_file) == EOF) return -1; TRACE_LOG("Padding with single zero byte.\n"); } TRACE_LOG("Seeking position %ld.\n", current_chunk_offset - 4); if (fsi->setfilepos(iff_file, current_chunk_offset - 4, SEEK_SET) == -1) return -1; TRACE_LOG("Writing chunk length %d.\n", chunk_length_uint32_t); if (write_four_byte_number(chunk_length_uint32_t, iff_file) == -1) return -1; TRACE_LOG("Seeking end of file.\n"); if (fsi->setfilepos(iff_file, 0, SEEK_END) != 0) return -1; TRACE_LOG("Chunk writing finished.\n"); return 0; } int close_simple_iff_file(z_file *iff_file) { long length; uint32_t length_uint32_t; if (fsi->setfilepos(iff_file, 0, SEEK_END) == -1) return -1; if ((length = fsi->getfilepos(iff_file)) == -1) return -1; if ((uint32_t)length > UINT32_MAX) return -1; length -= 8; length_uint32_t = (uint32_t)length; if (fsi->setfilepos(iff_file, 4, SEEK_SET) == -1) return -1; if (write_four_byte_number(length_uint32_t, iff_file) == -1) return -1; if (fsi->closefile(iff_file) == EOF) return -1; return 0; } int find_chunk(char *id, z_file *iff_file) { int chunk_length; TRACE_LOG("Looking for chunk \"%s\".\n", id); if (fsi->setfilepos(iff_file, 12L, SEEK_SET) == -1) { TRACE_LOG("%s\n", strerror(errno)); return -1; } for (;;) { if (read_four_chars(iff_file) != 0) { TRACE_LOG("%s\n", strerror(errno)); return -1; } if (strcmp(id, four_chars) == 0) { TRACE_LOG("Found chunk \"%s\".\n", four_chars); return 0; } else { TRACE_LOG("Skipping chunk \"%s\".\n", four_chars); } if (read_chunk_length(iff_file) != 0) return -1; chunk_length = last_chunk_length; if ((chunk_length & 1) != 0) chunk_length++; TRACE_LOG("Skipping %d bytes.\n", chunk_length); if (fsi->setfilepos(iff_file, chunk_length, SEEK_CUR) == -1) { TRACE_LOG("%s\n", strerror(errno)); return -1; } } } uint32_t read_four_byte_number(z_file *iff_file) { int data; int i; uint32_t result = 0; for (i=0; i<4; i++) { data = fsi->readchar(iff_file); if (data == EOF) { (void)fsi->closefile(iff_file); return -1; } result |= ((uint8_t)data) << /*@-shiftnegative@*/ 8*(3-i) /*@-shiftnegative@*/ ; } return result; } char *read_form_type(z_file *iff_file) { if (fsi->setfilepos(iff_file, 8L, SEEK_SET) == -1) { TRACE_LOG("%s\n", strerror(errno)); return NULL; } if (read_four_chars(iff_file) != 0) { TRACE_LOG("%s\n", strerror(errno)); return NULL; } return four_chars; } bool is_form_type(z_file *iff_file, char* form_type) { return strcmp(read_form_type(iff_file), form_type) == 0 ? true : false; } libfizmo-0.7.15/src/interpreter/stack.h0000644000175000017500000000613113153330674020203 0ustar chrenderchrender /* stack.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef stack_h_INCLUDED #define stack_h_INCLUDED #include #include #define MAXIMUM_STACK_ENTRIES_PER_ROUTINE 65535 #ifndef stack_c_INCLUDED /*@null@*/ /*@owned@*/ extern uint16_t *z_stack; extern size_t current_z_stack_size; /*@null@*/ /*@dependent@*/ extern uint16_t *z_stack_index; /*@null@*/ /*@dependent@*/ extern uint16_t *behind_z_stack; extern int stack_words_from_active_routine; #endif /* stack_c_INCLUDED */ #ifdef ENABLE_TRACING void dump_stack_to_tracelog(); #endif // ENABLE_TRACING struct z_stack_container { size_t current_z_stack_size; /*@owned@*/ /*@null@*/ uint16_t *z_stack; /*@dependent@*/ /*@null@*/ uint16_t *z_stack_index; /*@dependent@*/ /*@null@*/ uint16_t *behind_z_stack; int stack_words_from_active_routine; }; void z_stack_push_word(uint16_t data); uint16_t z_stack_pull_word(); uint16_t z_stack_peek_word(); void drop_z_stack_words(int byte_counter); /*@only@*/ struct z_stack_container *create_new_stack(); void delete_stack_container(struct z_stack_container *stack_data); /*@dependent@*/ uint16_t *allocate_z_stack_words(uint32_t byte_counter); void restore_old_stack(/*@only@*/ struct z_stack_container *old_stack_data); void store_first_stack_frame(); void store_followup_stack_frame_header(uint8_t number_of_locals, bool discard_result, uint8_t nof_arguments_supplied, uint16_t stack_words_from_routine, uint32_t return_pc, uint8_t result_var_number); void ensure_z_stack_size(uint32_t minimum_size); #endif /* stack_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/output.h0000644000175000017500000000574413153330674020447 0ustar chrenderchrender /* output.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef output_h_INCLUDED #define output_h_INCLUDED #define STYLE_ROMAN 0 #define STYLE_REVERSE_VIDEO 1 #define STYLE_BOLD 2 #define STYLE_ITALIC 4 #define STYLE_FIXED_PITCH 8 #ifndef output_c_INCLUDED extern int16_t active_window_number; extern z_font current_font; extern z_font current_resulting_font; // current_font plus 0x11&2-evluation extern z_style lower_window_font; extern bool lower_window_buffering_active; extern z_style current_style; extern z_style upper_window_style; extern z_style lower_window_style; extern z_colour current_foreground_colour; extern z_colour current_background_colour; extern z_colour default_foreground_colour; extern z_colour default_background_colour; extern z_colour upper_window_foreground_colour; extern z_colour upper_window_background_colour; extern z_colour lower_window_foreground_colour; extern z_colour lower_window_background_colour; #endif /* output_c_INCLUDED */ void opcode_split_window(void); void opcode_set_window(void); void opcode_erase_window(void); void opcode_erase_line_value(void); void opcode_erase_line_pixels(void); void opcode_set_cursor(void); void opcode_get_cursor_array(void); void opcode_set_text_style(void); void opcode_buffer_mode(void); void opcode_set_colour_fb(void); void opcode_set_colour_fbw(void); void opcode_set_font(void); void process_set_cursor(int16_t y, int16_t x, int16_t window); #endif /* output_h_INCLUDED */ libfizmo-0.7.15/src/interpreter/fizmo.h0000644000175000017500000001061513153330674020224 0ustar chrenderchrender /* fizmo.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef fizmo_h_INCLUDED #define fizmo_h_INCLUDED #include #include #include "../screen_interface/screen_interface.h" #include "../sound_interface/sound_interface.h" #include "../blorb_interface/blorb_interface.h" #include "blockbuf.h" #define LIBFIZMO_VERSION "0.7.15" #define FIZMO_INTERPRETER_NUMBER 6 /* From: http://www.logicalshift.demon.co.uk/unix/zoom/manual/configXwin.html 1 - Infocom's internal debugging interpreter 2 - Applie IIe interpreter 3 - Macintosh 4 - Amiga (colour behaviour can change if you specify this) 5 - Atari ST 6 - IBM PC 7 - Commodore 128 8 - Commodore 64 9 - Apple IIc 10 - Apple IIgs 11 - Tandy Color */ #define FIZMO_INTERPRETER_REVISION 'b'; #define SCORE_MODE_UNKNOWN 0 #define SCORE_MODE_SCORE_AND_TURN 1 #define SCORE_MODE_TIME 2 #define OBEYS_SPEC_MAJOR_REVISION_NUMER 1 #define OBEYS_SPEC_MINOR_REVISION_NUMER 0 int fizmo_register_screen_interface( struct z_screen_interface *screen_interface); void fizmo_register_sound_interface( struct z_sound_interface *sound_interface); void fizmo_register_blorb_interface( struct z_blorb_interface *blorb_interface); #ifndef DISABLE_OUTPUT_HISTORY void fizmo_register_paragraph_attribute_function( void (*new_paragraph_attribute_function)(int *parameter1, int *parameter2)); void fizmo_register_paragraph_removal_function( void (*new_paragraph_removal_function)(int parameter1, int parameter2)); #endif // DISABLE_OUTPUT_HISTORY void fizmo_start(z_file* story_stream, z_file *blorb_stream, z_file *restore_on_start_file); void fizmo_new_screen_size(uint16_t width, uint16_t height); void write_interpreter_info_into_header(); int close_interface(z_ucs *error_message); void *fizmo_malloc(size_t size); void *fizmo_realloc(void *ptr, size_t size); char *fizmo_strdup(char *s1); int ensure_mem_size(char **ptr, int *current_size, int size); void ensure_dot_fizmo_dir_exists(); char *quote_special_chars(char *s); char *unquote_special_chars(char *s); #ifndef DISABLE_CONFIGFILES char *get_fizmo_config_dir_name(); int parse_fizmo_config_files(); #endif // DISABLE_CONFIGFILES #ifndef fizmo_c_INCLUDED extern struct commandline_parameter *interpreter_commandline_parameters[]; extern struct z_screen_interface *active_interface; extern struct z_sound_interface *active_sound_interface; extern struct z_story *active_z_story; extern uint8_t ver; extern uint8_t *header_extension_table; extern uint8_t header_extension_table_size; #ifndef DISABLE_BLOCKBUFFER extern BLOCKBUF *upper_window_buffer; #endif /* DISABLE_BLOCKBUFFER */ #ifndef DISABLE_OUTPUT_HISTORY extern void (*paragraph_attribute_function)(int *parameter1, int *parameter2); extern void (*paragraph_removal_function)(int parameter1, int parameter2); #endif // DISABLE_OUTPUT_HISTORY #endif /* fizmo_c_INCLUDED */ #endif /* fizmo_h_INCLUDED */ libfizmo-0.7.15/src/tools/0000755000175000017500000000000013153330676015523 5ustar chrenderchrenderlibfizmo-0.7.15/src/tools/list.h0000644000175000017500000000533113153330674016647 0ustar chrenderchrender /* list.h * * This file is part of fizmo. * * Copyright (c) 2010-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * * The "list" represents an arbitrary amount of pointers. In order to * generalize it and make it useable for multiple types of data the * data is stored as pointers to void. It should be noted that although void * pointers may be arbitrarily converted into other types, wild type * conversions on not-aligned objects may cause errors. Thus, the stored * objects should be malloc()ed in their correct type, then cast to void * and may then be safely stored in a "list". For usage, the list elements * have to be retrieved and then converted back to their original type. * */ #ifndef list_h_INCLUDED #define list_h_INCLUDED #include "types.h" #define LIST_INC_SIZE 32 typedef struct { void** elements; size_t nof_elements_stored; size_t space_available; } list; list *create_list(); int add_list_element(list *l, void *value); int get_list_size(list *l); void *get_list_element(list *l, int list_index); bool list_contains_element(list *haystack, void *needle); void delete_list(list *l); void **delete_list_and_get_ptrs(list *l); void **delete_list_and_get_null_terminated_ptrs(list *l); #endif /* list_h_INCLUDED */ libfizmo-0.7.15/src/tools/filesys.h0000644000175000017500000000365513153330674017361 0ustar chrenderchrender /* filesys.h * * This file is part of fizmo. * * Copyright (c) 2011-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef filesys_h_INCLUDED #define filesys_h_INCLUDED #include "types.h" #include "../filesys_interface/filesys_interface.h" #ifndef filesys_c_INCLUDED extern struct z_filesys_interface *fsi; #endif void fizmo_register_filesys_interface( struct z_filesys_interface *filesys_interface); #endif /* filesys_h_INCLUDED */ libfizmo-0.7.15/src/tools/i18n.c0000644000175000017500000011000513153330674016441 0ustar chrenderchrender /* i18n.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef i18n_c_INCLUDED #define i18n_c_INCLUDED #include #include #include #include #include "i18n.h" #include "tracelog.h" #include "z_ucs.h" #include "stringmap.h" #include "list.h" #include "filesys.h" #include "../locales/libfizmo_locales.h" #define LATIN1_TO_Z_UCS_BUFFER_SIZE 64 static z_ucs i18n_fallback_error_message[] = { 'U', 'n', 'k', 'n', 'o', 'w', 'n', ' ', 'i', '1', '8', 'n', ' ', 'e', 'r', 'r', 'o', 'r', '.', 0 }; static char *locale_aliases[4][6] = { { "en_GB", "en-GB", "en_US", "en-US", "en", NULL }, { "de_DE", "de", NULL }, { "fr_FR", "fr", NULL }, { NULL } }; //z_ucs *active_locale = NULL; static z_ucs *current_locale_name = NULL; static char *current_locale_name_in_utf8 = NULL; static char *default_locale_name_in_utf8 = NULL; static int (*stream_output_function)(z_ucs *output) = NULL; static void (*abort_function)(int exit_code, z_ucs *error_message) = NULL; static char *locale_search_path = NULL; static stringmap *locale_modules = NULL; // indexed by locale_name #ifdef I18N_DEFAULT_SEARCH_PATH char default_search_path[] = I18N_DEFAULT_SEARCH_PATH; #else char default_search_path[] = "."; #endif // I18N_DEFAULT_SEARCH_PATH void register_i18n_stream_output_function( int (*new_stream_output_function)(z_ucs *output)) { stream_output_function = new_stream_output_function; } void register_i18n_abort_function( void (*new_abort_function)(int exit_code, z_ucs *error_message)) { abort_function = new_abort_function; } static int i18n_send_output(z_ucs *z_ucs_data, int output_mode, z_ucs **string_target) { char *output; if (z_ucs_data == NULL) { return 0; } else if (output_mode == i18n_OUTPUT_MODE_STREAMS) { if (stream_output_function == NULL) { if ((output = dup_zucs_string_to_utf8_string(z_ucs_data)) == NULL) return -1; fputs(output, stdout); free(output); return 0; } else return stream_output_function(z_ucs_data); } else if (output_mode == i18n_OUTPUT_MODE_STRING) { (void)z_ucs_cpy(*string_target, z_ucs_data); *string_target += z_ucs_len(z_ucs_data); return 0; } else if (output_mode == i18n_OUTPUT_MODE_DEV_NULL) { return 0; } else { return -1; } } static z_ucs input_char(z_file *in) { z_ucs input; if ((input = parse_utf8_char_from_file(in)) == UEOF) { TRACE_LOG("Premature end of file.\n"); exit(-1); } return (z_ucs)input; } static locale_module *parse_locale_file(z_ucs *module_name, char* locale_dir_name, char* module_name_utf8) { char *filename; z_file *in; z_ucs *locale_data; locale_module *result; int in_char; long nof_zucs_chars; z_ucs input; z_ucs *linestart; list *lines; TRACE_LOG("locale_dir_name: \"%s\".\n", locale_dir_name); TRACE_LOG("module_name_utf8: \"%s\".\n", module_name_utf8); // open-resource: if ((filename = malloc(strlen(locale_dir_name) + strlen(module_name_utf8) + 2)) == NULL) { // exit-point: TRACE_LOG("malloc() returned NULL.\n"); return NULL; } TRACE_LOG("locale_dir_name: \"%s\".\n", locale_dir_name); TRACE_LOG("module_name_utf8: \"%s\".\n", module_name_utf8); strcpy(filename, locale_dir_name); strcat(filename, "/"); strcat(filename, module_name_utf8); TRACE_LOG("Parsing locale file \"%s\".\n", filename); // open-resource: if ((in = fsi->openfile(filename, FILETYPE_DATA, FILEACCESS_READ)) == NULL) { // exit-point: TRACE_LOG("openfile(\"%s\") returned NULL.\n", filename); free(filename); return NULL; } nof_zucs_chars = 0; while ((parse_utf8_char_from_file(in)) != UEOF) nof_zucs_chars++; nof_zucs_chars++; // Add space for terminating zero (yes, really required). if (fsi->setfilepos(in, 0, SEEK_SET) == -1) { // exit-point: TRACE_LOG("setfilepos() returned -1.\n"); fsi->closefile(in); free(filename); return NULL; } TRACE_LOG("Allocating space for %ld z_ucs chars.\n", nof_zucs_chars); // open-resource: if ((locale_data = malloc(nof_zucs_chars * sizeof(z_ucs))) == NULL) { // exit-point: TRACE_LOG("malloc(%ld) returned NULL.\n", nof_zucs_chars * sizeof(z_ucs)); fsi->closefile(in); free(filename); return NULL; } TRACE_LOG("Locale data at %p, ends at %p.\n", locale_data, locale_data+nof_zucs_chars); // open-resource: if ((result = malloc(sizeof(locale_module))) == NULL) { // exit-point: free(locale_data); fsi->closefile(in); free(filename); return NULL; } TRACE_LOG("New module at %p.\n", result); result->locale_data = locale_data; TRACE_LOG("Locale data starts at %p.\n", locale_data); /* --- */ // open-resource: lines = create_list(); //printf("new list created: %p\n", lines); in_char = fsi->readchar(in); while (in_char != EOF) { linestart = locale_data; // Found a new line. fsi->unreadchar(in_char, in); for (;;) { input = input_char(in); if (input == Z_UCS_BACKSLASH) { //*locale_data++ = input; input = input_char(in); if (input == Z_UCS_BACKSLASH) { *locale_data++ = Z_UCS_BACKSLASH; } else if (input == 'n') { *locale_data++ = Z_UCS_NEWLINE; } else if (input == '{') { *locale_data++ = Z_UCS_BACKSLASH; *locale_data++ = (z_ucs)'{'; input = input_char(in); if ((input < 0x30) && (input > 0x39)) { fprintf(stderr, "Variable number expected.\n"); exit(EXIT_FAILURE); } *locale_data++ = input; input = input_char(in); if ( (input != (z_ucs)'s') && (input != (z_ucs)'d') && (input != (z_ucs)'x') && (input != (z_ucs)'z') ) { fprintf(stderr, "Invalid parameter type.\n"); exit(EXIT_FAILURE); } *locale_data++ = input; input = input_char(in); if (input != (z_ucs)'}') { fprintf(stderr, "Expected '}'.\n"); exit(EXIT_FAILURE); } *locale_data++ = (z_ucs)'}'; } else { fprintf(stderr, "Undefined control sequence \\%c.\n",(char)input); exit(EXIT_FAILURE); } } else if (input == Z_UCS_NEWLINE) { *locale_data++ = 0; TRACE_LOG("New line at %p.\n", linestart); add_list_element(lines, (void*)linestart); //TRACE_LOG_Z_UCS(linestart); break; } else { // Here we've found some "normal" output. *locale_data++ = (z_ucs)input; } } //messages_processed++; in_char = fsi->readchar(in); } *locale_data = 0; TRACE_LOG("Wirte last byte at %p.\n", locale_data); /* --- */ TRACE_LOG("Read %d lines.\n", get_list_size(lines)); // close-resource(l), open-resource(result->messages): result->nof_messages = get_list_size(lines); result->messages = (z_ucs**)delete_list_and_get_ptrs(lines); TRACE_LOG("Messages at %p.\n", result->messages); TRACE_LOG("First msg at %p.\n", result->messages[0]); if ((result->module_name = malloc(sizeof(z_ucs) * (z_ucs_len(module_name)+1))) == NULL) { // exit-point: free(result->messages); free(result); free(locale_data); fsi->closefile(in); free(filename); return NULL; } z_ucs_cpy(result->module_name, module_name); // close-resource: fsi->closefile(in); // close-resource: free(filename); TRACE_LOG("Returning new module at %p.\n", result); return result; } static void delete_locale_module(locale_module *module) { TRACE_LOG("Deleting locale module at %p.\n", module); free(module->messages); free(module->locale_data); free(module->module_name); free(module); } // Returns malloc()ed string which needs to be free()d later. static char *get_path_for_locale(z_ucs *locale_name) { z_dir *dir; char *search_path; z_ucs *search_path_zucs, *path_ptr, *colon_index, *zucs_ptr; z_ucs *zucs_buf = NULL; size_t bufsize = 0, len, dirname_len; struct z_dir_ent z_dir_entry; char *dirname; char *locale_name_utf8, *locale_dir_name = NULL; search_path = locale_search_path == NULL ? default_search_path : locale_search_path; search_path_zucs = dup_utf8_string_to_zucs_string(search_path); path_ptr = search_path_zucs; TRACE_LOG("Search path: \""); TRACE_LOG_Z_UCS(search_path_zucs); TRACE_LOG("'.\n"); // open-resource: locale_name_utf8 = dup_zucs_string_to_utf8_string(locale_name); while (*path_ptr != 0) { colon_index = z_ucs_chr(path_ptr, Z_UCS_COLON); len = colon_index == NULL ? z_ucs_len(path_ptr) : (size_t)(colon_index - path_ptr); TRACE_LOG("len: %ld\n", (long)len); if (len > 0) { if (bufsize < len + 1) { TRACE_LOG("realloc buf for %ld chars / %ld bytes.\n", (long)len + 1, (long)sizeof(z_ucs) * (len + 1)); // open-resource: if ((zucs_ptr = realloc(zucs_buf, sizeof(z_ucs) * (len + 1))) == NULL) { // exit-point: TRACE_LOG("realloc() returned NULL.\n"); free(zucs_buf); free(locale_name_utf8); free(path_ptr); return NULL; } bufsize = len + 1; zucs_buf = zucs_ptr; } z_ucs_ncpy(zucs_buf, path_ptr, len); zucs_buf[len] = 0; // open-resource: if ((dirname = dup_zucs_string_to_utf8_string(zucs_buf)) == NULL) { // exit-point: TRACE_LOG("dup_zucs_string_to_utf8_string() returned NULL.\n"); free(zucs_buf); free(locale_name_utf8); free(path_ptr); return NULL; } TRACE_LOG("Path: '%s'\n", dirname); // open-resource: if ((dir = fsi->open_dir(dirname)) != NULL) { while (fsi->read_dir(&z_dir_entry, dir) == 0) { TRACE_LOG("Processing \"%s\".\n", z_dir_entry.d_name); if (strcasecmp(locale_name_utf8, z_dir_entry.d_name) == 0) { dirname_len = strlen(dirname) + strlen(z_dir_entry.d_name); TRACE_LOG("dirname_len: %ld.\n", (long)dirname_len); // open-resource: if ((locale_dir_name = malloc(dirname_len + 2)) == NULL) { // exit-point: TRACE_LOG("malloc() returned NULL.\n"); fsi->close_dir(dir); free(dirname); free(zucs_buf); free(locale_name_utf8); free(path_ptr); return NULL; } strcpy(locale_dir_name, dirname); strcat(locale_dir_name, "/"); strcat(locale_dir_name, z_dir_entry.d_name); break; } } // close-resource: fsi->close_dir(dir); } // close-resource: free(dirname); } if (locale_dir_name != NULL) break; path_ptr += len + (colon_index != NULL ? 1 : 0); } free(search_path_zucs); // close-resource: free(locale_name_utf8); // close-resource: free(zucs_buf); //TRACE_LOG("res:'"); //TRACE_LOG_Z_UCS(locale_dir_name); //TRACE_LOG("\n"); return locale_dir_name; } static locale_module *create_locale_module(z_ucs *locale_name, z_ucs *module_name) { z_dir *dir; locale_module *result = NULL; char *ptr; struct z_dir_ent z_dir_entry; char *module_name_utf8, *locale_dir_name = NULL; stringmap *module_map; TRACE_LOG("Creating module '"); TRACE_LOG_Z_UCS(module_name); TRACE_LOG("' for locale '"); TRACE_LOG_Z_UCS(locale_name); TRACE_LOG("'.\n"); if ((locale_dir_name = get_path_for_locale(locale_name)) == NULL) { // No directory containing an entry named equal to local name was foudn. TRACE_LOG("locale_dir_name is NULL.\n"); return NULL; } // open-resource: module_name_utf8 = dup_zucs_string_to_utf8_string(module_name); if ((ptr = realloc(module_name_utf8, strlen(module_name_utf8) + 9)) == NULL) { TRACE_LOG("realloc() returned NULL.\n"); free(module_name_utf8); free(locale_dir_name); return NULL; } module_name_utf8 = ptr; strcat(module_name_utf8, "_i18n.txt"); // open-resource: if ((dir = fsi->open_dir(locale_dir_name)) != NULL) { TRACE_LOG("Trying file \"%s\".\n", module_name_utf8); while (fsi->read_dir(&z_dir_entry, dir) == 0) { if (strcasecmp(module_name_utf8, z_dir_entry.d_name) == 0) { TRACE_LOG("File matches \"%s\".\n", module_name_utf8); if ((result = parse_locale_file( module_name, locale_dir_name, module_name_utf8)) == NULL) { TRACE_LOG("parse_locale_file() returned NULL.\n"); fsi->close_dir(dir); free(module_name_utf8); free(locale_dir_name); return NULL; } } } // close-resource: fsi->close_dir(dir); } // close-resource: free(module_name_utf8); // close-resource: free(locale_dir_name); if (result == NULL) { TRACE_LOG("Could not find module'"); TRACE_LOG_Z_UCS(module_name); TRACE_LOG("'.\n"); return NULL; } if (locale_modules == NULL) locale_modules = create_stringmap(); if ((module_map = (stringmap*)get_stringmap_value(locale_modules, locale_name)) == NULL) { module_map = create_stringmap(); if ((add_stringmap_element(locale_modules, locale_name, module_map)) != 0) { TRACE_LOG("add_stringmap_element() failed.\n"); delete_locale_module(result); } } if (add_stringmap_element(module_map, module_name, result) != 0) { TRACE_LOG("add_stringmap_element() failed.\n"); delete_locale_module(result); } return result; } static locale_module *get_locale_module(z_ucs *locale_name, z_ucs *module_name) { stringmap *module_map; locale_module *result = NULL; TRACE_LOG("Getting module '"); TRACE_LOG_Z_UCS(module_name); TRACE_LOG("' for locale '"); TRACE_LOG_Z_UCS(locale_name); TRACE_LOG("'.\n"); if ( (locale_modules != NULL) && ((module_map = (stringmap*)get_stringmap_value(locale_modules, locale_name)) != NULL) ) result = (locale_module*)get_stringmap_value(module_map, module_name); if (result == NULL) result = create_locale_module(locale_name, module_name); return result; } static void i18n_exit(int exit_code, z_ucs *error_message) { char *output; if ( (error_message == NULL) || (*error_message == 0) ) error_message = i18n_fallback_error_message; if (abort_function != NULL) { TRACE_LOG("Aborting using custom abort function.\n"); abort_function(exit_code, error_message); } else { TRACE_LOG("Aborting using default method: fputs and exit(code).\n"); if ((output = dup_zucs_string_to_utf8_string(error_message)) != NULL) { fputs(output, stderr); free(output); } } exit(exit_code); } char *get_default_locale_name() { if (default_locale_name_in_utf8 == NULL) if ((default_locale_name_in_utf8 = dup_zucs_string_to_utf8_string(default_locale_name)) == NULL) return NULL; return default_locale_name_in_utf8; } // "string_code" is one of the codes defined in "utf8.h". // "ap" is the va_list initialized in the various i18n-methods. // "output_mode" is either "i18n_OUTPUT_MODE_DEV_NULL" for no output // at all (useful for string length measuring), "i18n_OUTPUT_MODE_STREAMS" // for sending output to "streams_utf8_output" and "i18n_OUTPUT_MODE_STRING" // to write the output to a string. static long i18n_translate_from_va_list(z_ucs *module_name, int string_code, va_list ap, int output_mode, z_ucs *string_target) { z_ucs *locale_name; locale_module *module; z_ucs *index; char parameter_types[11]; // May each contain 's', 'z' or 'd'. Using 11 // instead of ten so that a null byte may be // placed after a char to print the error // message as string. char *string_parameters[10]; // pointers to the parameters. z_ucs *z_ucs_string_parameters[10]; char formatted_parameters[10][MAXIMUM_FORMATTED_PARAMTER_LENGTH + 1]; z_ucs *start; uint8_t match_stage; int i,k; int n; z_ucs buf; size_t length; z_ucs *start_index; char index_char; z_ucs z_ucs_buffer[LATIN1_TO_Z_UCS_BUFFER_SIZE]; char *ptr; locale_name = current_locale_name != NULL ? current_locale_name : default_locale_name; TRACE_LOG("Trying to get module '"); TRACE_LOG_Z_UCS(module_name); TRACE_LOG("' for locale '"); TRACE_LOG_Z_UCS(locale_name); TRACE_LOG("'.\n"); if ((module = get_locale_module(locale_name, module_name)) == NULL) { TRACE_LOG("Module not found.\n"); i18n_exit(-1, NULL); } TRACE_LOG("Got module at %p with %d messages at %p.\n", module, module->nof_messages, module->messages); if (string_code >= module->nof_messages) { TRACE_LOG("String %d code too large, exiting.\n", string_code); i18n_exit(-1, NULL); } index = module->messages[string_code]; if (index == NULL) return -1; TRACE_LOG("Translating string code %d at %p.\n", string_code, index); n = 0; while ((index = z_ucs_chr(index, (z_ucs)'\\')) != NULL) { index++; start_index = index; index_char = zucs_char_to_latin1_char(*index); if (index_char == '{') { TRACE_LOG("'{' found.\n"); index++; index_char = zucs_char_to_latin1_char(*index); } else { index = start_index; continue; } if ((index_char >= '0') && (index_char <= '9')) { TRACE_LOG("'[0-9]' found.\n"); index++; index_char = zucs_char_to_latin1_char(*index); } else { index = start_index; continue; } if ( (index_char == 's') || (index_char == 'z') || (index_char == 'd') || (index_char == 'x') ) { TRACE_LOG("'[szdx]' found.\n"); parameter_types[n] = index_char; index++; index_char = zucs_char_to_latin1_char(*index); } else { index = start_index; continue; } if (index_char == '}') { TRACE_LOG("'}' found.\n"); index++; index_char = zucs_char_to_latin1_char(*index); n++; } else { index = start_index; continue; } } TRACE_LOG("Found %d parameter codes.\n", n); if (n == 0) { TRACE_LOG("No parameter.\n"); // In case we don't have a single parameter, we can just print // everything right away and quit. if (i18n_send_output( module->messages[string_code], output_mode, (string_target != NULL ? &string_target : NULL)) != 0) return -1; else return z_ucs_len(module->messages[string_code]); } length = 0; for (i=0; imessages[string_code]; i = 0; match_stage = 0; while (start[i] != 0) { if (match_stage == 1) { // We've already found a leading backslash. if ((start[i] == Z_UCS_BACKSLASH) && (match_stage == 1)) { // Found another backslash, so output. (void)latin1_string_to_zucs_string( z_ucs_buffer, "\\", LATIN1_TO_Z_UCS_BUFFER_SIZE); if (i18n_send_output(z_ucs_buffer, output_mode, (string_target != NULL ? &string_target : NULL)) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -1, "i18n_send_output"); match_stage = 0; length++; i++; } else if (start[i] == (z_ucs)'{') { // Here we've found a parameter. First, output everything up to // the parameter excluding "\{". In order to achive that, we'll // replace the first byte that shouldn't be printed with the // string-terminating 0 and restore it after that for the next // use of this message. buf = start[i-1]; start[i-1] = 0; if (i18n_send_output( start, output_mode, (string_target != NULL ? &string_target : NULL)) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -1, "i18n_send_output"); length += z_ucs_len(start); start[i-1] = buf; // After that, output parameter (subtract 0x30 == ASCII:'0') k = (int)(start[i+1] - 0x30); if (parameter_types[k] == 's') { ptr = string_parameters[k]; TRACE_LOG("%s\n", ptr); while (ptr != NULL) { ptr = latin1_string_to_zucs_string( z_ucs_buffer, ptr, LATIN1_TO_Z_UCS_BUFFER_SIZE); if (i18n_send_output( z_ucs_buffer, output_mode, (string_target != NULL ? &string_target : NULL)) !=0 ) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -1, "i18n_send_output"); } } else if (parameter_types[k] == 'z') { if (i18n_send_output( z_ucs_string_parameters[k], output_mode, (string_target != NULL ? &string_target : NULL)) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -1, "i18n_send_output"); } else { ptr = formatted_parameters[k]; while (ptr != NULL) { ptr = latin1_string_to_zucs_string( z_ucs_buffer, ptr, LATIN1_TO_Z_UCS_BUFFER_SIZE); if (i18n_send_output( z_ucs_buffer, output_mode, (string_target != NULL ? &string_target : NULL)) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -1, "i18n_send_output"); } } start += i + 4; i = 0; match_stage = 0; } else { i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_INVALID_BACKSLASH_SEQUENCE_IN_LOCALIZATION_DATA, -1); } } else { if ((start[i] == Z_UCS_BACKSLASH) && (match_stage == 0)) { // Found leading backslash; match_stage = 1; i++; } else { // Found nothing, next char (non memchar since operating on z_ucs) i++; } } } if (i != 0) { if (i18n_send_output( start, output_mode, (string_target != NULL ? &string_target : NULL)) != 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR, -1, "i18n_send_output"); } length += z_ucs_len(start); TRACE_LOG("Final length:%zd.\n", length); return length; } void i18n_translate_and_exit( z_ucs *module_name, int string_code, int exit_code, ...) { va_list ap; size_t message_length; z_ucs *error_message; TRACE_LOG("Exiting with message code %d.\n", string_code); va_start(ap, exit_code); message_length = i18n_translate_from_va_list( module_name, string_code, ap, i18n_OUTPUT_MODE_DEV_NULL, NULL); va_end(ap); TRACE_LOG("Message length: %zu.\n", message_length); if ((error_message = (z_ucs*)malloc((message_length+3) * sizeof(z_ucs))) == NULL) return; TRACE_LOG("Error message at: %p.\n", error_message); va_start(ap, exit_code); // Translate message into "error_message": if (i18n_translate_from_va_list( module_name, string_code, ap, i18n_OUTPUT_MODE_STRING, error_message) < 0) { TRACE_LOG("Code < 0\n"); free(error_message); i18n_exit(exit_code, NULL); } va_end(ap); TRACE_LOG("Exit message: \""); // error_message is now defined: TRACE_LOG_Z_UCS(error_message); TRACE_LOG("\".\n"); error_message[message_length] = Z_UCS_NEWLINE; error_message[message_length+1] = 0; i18n_exit(exit_code, error_message); } size_t _i18n_va_translate(z_ucs *module_name, int string_code, va_list ap) { return i18n_translate_from_va_list( module_name, string_code, ap, i18n_OUTPUT_MODE_STREAMS, NULL); } size_t i18n_translate(z_ucs *module_name, int string_code, ...) { va_list ap; size_t result; va_start(ap, string_code); result = _i18n_va_translate(module_name, string_code, ap); va_end(ap); return result; } size_t i18n_message_length(z_ucs *module_name, int string_code, ...) { va_list ap; size_t result; va_start(ap, string_code); result = i18n_translate_from_va_list( module_name, string_code, ap, i18n_OUTPUT_MODE_DEV_NULL, NULL); va_end(ap); return result; } // Returnes malloc()ed string which needs to be free()d later on. z_ucs *i18n_translate_to_string(z_ucs* module_name, int string_code, ...) { va_list ap; size_t message_length; z_ucs *result; va_start(ap, string_code); if ((message_length = i18n_translate_from_va_list( module_name, string_code, ap, i18n_OUTPUT_MODE_DEV_NULL, NULL)) < 1) return NULL; va_end(ap); if ((result = (z_ucs*)malloc((message_length+1) * sizeof(z_ucs))) == NULL) return NULL; va_start(ap, string_code); // The "i18n_translate_from_va_list"-call defines "result". if (i18n_translate_from_va_list( module_name, string_code, ap, i18n_OUTPUT_MODE_STRING, result) == -1) { free(result); return NULL; } va_end(ap); return result; } char *get_i18n_search_path() { return locale_search_path == NULL ? default_search_path : locale_search_path; } int set_i18n_search_path(char *path) { char *path_dup; if ((path_dup = strdup(path)) == NULL) return -1; if (locale_search_path != NULL) free(locale_search_path); locale_search_path = path_dup; TRACE_LOG("New search path: \"%s\".\n", locale_search_path); return 0; } char **get_available_locale_names() { z_dir *dir; char *search_path; z_ucs *search_path_zucs, *path_ptr, *colon_index, *zucs_ptr; z_ucs *zucs_buf = NULL; size_t bufsize = 0, len; struct z_dir_ent z_dir_entry; char *dirname; list *result_list = create_list(); char *new_locale_name; int j; search_path = locale_search_path == NULL ? default_search_path : locale_search_path; search_path_zucs = dup_utf8_string_to_zucs_string(search_path); TRACE_LOG("Search path: \""); TRACE_LOG_Z_UCS(search_path_zucs); TRACE_LOG("'.\n"); path_ptr = search_path_zucs; while (*path_ptr != 0) { colon_index = z_ucs_chr(path_ptr, Z_UCS_COLON); len = colon_index == NULL ? z_ucs_len(path_ptr) : (size_t)(colon_index - path_ptr); TRACE_LOG("len: %ld\n", (long)len); if (len > 0) { if (bufsize < len + 1) { TRACE_LOG("realloc buf for %ld chars / %ld bytes.\n", (long)len + 1, (long)sizeof(z_ucs) * (len + 1)); // open-resource: if ((zucs_ptr = realloc(zucs_buf, sizeof(z_ucs) * (len + 1))) == NULL) { // exit-point: TRACE_LOG("realloc() returned NULL.\n"); free(zucs_buf); free(path_ptr); for (j=0; jopen_dir(dirname)) != NULL) { while (fsi->read_dir(&z_dir_entry, dir) == 0) { TRACE_LOG("Processing \"%s\".\n", z_dir_entry.d_name); if ( (strcmp(".", z_dir_entry.d_name) != 0) && (strcmp("..", z_dir_entry.d_name) != 0) ) { for (j=0; jclose_dir(dir); } // close-resource: free(dirname); } path_ptr += len + (colon_index != NULL ? 1 : 0); } free(search_path_zucs); // close-resource: free(zucs_buf); //TRACE_LOG("res:'"); //TRACE_LOG_Z_UCS(locale_dir_name); //TRACE_LOG("\n"); return (char**)delete_list_and_get_null_terminated_ptrs(result_list); } z_ucs *get_current_locale_name() { return current_locale_name != NULL ? current_locale_name : default_locale_name; } char *get_current_locale_name_in_utf8() { return current_locale_name_in_utf8 != NULL ? current_locale_name_in_utf8 : get_default_locale_name(); } int set_current_locale_name(char *new_locale_name) { char *locale_dir_name = NULL; z_ucs *locale_dup; char *locale_dup_utf8; int i, j; if (new_locale_name == NULL) return -1; // Check if the locale name given was an alias: If, in case "en" was // given as locale name, this should be interpreted as "en_GB" instead -- // see the "locale_aliases" definition above. i = 0; while (locale_aliases[i][0] != NULL) { // Test all aliases for current locale name: j = 1; while (locale_aliases[i][j] != NULL) { if (strcmp(locale_aliases[i][j], new_locale_name) == 0) break; j++; } if (locale_aliases[i][j] != NULL) { // We've found an alias. new_locale_name = locale_aliases[i][0]; TRACE_LOG("Locale name \"%s\" is an alias for \"%s\".\n", new_locale_name, new_locale_name); break; } i++; } if ((locale_dup = dup_utf8_string_to_zucs_string(new_locale_name)) == NULL) return -1; if ((locale_dup_utf8 = strdup(new_locale_name)) == NULL) { free(locale_dup); free(locale_dup_utf8); return -1; } if ((locale_dir_name = get_path_for_locale(locale_dup)) == NULL) { free(locale_dup); free(locale_dup_utf8); return -1; } free(locale_dir_name); if (current_locale_name != NULL) { free(current_locale_name); free(current_locale_name_in_utf8); } current_locale_name = locale_dup; current_locale_name_in_utf8 = strdup(locale_dup_utf8); TRACE_LOG("New locale name: '"); TRACE_LOG_Z_UCS(current_locale_name); TRACE_LOG("'.\n"); return 0; } char *get_i18n_default_search_path(void) { return default_search_path; } void free_i18n_memory(void) { z_ucs **locale_names, **locale_name; z_ucs **module_names, **module_name; stringmap *module_map; locale_module *module= NULL; if (locale_modules != NULL) { locale_names = get_names_in_stringmap(locale_modules); locale_name = locale_names; while (*locale_name != NULL) { module_map = (stringmap*)get_stringmap_value(locale_modules,*locale_name); module_names = get_names_in_stringmap(module_map); module_name = module_names; while (*module_name != NULL) { module = (locale_module*)get_stringmap_value(module_map, *module_name); delete_locale_module(module); module_name++; } free(module_names); delete_stringmap(module_map); locale_name++; } free(locale_names); delete_stringmap(locale_modules); locale_modules = NULL; } if (current_locale_name != NULL) { free(current_locale_name); current_locale_name = NULL; free(current_locale_name_in_utf8); current_locale_name_in_utf8 = NULL; } if (default_locale_name_in_utf8 == NULL) { free(default_locale_name_in_utf8); default_locale_name_in_utf8 = NULL; } } #endif /* i18n_c_INCLUDED */ libfizmo-0.7.15/src/tools/tracelog.h0000644000175000017500000000445613153330674017503 0ustar chrenderchrender /* tracelog.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef tracelog_h_INCLUDED #define tracelog_h_INCLUDED #include #include #include #include "types.h" #include "filesys.h" #define DEFAULT_TRACE_FILE_NAME "tracelog.txt" #ifndef tracelog_c_INCLUDED extern z_file *stream_t; #endif // tracelog_c_INCLUDED #ifdef ENABLE_TRACING #define TRACE_LOG(...) \ if (stream_t != NULL) \ { fsi->fileprintf(stream_t, __VA_ARGS__); fsi->flushfile(stream_t); } #define TRACE_LOG_Z_UCS _trace_log_z_ucs void turn_on_trace(void); void turn_off_trace(void); void _trace_log_z_ucs(z_ucs *output); #else /* ENABLE_TRACING */ #define TRACE_LOG(...) ; #define TRACE_LOG_Z_UCS(...) ; #endif /* ENABLE_TRACING */ #endif // tracelog_h_INCLUDED libfizmo-0.7.15/src/tools/unused.h0000644000175000017500000000357213153330674017204 0ustar chrenderchrender /* unused.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef unused_h_INCLUDED #define unused_h_INCLUDED #ifdef UNUSED #elif defined(__GNUC__) # define UNUSED(x) UNUSED_ ## x __attribute__((unused)) #elif defined(__LCLINT__) # define UNUSED(x) /*@unused@*/ x #else # define UNUSED(x) x #endif #endif // unused_h_INCLUDED libfizmo-0.7.15/src/tools/stringmap.c0000644000175000017500000001035513153330674017675 0ustar chrenderchrender /* stringmap.c * * This file is part of fizmo. * * Copyright (c) 2010-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef stringmap_c_INCLUDED #define stringmap_c_INCLUDED #include #include "stringmap.h" #include "types.h" #include "z_ucs.h" #include "tracelog.h" stringmap *create_stringmap() { stringmap *result; if ((result = malloc(sizeof(stringmap))) == NULL) return NULL; result->elements = NULL; result->nof_elements_stored = 0; result->space_available = 0; return result; } static int get_stringmap_value_index(stringmap *map, z_ucs *name) { size_t i; TRACE_LOG("Looking for value with key '"); TRACE_LOG_Z_UCS(name); TRACE_LOG("'.\n"); if ( (map == NULL) || (name == NULL) ) return -1; for (i=0; inof_elements_stored; i++) { TRACE_LOG("Found '"); TRACE_LOG_Z_UCS(map->elements[i]->name); TRACE_LOG("'.\n"); if (z_ucs_cmp(map->elements[i]->name, name) == 0) { TRACE_LOG("Successfully found key at index %ld.\n", (long int)i); return i; } } return -1; } int add_stringmap_element(stringmap *map, z_ucs *name, void *value) { stringmap_element *element_ptr; stringmap_element **element_ptr_ptr; if (get_stringmap_value_index(map, name) >= 0) return -1; if (map->nof_elements_stored == map->space_available) { if ((element_ptr_ptr = realloc( map->elements, sizeof(stringmap_element) * map->space_available + MAP_INC_SIZE)) == NULL) return -1; map->elements = element_ptr_ptr; map->space_available += MAP_INC_SIZE; } if ((element_ptr = malloc(sizeof(stringmap_element))) == NULL) return -1; if ((element_ptr->name = z_ucs_dup(name)) == NULL) { free(element_ptr); return -1; } element_ptr->value = value; map->elements[map->nof_elements_stored] = element_ptr; TRACE_LOG("Stored new value with key '"); TRACE_LOG_Z_UCS(element_ptr->name); TRACE_LOG("'.\n"); map->nof_elements_stored++; return 0; } void *get_stringmap_value(stringmap *map, z_ucs *name) { int result_index = get_stringmap_value_index(map, name); return result_index >= 0 ? map->elements[result_index]->value : NULL; } z_ucs **get_names_in_stringmap(stringmap *map) { z_ucs **result; size_t i; if (map->nof_elements_stored == 0) return NULL; if ((result = malloc(sizeof(z_ucs*) * (map->nof_elements_stored+1))) == NULL) return NULL; for (i=0; inof_elements_stored; i++) result[i] = map->elements[i]->name; result[i] = NULL; return result; } void delete_stringmap(stringmap *map) { size_t i; if (map == NULL) return; for (i=0; inof_elements_stored; i++) free(map->elements[i]); free(map->elements); } #endif /* stringmap_c_INCLUDED */ libfizmo-0.7.15/src/tools/types.h0000644000175000017500000001221513153330674017037 0ustar chrenderchrender /* types.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef types_h_INCLUDED #define types_h_INCLUDED #include #include #include // for time_t #include // for off_t #define Z_COLOUR_UNDEFINED -2 #define Z_COLOUR_UNDER_CURSOR -1 #define Z_COLOUR_CURRENT 0 #define Z_COLOUR_DEFAULT 1 #define Z_COLOUR_BLACK 2 #define Z_COLOUR_RED 3 #define Z_COLOUR_GREEN 4 #define Z_COLOUR_YELLOW 5 #define Z_COLOUR_BLUE 6 #define Z_COLOUR_MAGENTA 7 #define Z_COLOUR_CYAN 8 #define Z_COLOUR_WHITE 9 #define Z_COLOUR_MSDOS_DARKISH_GREY 10 #define Z_COLOUR_AMIGA_LIGHT_GREY 10 #define Z_COLOUR_MEDIUM_GREY 11 #define Z_COLOUR_DARK_GREY 12 #define Z_INVALID_RGB_COLOUR 0xffffffff; #define Z_FONT_PREVIOUS_FONT 0 #define Z_FONT_NORMAL 1 #define Z_FONT_PICTURE 2 #define Z_FONT_CHARACTER_GRAPHICS 3 #define Z_FONT_COURIER_FIXED_PITCH 4 #define Z_STYLE_ROMAN 0 #define Z_STYLE_REVERSE_VIDEO 1 #define Z_STYLE_BOLD 2 #define Z_STYLE_ITALIC 4 #define Z_STYLE_FIXED_PITCH 8 #define Z_BLORB_TYPE_PICT 0 #define Z_BLORB_TYPE_SOUND 1 #define Z_BLORB_TYPE_EXEC 2 #define bool_equal(a,b) ((a) ? (b) : !(b)) //#define FIZMO_UNIQUE_EXIT_CODE(filecode) (-(((filecode) << 16) | __LINE__)) //#define FIZMO_UNIQUE_EXIT_CODE(filecode) (__LINE__) #define NOF_Z_COLOURS 8 typedef uint8_t zscii; typedef uint32_t z_ucs; typedef int16_t z_colour; typedef int16_t z_font; typedef int16_t z_style; typedef uint32_t z_rgb_colour; struct commandline_parameter { char* short_parameter_name; char* long_parameter_name; int i18n_description_code; }; struct z_file_struct { void *file_object; // Used to store z_filesys_interface-dependent data. char *filename; int filetype; int fileaccess; int implementation; // used by glk_if }; typedef struct z_file_struct z_file; struct z_dir_struct { void *dir_object; }; typedef struct z_dir_struct z_dir; struct z_dir_ent { // Using only d_name since "this is the only field you can count on in // all POSIX systems". char *d_name; }; struct z_blorb_map_struct { void *blorb_map_implementation; }; typedef struct z_blorb_map_struct z_blorb_map; struct z_story { uint8_t *memory; uint8_t version; uint16_t release_code; char serial_code[7]; uint16_t checksum; char *title; z_file *z_story_file; z_file *blorb_file; z_blorb_map *blorb_map; //char *absolute_directory_name; char *absolute_file_name; long story_file_exec_offset; uint8_t *dynamic_memory_end; uint8_t *static_memory; uint8_t *static_memory_end; uint8_t *high_memory; uint8_t *high_memory_end; uint32_t routine_offset; uint32_t string_offset; uint8_t *global_variables; uint8_t *abbreviations_table; uint8_t *property_defaults; uint8_t *object_tree; uint8_t object_size; uint16_t maximum_object_number; uint8_t maximum_property_number; uint8_t maximum_attribute_number; uint8_t object_node_number_index; uint8_t object_property_index; uint8_t *alphabet_table; uint8_t *dictionary_table; uint8_t score_mode; /* int nof_sounds; int nof_images; int frontispiece_image_no; struct z_story_blorb_sound *blorb_sounds; struct z_story_blorb_image *blorb_images; */ int max_nof_color_pairs; }; extern char* z_colour_names[]; bool is_regular_z_colour(z_colour colour); short color_name_to_z_colour(char *colour_name); z_rgb_colour new_z_rgb_colour(uint8_t red, uint8_t green, uint8_t blue); z_rgb_colour z_to_rgb_colour(z_colour z_colour_to_convert); uint8_t red_from_z_rgb_colour(z_rgb_colour rgb_colour); uint8_t green_from_z_rgb_colour(z_rgb_colour rgb_colour); uint8_t blue_from_z_rgb_colour(z_rgb_colour rgb_colour); #endif /* types_h_INCLUDED */ libfizmo-0.7.15/src/tools/tools_test.c0000644000175000017500000000652213153330674020071 0ustar chrenderchrender /* tools_test.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef tools_test_c_INCLUDED #define tools_test_c_INCLUDED #include #include "i18n.h" #include "tracelog.h" #include "z_ucs.h" #include "unused.h" #include "../locales/libfizmo_locales.h" #define STREAM_BUFSIZE 128 int i18n_test_stream_output(z_ucs *output) { int len; char buf[STREAM_BUFSIZE]; while (*output != 0) { len = zucs_string_to_utf8_string(buf, &output, STREAM_BUFSIZE); fwrite(buf, 1, len-1, stdout); } return 0; } int main(int UNUSED(argc), char *UNUSED(argv[])) { z_ucs *path; z_ucs german_locale_name[] = { 'd', 'e', '_', 'D', 'E', 0 }; printf("\nStarting tools-test.\n"); turn_on_trace(); if ((path = dup_latin1_string_to_zucs_string("../locales")) == NULL) return -1; set_i18n_search_path(path); free(path); register_i18n_stream_output_function(&i18n_test_stream_output); printf("\nTrying to display first localized error message:\n "); TRACE_LOG("Starting tools_test.\n"); i18n_translate( libfizmo_module_name, i18n_libfizmo_COULD_NOT_OPEN_TRACE_FILE_P0S, "foo1"); printf("\n\nTrying to display second localized error message:\n "); i18n_translate( libfizmo_module_name, i18n_libfizmo_INVALID_PARAMETER_TYPE_P0S, "foo2"); if (set_current_locale_name(german_locale_name) != 0) { printf("set_current_locale_name() failed.\n"); exit(-1); } printf("\n\nTrying to display german localized error message:\n "); i18n_translate( libfizmo_module_name, i18n_libfizmo_COULD_NOT_OPEN_TRACE_FILE_P0S, "foo1"); printf("\n"); TRACE_LOG("End of tools_test.\n"); printf( "\nTools-test finished, you might want to examine \"tracelog.txt\".\n\n"); return 0; } #endif /* tools_test_c_INCLUDED */ libfizmo-0.7.15/src/tools/Makefile.am0000644000175000017500000000421313153330674017555 0ustar chrenderchrender # Makefile.am # # This file is part of fizmo. # # Copyright (c) 2009-2017 Christoph Ender. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. AUTOMAKE_OPTIONS = subdir-objects localedir = $(datarootdir)/fizmo/locales AM_CFLAGS = -fPIC # Don't run ranlib directly, since in case OS X universal libraries are # built, files processed by ranlib cannot be any longer processed by ar # (which is required to assemble libfizmo later on). RANLIB = true noinst_LIBRARIES = libtools.a libtools_a_SOURCES = ../locales/libfizmo_locales.c filesys.c filesys_c.c \ i18n.c list.c stringmap.c tracelog.c types.c z_ucs.c if ENABLE_TRACING AM_CFLAGS += -DENABLE_TRACING= endif AM_CFLAGS += -DI18N_DEFAULT_SEARCH_PATH=\"$(localedir)\" libfizmo-0.7.15/src/tools/types.c0000644000175000017500000001207513153330674017036 0ustar chrenderchrender /* types.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * * Why tracelog at all? Some errors, for example when resizing screens or * other procedures, simply do not occur when running under gdb, so an * extra debug method is very welcome. Furthermore, the tracelog also * allows to get a very detailed log of a user's error without having to * install or explain a debugger fist. * */ #ifndef types_c_INCLUDED #define types_c_INCLUDED #include #include #include "types.h" char* z_colour_names[] = { "current", "default", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", "msdos-grey", "amiga-grey", "medium-grey", "drak grey" }; bool is_regular_z_colour(z_colour colour) { if ( (colour == Z_COLOUR_BLACK) || (colour == Z_COLOUR_RED) || (colour == Z_COLOUR_GREEN) || (colour == Z_COLOUR_YELLOW) || (colour == Z_COLOUR_BLUE) || (colour == Z_COLOUR_MAGENTA) || (colour == Z_COLOUR_CYAN) || (colour == Z_COLOUR_WHITE) || (colour == Z_COLOUR_MSDOS_DARKISH_GREY) || (colour == Z_COLOUR_AMIGA_LIGHT_GREY) || (colour == Z_COLOUR_MEDIUM_GREY) || (colour == Z_COLOUR_DARK_GREY) ) return true; else return false; } short color_name_to_z_colour(char *colour_name) { if (colour_name == NULL) { return -1; } else if (strcasecmp(colour_name, "black") == 0) { return Z_COLOUR_BLACK; } else if (strcasecmp(colour_name, "red") == 0) { return Z_COLOUR_RED; } else if (strcasecmp(colour_name, "green") == 0) { return Z_COLOUR_GREEN; } else if (strcasecmp(colour_name, "yellow") == 0) { return Z_COLOUR_YELLOW; } else if (strcasecmp(colour_name, "blue") == 0) { return Z_COLOUR_BLUE; } else if (strcasecmp(colour_name, "magenta") == 0) { return Z_COLOUR_MAGENTA; } else if (strcasecmp(colour_name, "cyan") == 0) { return Z_COLOUR_CYAN; } else if (strcasecmp(colour_name, "white") == 0) { return Z_COLOUR_WHITE; } else { return -1; } } z_rgb_colour new_z_rgb_colour(uint8_t red, uint8_t green, uint8_t blue) { return ((uint32_t)red << 16) | ((uint32_t)green << 8) | ((uint32_t)blue); } z_rgb_colour z_to_rgb_colour(z_colour z_colour_to_convert) { if (z_colour_to_convert == Z_COLOUR_BLACK) { return new_z_rgb_colour(0, 0, 0); } else if (z_colour_to_convert == Z_COLOUR_RED) { return new_z_rgb_colour(255, 0, 0); } else if (z_colour_to_convert == Z_COLOUR_GREEN) { return new_z_rgb_colour(0, 255, 0); } else if (z_colour_to_convert == Z_COLOUR_YELLOW) { return new_z_rgb_colour(255, 255, 0); } else if (z_colour_to_convert == Z_COLOUR_BLUE) { return new_z_rgb_colour(0, 0, 255); } else if (z_colour_to_convert == Z_COLOUR_MAGENTA) { return new_z_rgb_colour(255, 0, 255); } else if (z_colour_to_convert == Z_COLOUR_CYAN) { return new_z_rgb_colour(0, 255, 255); } else if (z_colour_to_convert == Z_COLOUR_WHITE) { return new_z_rgb_colour(255, 255, 255); } else { printf("invalid colour: %d\n", z_colour_to_convert); return Z_INVALID_RGB_COLOUR; } } uint8_t red_from_z_rgb_colour(z_rgb_colour rgb_colour) { return (uint8_t)(rgb_colour >> 16); } uint8_t green_from_z_rgb_colour(z_rgb_colour rgb_colour) { return (uint8_t)(rgb_colour >> 8); } uint8_t blue_from_z_rgb_colour(z_rgb_colour rgb_colour) { return (uint8_t)rgb_colour; } #endif /* types_c_INCLUDED */ libfizmo-0.7.15/src/tools/filesys.c0000644000175000017500000000364213153330674017350 0ustar chrenderchrender /* filesys.c * * This file is part of fizmo. * * Copyright (c) 2011-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef filesys_c_INCLUDED #define filesys_c_INCLUDED #include #include "filesys_c.h" struct z_filesys_interface *fsi = &z_filesys_interface_c; void fizmo_register_filesys_interface( struct z_filesys_interface *filesys_interface) { fsi = filesys_interface; } #endif /* filesys_c_INCLUDED */ libfizmo-0.7.15/src/tools/z_ucs.c0000644000175000017500000002257513153330674017023 0ustar chrenderchrender /* z_ucs.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include "z_ucs.h" #include "types.h" #include "filesys.h" size_t z_ucs_len(z_ucs *string) { z_ucs *start_index = string; if (string == NULL) return 0; while (*string != 0) { string++; } return (size_t)(string - start_index); } z_ucs *z_ucs_cpy(z_ucs *dst, z_ucs *src) { while (*src != 0) { *dst = *src; dst++; src++; } *dst = 0; return dst; } void z_ucs_ncpy(z_ucs *dst, z_ucs *src, size_t len) { memmove(dst, src, len * sizeof(z_ucs)); } // Returns > 0 in case s1 > s2, 0 if equal and < 0 otherwise. int z_ucs_cmp(z_ucs *s1, z_ucs *s2) { while ( (*s1 != 0) || (*s2 != 0) ) { if (*s1 != *s2) return *s1 - *s2; s1++; s2++; } return 0; } z_ucs *z_ucs_chr(z_ucs *s1, z_ucs chr) { while (*s1 != 0) { if (*s1 == chr) return s1; s1++; } return NULL; } z_ucs *z_ucs_chrs(z_ucs *s1, z_ucs *chars) { z_ucs *ptr; while (*s1 != 0) { if ((ptr = z_ucs_chr(chars, *s1)) != NULL) return s1; s1++; } return NULL; } z_ucs *z_ucs_rchr(z_ucs *s1, z_ucs chr) { z_ucs *ptr = s1 + z_ucs_len(s1); while (ptr >= s1) { if (*ptr == chr) return ptr; ptr--; } return NULL; } z_ucs *z_ucs_rchrs(z_ucs *s1, z_ucs *chars) { z_ucs *ptr = s1 + z_ucs_len(s1), *ptr2; while (ptr >= s1) { if ((ptr2 = z_ucs_chr(chars, *ptr)) != NULL) return ptr; ptr--; } return NULL; } z_ucs *z_ucs_cat(z_ucs *dst, z_ucs *src) { dst += z_ucs_len(dst); while (*src != 0) *(dst++) = *(src++); *dst = 0; return dst; } z_ucs *z_ucs_dup(z_ucs *src) { z_ucs *result; if ((result = malloc(sizeof(z_ucs) * (z_ucs_len(src) + 1))) == NULL) return NULL; z_ucs_cpy(result, src); return result; } z_ucs latin1_char_to_zucs_char(char c) { return (z_ucs)((unsigned char)c & 0xff); } char *latin1_string_to_zucs_string(z_ucs *dest, char *src, size_t max_dest_size) { if (max_dest_size < 2) return NULL; while (*src != (char)0) { if (max_dest_size == 1) { *dest = 0; return src; } *dest = (z_ucs)(*src & 0xff); dest++; src++; } *dest = 0; return NULL; } char zucs_char_to_latin1_char(z_ucs src) { if ((src & 0xffffff00) == 0) return (char)(src & 0xff); else return (char)('?'); } z_ucs *z_ucs_cat_latin1(z_ucs *dst, char *src) { while (*src != 0) *(dst++) = latin1_char_to_zucs_char(*(src++)); *dst = 0; return dst; } int z_ucs_cmp_latin1(z_ucs *s1, char *s2) { while ( (*s1 != 0) || (*s2 != 0) ) { if ((char)*s1 != *s2) return -1; if ((*s1 & 0xffffff00) != 0) return -1; s1++; s2++; } if (*s2 != '\0') return -1; else return 0; } z_ucs *dup_latin1_string_to_zucs_string(char *src) { z_ucs *result; int len, i; if (src == NULL) return NULL; len = strlen(src); if ((result = malloc(sizeof(z_ucs) * (len + 1))) == NULL) return NULL; for (i=0; ireadchar(in)) == EOF) return UEOF; if ((current_char & 0x80) == 0) return (z_ucs)current_char & 0x7f; len = 2; cmp_value1 = 0xe0; cmp_value2 = 0xc0; while (len <= 6) { if ((current_char & cmp_value1) == cmp_value2) { cmp_value1 = 1; for (i=0; i<6-len; i++) { // cmp_value1 is never negative. cmp_value1 <<= 1; cmp_value1 |= 1; } result = (z_ucs)(current_char & cmp_value1); // Found a sequence of length len. for (i=0; ireadchar(in)) == EOF) return UEOF; result <<= 6; result |= (current_char & 0x3f); } return result; } cmp_value1 >>= 1; cmp_value1 |= 0x80; cmp_value2 >>= 1; cmp_value2 |= 0x80; len++; } return UEOF; } z_ucs utf8_char_to_zucs_char(char **src) { // FIXME: Fail on overlong UTF-8 characters. int len; int i; int cmp_value1; int cmp_value2; z_ucs result; if ((**src & 0x80) == (char)0) { result = (z_ucs)**src & 0x7f; (*src)++; return result; } len = 2; cmp_value1 = 0xe0; cmp_value2 = 0xc0; while (len <= 6) { if (((int)(**src) & cmp_value1) == cmp_value2) { // Found a sequence of length len. cmp_value1 = 1; for (i=0; i<6-len; i++) { cmp_value1 <<= 1; cmp_value1 |= 1; } result = (z_ucs)(**src & cmp_value1); (*src)++; for (i=0; i>= 1; cmp_value1 |= 0x80; cmp_value2 >>= 1; cmp_value2 |= 0x80; len++; } return -1; } char *utf8_string_to_zucs_string(z_ucs *dest, char *src, int max_dest_size) { if (max_dest_size < 1) return NULL; while (*src != (char)0) { if (max_dest_size == 1) { *dest = 0; return src; } *dest = utf8_char_to_zucs_char(&src); max_dest_size--; dest++; } *dest = 0; return NULL; } z_ucs *dup_utf8_string_to_zucs_string(char *src) { int len = 0; char *ptr = src; z_ucs *result; while (*ptr != 0) { utf8_char_to_zucs_char(&ptr); len++; } len++; if ((result = malloc(sizeof(z_ucs) * len)) == NULL) return NULL; utf8_string_to_zucs_string(result, src, len); return result; } static int get_utf8_code_length(z_ucs zucs_char) { if ( (zucs_char & 0xffffff80) == 0) return 1; else if ((zucs_char & 0xfffff800) == 0) return 2; else if ((zucs_char & 0xffff0000) == 0) return 3; else if ((zucs_char & 0xffe00000) == 0) return 4; else if ((zucs_char & 0xfc000000) == 0) return 5; else if ((zucs_char & 0x80000000) == 0) return 6; else return -1; } int zucs_string_to_utf8_string(char *dst, z_ucs **src, size_t max_dst_size) { int len = 0; int char_len; int i; z_ucs mask1; z_ucs mask2; z_ucs src_val; if ( (max_dst_size < 1) && (dst != NULL) ) { return -1; } while (**src != 0) { char_len = get_utf8_code_length(**src); if (char_len == -1) { printf("Illegal code: %c/%x\n", (char)**src, (unsigned)**src); printf("&0xfffff800: %x.\n", (unsigned)(**src & 0xfffff800)); return -1; } if (dst != NULL) { if (max_dst_size < (size_t)(char_len + 1)) { *dst = (char)0; return len + 1; } if (char_len == 1) { *dst = (char)**src; dst++; } else { mask1 = 0x01; mask2 = 0xfc; for (i=0; i<6-char_len; i++) { mask1 <<= 1; mask1 |= 1; mask2 <<= 1; } mask2 &= 0xff; dst += char_len - 1; src_val = **src; for (i=0; i>= 6; dst--; } *dst = (char)((src_val & mask1) | mask2); dst += char_len; } max_dst_size -= char_len; } (*src)++; len += char_len; } if (dst != NULL) *dst = (char)0; return len + 1; } char *dup_zucs_string_to_utf8_string(z_ucs *src) { char *dst; z_ucs *src_ptr; size_t len = 0; src_ptr = src; while (*src_ptr != 0) { len += get_utf8_code_length(*src_ptr); src_ptr++; } if ((dst = malloc(len + 1)) == NULL) return NULL; src_ptr = src; if ((zucs_string_to_utf8_string(dst, &src_ptr, len + 1)) != (int)(len + 1)) { free(dst); return NULL; } return dst; } libfizmo-0.7.15/src/tools/i18n.h0000644000175000017500000000561613153330674016461 0ustar chrenderchrender /* i18n.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef i18n_h_INCLUDED #define i18n_h_INCLUDED #include "types.h" // 2^64 results in a number containing 20 digits. #define MAXIMUM_FORMATTED_PARAMTER_LENGTH 20 #define i18n_OUTPUT_MODE_DEV_NULL 0 #define i18n_OUTPUT_MODE_STREAMS 1 #define i18n_OUTPUT_MODE_STRING 2 #include typedef struct { z_ucs *locale_data; z_ucs *module_name; z_ucs **messages; int nof_messages; } locale_module; void register_i18n_stream_output_function( int (*new_stream_output_function)(z_ucs *output)); void register_i18n_abort_function( void (*new_abort_function)(int exit_code, z_ucs *error_message)); size_t _i18n_va_translate(z_ucs *module_name, int string_code, va_list ap); size_t i18n_translate(z_ucs *module_name, int string_code, ...); void i18n_translate_and_exit(z_ucs *module_name, int string_code, int exit_code, ...); size_t i18n_message_length(z_ucs *module_name, int string_code, ...); z_ucs *i18n_translate_to_string(z_ucs *module_name, int string_code, ...); char *get_i18n_search_path(); int set_i18n_search_path(char *path); z_ucs *get_current_locale_name(); char *get_current_locale_name_in_utf8(); int set_current_locale_name(char *new_locale_name); char **get_available_locale_names(); char *get_i18n_default_search_path(void); void free_i18n_memory(); #endif /* i18n_h_INCLUDED */ libfizmo-0.7.15/src/tools/list.c0000644000175000017500000000713013153330674016641 0ustar chrenderchrender /* list.c * * This file is part of fizmo. * * Copyright (c) 2010-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef list_c_INCLUDED #define list_c_INCLUDED #include #include "list.h" list *create_list() { list *result; if ((result = malloc(sizeof(list))) == NULL) return NULL; result->elements = NULL; result->nof_elements_stored = 0; result->space_available = 0; return result; } int add_list_element(list *l, void *value) { void **ptr; //printf("list: %d / %d\n", // l->nof_elements_stored, l->space_available); if (l->nof_elements_stored == l->space_available) { if ((ptr = realloc(l->elements, sizeof(void*) * (l->space_available + LIST_INC_SIZE))) == NULL) return -1; l->elements = ptr; l->space_available += LIST_INC_SIZE; } l->elements[l->nof_elements_stored] = value; l->nof_elements_stored++; //printf("new-nof: %d\n", l->nof_elements_stored); return 0; } int get_list_size(list *l) { return l->nof_elements_stored; } void *get_list_element(list *l, int list_index) { return l->elements[list_index]; } bool list_contains_element(list *haystack, void *needle) { size_t index = 0; while (index < haystack->nof_elements_stored) { if (haystack->elements[index] == needle) return true; index++; } return false; } void delete_list(list *l) { free(l->elements); free(l); } void **delete_list_and_get_ptrs(list *l) { void **result = l->elements; if (l->space_available > l->nof_elements_stored) if ((result = realloc(l->elements, sizeof(void*) * l->nof_elements_stored)) == NULL) result = l->elements; free(l); return result; } void **delete_list_and_get_null_terminated_ptrs(list *l) { void **result = l->elements; if (get_list_size(l) > 0) { if (l->space_available > l->nof_elements_stored + 1) if ((result = realloc(l->elements, sizeof(void*) * (l->nof_elements_stored + 1))) == NULL) result = l->elements; result[l->nof_elements_stored] = NULL; free(l); } return result; } #endif /* list_c_INCLUDED */ libfizmo-0.7.15/src/tools/z_ucs.h0000644000175000017500000000643213153330674017022 0ustar chrenderchrender /* z_ucs.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef z_ucs_h_INCLUDED #define z_ucs_h_INCLUDED #include #include #include "types.h" #define UEOF ((z_ucs)-1) #define UTF_8_MB_LEN 6 #define Z_UCS_NEWLINE ((z_ucs)'\n') #define Z_UCS_SPACE ((z_ucs)' ') #define Z_UCS_BACKSLASH ((z_ucs)'\\') #define Z_UCS_SLASH ((z_ucs)'/') #define Z_UCS_COLON ((z_ucs)':') #define Z_UCS_DOT ((z_ucs)'.') #define Z_UCS_MINUS ((z_ucs)'-') #define Z_UCS_SOFT_HYPEN ((z_ucs)0xad) #define Z_UCS_COMMA ((z_ucs)',') typedef struct { z_ucs *data; size_t len; size_t bytes_allocated; } zucs_string; size_t z_ucs_len(z_ucs *string); z_ucs *z_ucs_cpy(z_ucs *dst, z_ucs *src); void z_ucs_ncpy(z_ucs *dst, z_ucs *src, size_t len); int z_ucs_cmp(z_ucs *s1, z_ucs *s2); z_ucs *z_ucs_chr(z_ucs *s1, z_ucs chr); z_ucs *z_ucs_chrs(z_ucs *s1, z_ucs *chars); z_ucs *z_ucs_rchr(z_ucs *s1, z_ucs chr); z_ucs *z_ucs_rchrs(z_ucs *s1, z_ucs *chars); z_ucs *z_ucs_cat(z_ucs *dst, z_ucs *src); z_ucs *z_ucs_dup(z_ucs *src); z_ucs latin1_char_to_zucs_char(char c); char *latin1_string_to_zucs_string(z_ucs *dest, char *src, size_t max_dest_size); char zucs_char_to_latin1_char(z_ucs src); z_ucs *z_ucs_cat_latin1(z_ucs *dst, char *src); int z_ucs_cmp_latin1(z_ucs *s1, char *s2); z_ucs *dup_latin1_string_to_zucs_string(char *src); z_ucs parse_utf8_char_from_file(z_file *fileref); z_ucs utf8_char_to_zucs_char(char **src); char *utf8_string_to_zucs_string(z_ucs *dest, char *src, int max_dest_size); z_ucs *dup_utf8_string_to_zucs_string(char *src); int zucs_string_to_utf8_string(char *dst, z_ucs **src, size_t max_dst_size); char *dup_zucs_string_to_utf8_string(z_ucs *src); //void z_ucs_output_number(z_ucs *dst, long int number); // dead? #endif // z_ucs_h_INCLUDED libfizmo-0.7.15/src/tools/filesys_c.h0000644000175000017500000000356113153330674017657 0ustar chrenderchrender /* filesys_c.h * * This file is part of fizmo. * * Copyright (c) 2011-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef filesys_c_h_INCLUDED #define filesys_c_h_INCLUDED #include "../filesys_interface/filesys_interface.h" #ifndef filesys_c_c_INCLUDED extern struct z_filesys_interface z_filesys_interface_c; #endif // filesys_c_c_INCLUDED #endif /* filesys_c_h_INCLUDED */ libfizmo-0.7.15/src/tools/stringmap.h0000644000175000017500000000424713153330674017705 0ustar chrenderchrender /* stringmap.h * * This file is part of fizmo. * * Copyright (c) 2010-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef stringmap_h_INCLUDED #define stringmap_h_INCLUDED #include "types.h" #define MAP_INC_SIZE 32 typedef struct { z_ucs *name; void *value; } stringmap_element; typedef struct { stringmap_element** elements; size_t nof_elements_stored; size_t space_available; } stringmap; stringmap *create_stringmap(); int add_stringmap_element(stringmap *map, z_ucs *name, void *value); void *get_stringmap_value(stringmap *map, z_ucs *name); z_ucs **get_names_in_stringmap(stringmap *map); void delete_stringmap(stringmap *map); #endif /* stringmap_h_INCLUDED */ libfizmo-0.7.15/src/tools/tracelog.c0000644000175000017500000000624613153330674017475 0ustar chrenderchrender /* tracelog.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * * Why tracelog at all? Some errors, for example when resizing screens or * other procedures, simply do not occur when running under gdb, so an * extra debug method is very welcome. Furthermore, the tracelog also * allows to get a very detailed log of a user's error without having to * install or explain a debugger fist. * */ #ifndef tracelog_c_INCLUDED #define tracelog_c_INCLUDED #include #include #include "tracelog.h" #include "i18n.h" #include "types.h" #include "z_ucs.h" #include "filesys.h" #include "../locales/libfizmo_locales.h" z_file *stream_t = NULL; #ifdef ENABLE_TRACING void turn_on_trace(void) { if (stream_t != NULL) { TRACE_LOG("Tracelog already active.\n"); return; } stream_t = fsi->openfile( DEFAULT_TRACE_FILE_NAME, FILETYPE_TEXT, FILEACCESS_WRITE); if (stream_t == NULL) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_COULD_NOT_OPEN_TRACE_FILE_P0S, -1, DEFAULT_TRACE_FILE_NAME); } void turn_off_trace(void) { if (stream_t == NULL) { TRACE_LOG("Tracelog already deactivated.\n"); return; } fsi->flushfile(stream_t); fsi->closefile(stream_t); stream_t = NULL; } void _trace_log_z_ucs(z_ucs *output) { char utf_8_output[80 * UTF_8_MB_LEN + 1]; if (stream_t != NULL) { while (*output != 0) { zucs_string_to_utf8_string(utf_8_output, &output, 80 * UTF_8_MB_LEN + 1); fsi->writestring(utf_8_output, stream_t); fsi->flushfile(stream_t); } } } #endif /* ENABLE_TRACING */ #endif // tracelog_c_INCLUDED libfizmo-0.7.15/src/tools/Makefile.in0000644000175000017500000004574313153330676017605 0ustar chrenderchrender# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ # Makefile.am # # This file is part of fizmo. # # Copyright (c) 2009-2017 Christoph Ender. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : @ENABLE_TRACING_TRUE@am__append_1 = -DENABLE_TRACING= subdir = src/tools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config-flags.m4 \ $(top_srcdir)/config-libs.m4 $(top_srcdir)/config-conds.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libtools_a_AR = $(AR) $(ARFLAGS) libtools_a_LIBADD = am__dirstamp = $(am__leading_dot)dirstamp am_libtools_a_OBJECTS = ../locales/libfizmo_locales.$(OBJEXT) \ filesys.$(OBJEXT) filesys_c.$(OBJEXT) i18n.$(OBJEXT) \ list.$(OBJEXT) stringmap.$(OBJEXT) tracelog.$(OBJEXT) \ types.$(OBJEXT) z_ucs.$(OBJEXT) libtools_a_OBJECTS = $(am_libtools_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libtools_a_SOURCES) DIST_SOURCES = $(libtools_a_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBFIZMO_REQS = @LIBFIZMO_REQS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBXML2_NONPKG_CFLAGS = @LIBXML2_NONPKG_CFLAGS@ LIBXML2_NONPKG_LIBS = @LIBXML2_NONPKG_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_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ # Don't run ranlib directly, since in case OS X universal libraries are # built, files processed by ranlib cannot be any longer processed by ar # (which is required to assemble libfizmo later on). RANLIB = true SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ 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@ libxml2_CFLAGS = @libxml2_CFLAGS@ libxml2_LIBS = @libxml2_LIBS@ localedir = $(datarootdir)/fizmo/locales localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = -fPIC $(am__append_1) \ -DI18N_DEFAULT_SEARCH_PATH=\"$(localedir)\" noinst_LIBRARIES = libtools.a libtools_a_SOURCES = ../locales/libfizmo_locales.c filesys.c filesys_c.c \ i18n.c list.c stringmap.c tracelog.c types.c z_ucs.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/tools/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 $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) ../locales/$(am__dirstamp): @$(MKDIR_P) ../locales @: > ../locales/$(am__dirstamp) ../locales/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ../locales/$(DEPDIR) @: > ../locales/$(DEPDIR)/$(am__dirstamp) ../locales/libfizmo_locales.$(OBJEXT): ../locales/$(am__dirstamp) \ ../locales/$(DEPDIR)/$(am__dirstamp) libtools.a: $(libtools_a_OBJECTS) $(libtools_a_DEPENDENCIES) $(EXTRA_libtools_a_DEPENDENCIES) $(AM_V_at)-rm -f libtools.a $(AM_V_AR)$(libtools_a_AR) libtools.a $(libtools_a_OBJECTS) $(libtools_a_LIBADD) $(AM_V_at)$(RANLIB) libtools.a mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f ../locales/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@../locales/$(DEPDIR)/libfizmo_locales.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filesys.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filesys_c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i18n.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tracelog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/types.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/z_ucs.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f ../locales/$(DEPDIR)/$(am__dirstamp) -rm -f ../locales/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ../locales/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ../locales/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am .PRECIOUS: Makefile # 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: libfizmo-0.7.15/src/tools/filesys_c.c0000644000175000017500000001654113153330674017654 0ustar chrenderchrender /* filesys_c.c * * This file is part of fizmo. * * Copyright (c) 2011-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef filesys_c_c_INCLUDED #define filesys_c_c_INCLUDED #include #include #include #include #include #include #include #include #include "filesys_c.h" #include "tracelog.h" #include "types.h" #include "z_ucs.h" #include "../filesys_interface/filesys_interface.h" #if defined (__WIN32__) static char *fileaccess_string[] = { "rb", "wb", "ab" }; #else static char *fileaccess_string[] = { "r", "w", "a" }; #endif // defined (__WIN32__) static z_file *openfile_c(char *filename, int filetype, int fileaccess) { z_file *result; int access_index; if ((result = malloc(sizeof(z_file))) == NULL) return NULL; if (fileaccess == FILEACCESS_READ) access_index = 0; else if (fileaccess == FILEACCESS_WRITE) access_index = 1; else if (fileaccess == FILEACCESS_APPEND) access_index = 2; else return NULL; TRACE_LOG("Trying to fopen(\"%s\", \"%s\").\n", filename, fileaccess_string[access_index]); if ((result->file_object = (void*)fopen(filename, fileaccess_string[access_index])) == NULL) { free(result); return NULL; } result->filename = strdup(filename); result->filetype = filetype; result->fileaccess = fileaccess; return result; } static int closefile_c(z_file *file_to_close) { // Since the fclose manpage says that even if "fclose" fails no further // access to the stream is possible, the "closefile_c" function will always // clear up the z_file structure. int result = fclose((FILE*)file_to_close->file_object); free(file_to_close->filename); file_to_close->file_object = NULL; file_to_close->filename = NULL; free(file_to_close); return result; } static int readchar_c(z_file *fileref) { int result = fgetc((FILE*)fileref->file_object); return result == EOF ? -1 : result; } static size_t readchars_c(void *ptr, size_t len, z_file *fileref) { return fread(ptr, 1, len, (FILE*)fileref->file_object); } static int writechar_c(int ch, z_file *fileref) { return putc(ch, (FILE*)fileref->file_object); } static size_t writechars_c(void *ptr, size_t len, z_file *fileref) { return fwrite(ptr, 1, len, (FILE*)fileref->file_object); } int writestring_c(char *s, z_file *fileref) { return writechars_c(s, strlen(s), fileref); } int writeucsstring_c(z_ucs *s, z_file *fileref) { char buf[128]; int len; int res = 0; // FIMXE: Re-implement for various output charsets. while (*s != 0) { len = zucs_string_to_utf8_string(buf, &s, 128); res += writechars_c(buf, len-1, fileref); } return res; } static int fileprintf_c(z_file *fileref, char *format, ...) { va_list args; va_start(args, format); int result = vfprintf((FILE*)fileref->file_object, format, args); va_end(args); return result; } static int vfileprintf_c(z_file *fileref, char *format, va_list ap) { return vfprintf((FILE*)fileref->file_object, format, ap); } static int filescanf_c(z_file *fileref, char *format, ...) { va_list args; va_start(args, format); int result = vfscanf((FILE*)fileref->file_object, format, args); va_end(args); return result; } static int vfilescanf_c(z_file *fileref, char *format, va_list ap) { return vfscanf((FILE*)fileref->file_object, format, ap); } static long getfilepos_c(z_file *fileref) { return ftell((FILE*)fileref->file_object); } static int setfilepos_c(z_file *fileref, long seek, int whence) { return fseek((FILE*)fileref->file_object, seek, whence); } static int unreadchar_c(int c, z_file *fileref) { return ungetc(c, (FILE*)fileref->file_object); } static int flushfile_c(z_file *fileref) { return fflush((FILE*)fileref->file_object); } static time_t get_last_file_mod_timestamp_c(z_file *fileref) { struct stat stat_buf; if (fstat(fileno((FILE*)fileref->file_object), &stat_buf) != 0) return -1; else return stat_buf.st_ctime; } static int get_fileno_c(z_file *fileref) { return fileno((FILE*)fileref->file_object); } static FILE* get_stdio_stream_c(z_file *fileref) { return (FILE*)fileref->file_object; } static z_dir *open_dir_c(char *dirname) { z_dir *result; if ((result = malloc(sizeof(z_dir))) == NULL) return NULL; if ((result->dir_object = opendir(dirname)) == NULL) { free(result); return NULL; } return result; } static int close_dir_c(z_dir *dirref) { int result; result = closedir((DIR*)dirref->dir_object); free(dirref); return result; } static int read_dir_c(struct z_dir_ent *result, z_dir *dirref) { struct dirent *dir_ent; if ((dir_ent = readdir((DIR*)dirref->dir_object)) == NULL) return -1; result->d_name = dir_ent->d_name; return 0; } static int make_dir_c(char *path) { return mkdir(path #if !defined (__WIN32__) ,S_IRWXU #endif // !defined (__WIN32__) ); } static char* get_cwd_c() { return getcwd(NULL, 0); } static int ch_dir_c(char *dirname) { return chdir(dirname); } static bool is_filename_directory_c(char *filename) { int filedes; struct stat stat_buf; bool result; if ((filedes = open(filename, O_RDONLY)) < 0) return false; if (fstat(filedes, &stat_buf) != 0) return false; result = stat_buf.st_mode & S_IFDIR ? true : false; close(filedes); return result; } struct z_filesys_interface z_filesys_interface_c = { &openfile_c, &closefile_c, &readchar_c, &readchars_c, &writechar_c, &writechars_c, &writestring_c, &writeucsstring_c, &fileprintf_c, &vfileprintf_c, &filescanf_c, &vfilescanf_c, &getfilepos_c, &setfilepos_c, &unreadchar_c, &flushfile_c, &get_last_file_mod_timestamp_c, &get_fileno_c, &get_stdio_stream_c, &get_cwd_c, &ch_dir_c, &open_dir_c, &close_dir_c, &read_dir_c, &make_dir_c, &is_filename_directory_c }; #endif /* filesys_c_c_INCLUDED */ libfizmo-0.7.15/src/tools/README.txt0000644000175000017500000000206613153330674017223 0ustar chrenderchrender This "tools" directory contains some utilities which are not strictly fizmo-related. They were separated from the rest of the code in order to allow easier building of fizmo-related tools, such as the simple test programs or separate libraries like drilbo. In particular, the "tools" set is made up from the following utilies: - i18n: Modularizable localization-tools. - stringmap: A simple mapping associating *void indexed by *z_ucs. - types: All types related to fizmo, essentially providing Z-machine types. - z_ucs: Support for wide characters requiring no wchar-C-Compiler support. - list: A simple set of *void pointers for easier list managment. - tracelog: A simple set of macros allowing to trace code execution. - unused: A macro provoding the "UNUSED()" expression. The Makefile supports the folloing targets: all (default): Will build "libtools.a". clean: Will remove all objects, test code and "tracelog.txt". distclean: Will execute "clean" and also remove "libtools.a". test: Will build and execute a tiny tools-test program. libfizmo-0.7.15/src/filesys_interface/0000755000175000017500000000000013153330674020057 5ustar chrenderchrenderlibfizmo-0.7.15/src/filesys_interface/filesys_interface.h0000644000175000017500000000662713153330674023741 0ustar chrenderchrender /* filesys_interface.h * * This file is part of fizmo. * * Copyright (c) 2011-2017 Andrew Plotkin and Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef filesys_interface_h_INCLUDED #define filesys_interface_h_INCLUDED #include #include #include "../tools/types.h" #define FILETYPE_SAVEGAME 0 #define FILETYPE_TRANSCRIPT 1 #define FILETYPE_INPUTRECORD 2 #define FILETYPE_DATA 3 #define FILETYPE_TEXT 4 #define FILEACCESS_READ 0 #define FILEACCESS_WRITE 1 #define FILEACCESS_APPEND 2 struct z_filesys_interface { z_file* (*openfile)(char *filename, int filetype, int fileaccess); int (*closefile)(z_file *file_to_close); // Returns -1 on EOF. int (*readchar)(z_file *fileref); // Returns number of bytes read. size_t (*readchars)(void *ptr, size_t len, z_file *fileref); int (*writechar)(int ch, z_file *fileref); // Returns number of bytes successfully written. size_t (*writechars)(void *ptr, size_t len, z_file *fileref); int (*writestring)(char *s, z_file *fileref); int (*writeucsstring)(z_ucs *s, z_file *fileref); int (*fileprintf)(z_file *fileref, char *format, ...); int (*vfileprintf)(z_file *fileref, char *format, va_list ap); int (*filescanf)(z_file *fileref, char *format, ...); int (*vfilescanf)(z_file *fileref, char *format, va_list ap); long (*getfilepos)(z_file *fileref); int (*setfilepos)(z_file *fileref, long seek, int whence); int (*unreadchar)(int c, z_file *fileref); int (*flushfile)(z_file *fileref); time_t (*get_last_file_mod_timestamp)(z_file *fileref); int (*get_fileno)(z_file *fileref); FILE* (*get_stdio_stream)(z_file *fileref); char* (*get_cwd)(); int (*ch_dir)(char *dirname); z_dir* (*open_dir)(char *dirname); int (*close_dir)(z_dir *dirref); int (*read_dir)(struct z_dir_ent *dir_ent, z_dir *dirref); int (*make_dir)(char *path); bool (*is_filename_directory)(char *filename); }; #endif /* filesys_interface_h_INCLUDED */ libfizmo-0.7.15/src/locales/0000755000175000017500000000000013153330674016003 5ustar chrenderchrenderlibfizmo-0.7.15/src/locales/en_GB/0000755000175000017500000000000013153330674016755 5ustar chrenderchrenderlibfizmo-0.7.15/src/locales/en_GB/libfizmo_i18n.txt0000644000175000017500000000622413153330674022174 0ustar chrenderchrenderCould not open trace file "\{0s}". Invalid parameter type "\{0s}". Function call "\{0s}" aborted due to error. Invalid backslash-sequence in localization data. Warning for "\{0s}" at address \{1x}: Call of function "\{0s}" returned error code \{1d}. An error occured while reading from file "\{0s}". Could not open file named "\{0s}". Error reading first story byte from "\{0s}". Unknown story version \{0d}. An error occured trying to close file "\{0s}". Function call malloc(\{0d}) returned NULL, probably out of memory. Function call realloc(\{0d}) returned NULL, probably out of memory. Fatal error reading story file. Not yet implemented. Instruction form not initialized. Unknown operand type \{0d}. Opcode \{0d} of instruction form \{1d} not implemented. Cannot pull from empty stack. Cannot drop \{0d} words from stack: Not enough words stored. Please enter name for command file. Filename must not be empty. Please enter a filename for the transcript file. Invalid output stream number \{0d}. Maximum stream 3 depth \{0d} exceeded. This function has been disabled. More than 15 locals are not allowed. Invalid throw destination stack index \{0d}. Maximum number of stack entries per routine (\{0d}) exceeded. Trying to strore variable L\{0d}, but only \{1d} variables are active. Not enough stack words from local routine on stack. Null pointer received. Property number 0 is not valid. Property number \{0d} is not allowed in story version \{1d}. Object number 0 is not valid. Object number \{0d} not allowed in story version \{1d}. No property \{0d} for object \{1d}. Cannot read properties with a length greater than 2. Attribute number \{0d} not allowed in story version \{1d}. Invalid node type \{0d}. Unknown char code \{0d}. Maximum abbreviation depth is \{0d}. Unknown error case. Invalid ZSCII input-code \{0d}. Invalid ZSCII output-code \{0d}. Valid commands are: Random generator is now in predictable mode. Random generator is now in random mode. libfizmo version \{0s}. Story release number \{0d}. Story serial number \{0s}. Current Z-Stack size: \{0d} entries. Z-Stack entries in use: \{0d}. Routine stack underflow check disabled. \{0d} Bytes used for undo. \{0d} bytes allocated by text history. \{0d} bytes allocated by block buffer. Preloaded input not availiable in interface "\{0s}". Timed input not implemented in interface "\{0s}". Please enter savegame filename. Error writing save file. Can't find chunk "IFhd". Error reading save file. Could not read release number. Could not read serial number. Could not read checksum. Release number, serial number or checksum doesn't match. Could not read Restore-PC. Can't read chunk length. The original storyfile "\{0s}" could not be found. Can't find "CMem" or "UMem" chunk. Can't find chunk "Stks". Invalid IFF access mode \{0d}. Caught signal \{0d}, aborting interpreter. Cannot divide by zero. Opcode JE with only 1 operand is illegal. Function call time() returned -1. Unknown configuration option \{0s}. Invalid value "\{0s}" for parameters "\{1s}". Story has Z-Version number \{0d}. History-Output object is not longer valid. fizmo version \{0s}. Supplied blorb file provides no "ZCOD" chunk. Supplied file is not a valid Z-Machine file. libfizmo-0.7.15/src/locales/en_GB/patterns.txt0000644000175000017500000016053213153330674021365 0ustar chrenderchrender% % This file has been renamed from hyph-en-gb.tex to patterns.tex in July 2011 % for usage in the fizmo z-machine interpreter. Empty lines were removed % and lines containing comments divided into separate data and comments % lines for technical reasons. No other changes made. % % This file has been renamed from ukhyphen.tex to hyph-en-gb.tex in June 2008 % for consistency with other files with hyphenation patterns in hyph-utf8 package. % No other changes made. See http://www.tug.org/tex-hyphen for more details. % % File: ukhyphen.tex % TeX hyphenation patterns for UK English % % Unlimited copying and redistribution of this file % is permitted so long as the file is not modified % in any way. % % Modifications may be made for private purposes (though % this is discouraged, as it could result in documents % hyphenating differently on different systems) but if % such modifications are re-distributed, the modified % file must not be capable of being confused with the % original. In particular, this means % %(a) the filename (the portion before the extension, if any) % must not match any of : % % UKHYPH UK-HYPH % UKHYPHEN UK-HYPHEN % UKHYPHENS UK-HYPHENS % UKHYPHENATION UK-HYPHENATION % UKHYPHENISATION UK-HYPHENISATION % UKHYPHENIZATION UK-HYPHENIZATION % % regardless of case, and % %(b) the file must contain conditions identical to these, % except that the modifier/distributor may, if he or she % wishes, augment the list of proscribed filenames. % % $Log: ukhyph.tex $ % Revision 2.0 1996/09/10 15:04:04 ucgadkw % o added list of hyphenation exceptions at the end of this file. % % % Version 1.0a. Released 18th October 2005/PT. % % Created by Dominik Wujastyk and Graham Toal using Frank Liang's PATGEN 1.0. % Like the US patterns, these UK patterns correctly hyphenate about 90% of % the words in the input list, and produce no hyphens not in the list % (see TeXbook pp. 451--2). % % These patterns are based on a file of 114925 British-hyphenated words % generously made available to Dominik Wujastyk by Oxford University Press. % This list of words is copyright to the OUP and may not be redistributed. % The hyphenation break points in the words in the abovementioned file is % also copyright to the OUP. % % We are very grateful to Oxford University Press for allowing us to use % their list of hyphenated words to produce the following TeX hyphenation % patterns. This file of hyphenation patterns may be freely distributed. % % These patterns require a value of about 14000 for TeX's pattern memory size. % %\patterns{ % just type if you're not using INITEX .ab4i .ab3ol .ace4 .acet3 .ach4 .ac5tiva .ad4din .ad3e .ad3o .ae5d .aer3i .af3f .af3t .ag4a .ag5n .air3 .al5im .al1k .al3le .am5ar .ama5te .am2i .am3pe .am3ph .an1 .ana3b .ana3s .and2 .an5da .an4el .an4en .an4gl .an4on. .an3s .ant3a .an3ti3 .ant4ic .an4t5o .any5 .aph5or .ap4i .ar5ab .ar5ap .ar4ci .ar5d .ar4e .ari4 .ar4ise .ar4isi .ar5sen .art5icl .as1 .as4q .as5sib .at5ar .ateli4 .at5omise .at5omiz .at3r .at3t .au3b .au3g4u .aur4e5 .aus5 .authen5 .av4 .av5era .bap5tism .barri5c .bas4i .ba5sic .be3di .be3lo .be5r4a .be5sm .bi4er .blaz5o .bo3lo .bos5om .boun4d .bov4 .bra5ch .bre2 .burn5i .ca3de .ca4gin .cam5i .cam3o .can1 .can5ta .ca5pitu .car4i .cas5ual .ca4ti .cen5so .cen5tena .cent5ri .cer4i .ch4 .cit4a .clem5e .clima5to .co5it .co3pa .cop5ro .co3ru .co3si .co5ter .cotyle5 .cri5tici .custom5 .dav5 .dea5co .de5lec .del5eg .de3li .deli5r .de1m .de5nit .de3no .der2 .de3ra .de5res .de3ri .de5scrib .de5serv .de5signe .de5sir .de5sis .de5spoi .determ5i .de3ve .de4w .di4al. .dia3s .di4at .din4a .dio5c .do2 .do4e .domest5 .du4al. .du4c .dys3 .east5 .echin5 .eco3 .ec3t .ed5em .ed4it. .ed4iti .eg4 .ei3d .ei5r .el3ev3 .el2i .elu5s .em3b .em5in .emp4 .em5py .en1 .en5c .en4ded .en3s .ent2 .en5ta .eos5 .epi1 .epi3d .er2a .er5em5 .er4i4 .er4o2 .eros4 .erot3 .er4ri .es1 .escal5 .es3p .es3t .etern5 .eth3e .eu1 .eur4 .eval3 .evol5ut .ew4 .ex1 .ex3a .eye3 .fal4le .far4i .fec5unda .fen4d .feoff5 .fi2 .fi5lia .fil5tr .fin5ess .fin3g .fi5n4it .fis4c5 .fo3c .fran5ch .fu5ga .ga4m .gam5et .gen4et .ge5neti .gen5ia .ge3ro .glor5io .gnost4 .go3no .gos3 .hab2 .ha5bili .hama5 .han4de .hast5i .he4i .hem5a .hi2 .hi3b .ho2l .ho5rol .hov3 .hy3lo .ico3s .idi2 .ig3 .ig1n .il4i .im5b .in1 .in3d .in3e2 .in2i .in3o .in3t .invest5i .ir3r .is4c .is4li .is4o .iso5m .ka5ro .ki4e .kin3e .lab4o .la4me .lam5enta .lan5i .lash4e .le4m .len5ti .le2p .lep5r .les5son .le5van .librar5 .lig3a .li3o .li4ons .li4p .loc3a .lo4gia .lo2p .loph3 .lous5i .lov5er .lub3 .lyo3 .mac5u .mal5ad5 .ma5lin .mar5ti .math5 .me5lodio .ment4 .men5ta .me5rid .me5rin .met4er .mi4e .mi3gr .min5ue .mirk4 .mis1 .mi5to .mo3bi .mo5lec .mon3a .mor5ti .mu3ni .mu3si .musi5co .myth3 .na5k .nari4 .nast4 .nas5ti .nec3t .ni4c .ni5tro .no4c .nom3o .nos3t .no5tic .nucle5 .obed5 .ob3el .ob3l .od4 .oed5 .oe5so .of5t .oi4 .ol4d .ome2 .om5el .on4ce .on4e .op2i .opt5a .or1 .or4at4 .ora5tori .or5che .or3d .ore4 .or3eo .or4i .orner4 .or2o .os1 .osi4 .oth5 .out1 .ov4 .pal5i .para5dis .par5af .para5t .pa5ta .pa4tio .pec3t4 .pecu3 .ped3e .pend4 .pen5de .pep3t .peri5n .perse5c .pe5titi .ph2 .phe5nom .phon4i .pi2e .pi3la .plast4 .plic4 .plica4 .plos4 .po3la .po5lite .po2p .pop5l .po5sitio .pos5si .pro5bat .pur4r .put4te .ra5cem .ran5gi .re3ca .ref5ere .re5gar .re1i .re5lin .re1m .re5o .res5ci .re5sen .re5spo .re5stat .re5store .re5str .re3ta .re5u .re3w .rib5a .rin4 .rit2 .rol4la .ros3a .sa2 .sac5r .sal4i .sa5lin .salt5er .sanc5 .sap5a .sa3vo .sci3e .sea3s .sect4 .sec5to .se3gr .sen3t .se1q .ser4ie .ses1 .sev5era .sh2 .si5gno .sis3 .st4 .stat4o .stra5to .string5i .su5da .sulph5a .sul3t .tact4i .tac5tic .ta4m .tamar5 .tar5o .tect4 .tel5a .tell5e .te4m .te5ra5t .ter4p .th4 .tho4 .thol4 .ti2 .til4 .ti5ni .tit4is .tor1 .tran4c .tri5bal .tri3d .trin4a .tri5sti .tro4ph .troph5o .tro4v .tular5 .turb4 .turi4 .tu5te .tu3to .ul4l .ulti5mat .un5ce .un5ch .un3d2 .under5 .un3e .un3g .uni3c .uni3o .un3k4 .un5s .un3t4 .un5u .up1 .up3l .ura4 .ur5eth .ur4o .va5led .ve2 .vec5 .ve5lo .vent5il .ver4ie .ver3n .vic5to .vi2s .vis3i .vi5so .vo1c .vo5lut .wine5s .xy3l .za5r a4a 1ab 2ab. 2aba ab5are abay4 2abb ab5ber 2abe4 ab3erd ab3err a3bet ab1ic a3bie 2abin 4abio abi5on ab3ita ab4itu ab3la abli4 4abolic ab3om ab3ota 3about ab1r 2abs. ab1ul abu4lo ab3use ab3usi 2aby ac2a ac5abl ac3al 5acanth ac5ard a5cat ach5al a5chini ach5ism achro4 ach5ur 2aci a4cic aci4ers acif4 4acit ack5a ac3li 4aco. aco3d ac5onr 4acos 4acou ac1r ac3ry act5ate act5ile ac2to act5ory ac2t5r ac5uat a5dai ada3v 4adee ad5eni ad4ha ad3ica a5dif 4adil adi4op adi4p adis4i a3diti 3adju 5admit a2do 4adoe 4adoi ad3ol a3dos ad1ow ad1r adram4 4a2du ad3ula ad3um 4ady ae5a ae4cit aeco3 4aed aed5is ae5g ae3on ae5p aerody5 ae4s ae5si aes3t aet4a aeth4 aet4or. aev3a 4af. 4afe af5ta a4fu ag4ari 4ageri a5ghe a5gia agi4as 4agino 4agl agli4 4ag1n ag3oni agor4a ag5ot a2gr ag3ri agru5 2ah a1h2a ahar2 aha5ra a1he ah4n a5hoo 2ai2 4ai. ai3a a1ic aid4a aid5er aig2 ai5gu ail3er ail3o aim5er ain5ders ai5nea a3ing. ain3i ain5o aint5er air5a air5p air3s ais1i a5ism 2a1j a4ju 2ak akel4 ak5u al5abl alact4 a1lae al5ais ala3ma al5ance al3at a5lav alc3at al3ch ald5ri 2ale a3lec aleg4 ale5ma al5ende a1leo a2let al3ibr ali4ci al5ics al1id al3if 5alig al1in a5lini alin5o al5ipe al5ipot 4alis. 4aliu 4alk alk5ie al4lab al4lag alli5an allig4 al4lish a5loe al3ogr a3lom a3loo al1or al4orim alos4 a4lou al3ous a5low al5pen al3ph al5tati al3tie alu3b al5ued al3ues a5lumnia al1va al5ver alv5u 2a1ly4 a5lyn 2a2m a5mad ama4g aman5d a5marine a3mas. am1at a5m4atic am5atu am4bin 3ambu am5elo a3men amen4d am3era am5erl am1i ami2c am5ica amic5r 3amid a3mili am5ily amini4f am5iniz aminos4 a5mis. a4mium. a3mon amor5a amort3 am5ose am2p am5peri amphi5g amp3li ampo5l am3ul amyl5 a2n an2a a5nadi an3ae an3age ana5k an3ali an3arc a5nast an4con an3d4at and5au and5eer an5del an5dif and5ist an5dit an4doni an4ea an5eer an3ell anel5li an3eu an3gan angov4 an4gur 4anh an3ic ani3f an5ifo 4anig an5ion anis5te 4anity 4aniu an5no 4anny an1o an2oe an3oma anor3 an2os an5ot an2s an3sc an4sco ans3il an4sur an2t2a ant5abl an3tal an5tam an2te 1anth an4thi 3anthr 4antic an4tie an4ting ant4iv an4tone ant4r an4tus an5tym an3ul an3um. an5ums a3nur a5nut an2y an5ya a5nyi 2ao aol3i 5aow 2ap 4ap. 4apa a1pac ap3al ap5aro ape5li a5peu aph5em aph3i aph5ol aphyl3 ap1i ap5icu ap3in ap4ine a5pir a3plan ap5li apo5str apo3th a2pr ap5ron 4aps apt5at apu5lar a5pun a4q a5qui a2r 4arabi ara5bo aract4i ara2g ar3age ar4aged ar5agi ar3ago a3raj ar3all ara3m aran4g aran5te ar5apa ar1at a3rau ara3v ar3ba arb5et ar4bid ar4bl arb3li ar4bul ar5chet arch5o ar5dina ar4done ar3en aren5d ar5ett ar3ev5 ar5gh ar3gu ar3h ar1i ar5iff ar4ill a5ri5net ar5ini a5rishi arm3er ar5mit ar3nal ar3nis ar3od ar5oid aro4mas aro4n a5roti a5rouc ar3ox arp5ers ar4pu 2arr ar2rh ar2s ars5al ar3so art5at ar2th arth4e arth3r ar5tiz 2aru ar3um ar5un4 a3ryo a5ryt ar5z as1a as4af asan2 2asc as5con as5cot as2cr as2e as3ect 4ased asep4 ash5ay ash5il as5ily as3in a5sio a3sit as5iv ask5er aski4 as4la as4lo 2aso as5och a4soned as5or as3ph ass2 assa5gi ass5ibl as4sil assit5 2asta as4tat as4tia as3tis as4tit 4asto2 as3tra as4tri as1u as4un as5ur 2a2ta 4atabi a5talis atam4 ata3p atar3a ata3s ata3t4 at3eau at3ech at5eer a5tel. ate5le at5enat at3ent 4ater at3era at5ernis at5erniz 4atess at5et 4a2th ath3a a3then ath5erin ath5ero ath5ete ath3i ath3od a5thon ath5r 4a3tia ati2c at5icis ati5cit at5iciz a2tif a4t1i4l a4tim a2t3in 4atina at5ing 4at4is. at1it atit3u atitud5i 4atiu at4ivi a5tiviz a2to 5at5od 4atog 2atol 4aton a3too a4tops a5torian a4tory atos4 a5toz 2a2tr at3ra a4tre 5at5ress at1ri atric5u at3ron at5rou at4tag 2a2tu at1ul atu4m at3ura at3urg 4a2ty 2au2 4au. aub5i 4auc au5cer auc3o aud5er audic4 aul3i aul4t aul5ted ault5er ault5i au3ma aun2 aun5chie aun3d aun4dre au5reo aur4o au5ror 4aus. aus5er aus5p aus4ted aut3ar aut3er au3th 2av av4ab ava4g av3age ava5la av5alr av5ant av5ar avas3 av3end av3ern av3ig aviol4 av1is aw5er. aw5ers aw1i aw5nie aw5y a4x ax2id 4ay ay5la ay3m ayn4 ays2 ay5si ay5sta ayth4 2az2 az3ar aze4 az5ee azyg4 azz4l 2ba. ba5bir 3back baen4 bag4a 5bah ba4i bal3a balm5i ba5lon bal5u bam4a ban4a ba5nan b4ane 5bang b4aniti b4ans ba4p1 5barb bar4d bardi4 bar4n ba5rom bar3on 5bars 1bas bas4te ba4th4 3batic ba5tio bat5on battle5 2b1b2 b4bata b3bli b4bone b1c2 bcord4 2b1d bdeac5 bde4b bdi4v b2e 4be. 3bea 4beas be3ca 3becu 2bed be3da bed5el bed2i be4do be5dra be4du 5bee 3bef be3go be5gr be3gu 1bel be3la 2bele be3lit bel4t be3m ben4d bend5a bend5er be1ne be5nig be5nu 4beo be3q 2bere berga5m berl4 5berr ber5s b5ertin be1s2 2bes. be3sl be3tr be3w 2b1f bfa4 4b1h b4ha 2bi. 1bia bi4b1 bicen5 3b2id bid5i b4ie bi4ers bif4 bi4fid. bi5ga bigu3 b1il b2ile 5biles 3b2ill 4bim bimet5 5bina 5bin4d bind3e bin5et bin5i4 1bi2o bio3l bio5m bi3ou bip4 bi5q bir4 bi3re4 bi5rus b2is 5bism bis4o bisul5 3bitua 4bity bi5ve b1j 4b5k4 2bl2 5blac blag4 b3lan 5blast bla5tu blem5at 3bler 5blesp 4blik blim3a bli3o bli2q b3lis 4bly 2b1m bment4 bmi4 4b1n bo2 4bo. 3boa bo5am 5bob bod5i bo5h 2boid 4boke bol4e 4boled bol3i bol4t 3bon bon4c bon4e bon4ie boni4f bon4sp 1boo b3orat bor3d bor5ee bor5et 3bori bor5ic bor5io bor4n bot3an 5boti boun5ti 3bour bous4 bow2 bow3s 4boxy 5boy br4 3brach 4bral bram4 b2ran bran4d 4bre. b4reas 4b2res brev5et b2rid 5brief bring5 bri4os b5rist b4roa bro4ma bros4 brum4 4bry. 4b1s2 b3sc bscon4 bsen4 bserv5an b5si bsin4 bso2 bsol3e bso3lu b4stac bstupe5 2b1t b5tlet 4bu. 5bub buf5fer b4uli b4ulos bun2 bun4a b5u5nat bunt4 bur3e bur4ri busi4e buss2 bus5si 3bust bu5tar b3ute b5utin 3butio but4iv b5ut5o b1v 4b3w 2by 4by. 3byi bys4 5byt 2ca. cab5in c4ace caco3 cad4r 5caf ca3go 5cai 5cak c1al c4ala ca5laman cal5ar 3calc ca5lef call5in cal4m ca3ly ca3ma cam4i ca5nar c2an4e c4ano ca3noe can5tar can5ted can4tic can4tr 5cao 1cap ca5pil capt4 cap3ti cap3u 1car ca3ra5c car5ame ca3ree ca3r4i3c car3if car5m car3ni car3ol car5on car5oo ca3rou car4v case5 cashi4 3cas3s cas5tig 3casu3 c1at c4at. c2atc c4atom ca3t2r c4ats cat4u 3cau caulk4i cav3il 3cay c1c4 ccent5r cces4sa c3ch cci3d4 ccip4 ccle3 4ce. 4ceab cean3 3ceas ce4ci 2ced 5ceda ce3dar 3cede 3cedi 4cef ce5g 3ceiv cel3ai cel5ib5 5cell cel5lin celo4 ce5lom 4cely 2cem ce4met 3cemi ce4mo 1cen2 5cenc cen5ci cen5ded cend5en cend5er cen3i 2cenn 3cent cent4a cen5ted cen5ter. cen5ters cen5tes 1cep cept3a cep5tic 3cera cer4bi 3cerd ce3rem 5cern 5cess cest5o ces5tr ce2t cew4 2ch 4ch. 4chab 3chae 3chai cham5per chan5gi cha3pa chec4 4ched 3chee 3chem che3ol ch1er ch4eri 5cherin ch4erl 4ches 3chete ch5eu che5va 3chew ch5ex 5chi. 3chia 3chico ch3ily ch4in. ch3inn 3chio 5chip chizz4 ch5k 5chlor 4chm 1cho cho3a 5choc 4choi ch5oid 3chor 4chored chor5ol 4choso 3chot 4choti ch5ous chow5 3chr chur4 3chut 5chyd 3chyl 3chym 1c2i2 4ci. 4ciac cia4m ci3ca 4cids 4cie. ci3er ci3est ci5et ci3f cifi4 4cig ci3ga cigar5 3cil cil5lin 2cim cim3a ci3me 5cimen 4cinab 4cind cine5a cine5mat ci5ness 4cint ci3ol ci5om ci4po cisi4 cit3r ck1 ckar5 cka5t c4ke ck5if ck4sc cl2 cla5rif 3clas c2le2 2cle. c5lec clemat4 clev3 cli1m c3ling cli2q clo4q c4lotr clue4 clyp5 5clys cn2 c3ni 1c2o2 4co. 3coa co5ba 3coc co3ci co5cu co3dic co3dif 4cody 3coe co5et co3gr 4c3oid co3inc 4col. col3a co3log 5colou co5ly co5mas co4me co3mo4 comp4 con1 con4ati con4ch cond5er con4ey con4ie con3s con3t conta5d 3coo coop4 co3or cop4e co3ph co5pl co3po cop4t 2cora cor5ded cord5er 4cored co3rel 3corn 4coro co5rol 5cort 3cos. cost3a cost5er co5ta 3co3tr 5coty cous5t cov1 co3va cow5a coz4 co5zi c1q cr2 5craf craft5i c4ran 5crani cra5niu cras3t cra4te c2re 4crean cre3at cre4p3 5creti cre4to cret5or cri3l cron4 crost4 4crou 5c4rus cry2 crym3 cryo3 4c5s4 csim5 2ct c2ta c3tac ctac5u c5ta5g ct1an ct5ant c5taria c3tato c1te c4tea c2t5ee c4tent cter4ia ct5es ct5et ct2ic c5ticia c4tics ctifi4e c3tim ct4in. ct4ina ct5ing c3tini c5tin5o c5tio c3t2is c3tit c4titu c4tity ct5ive ct4ivit ct5olo c1tom c3ton c5toris c5toriz c1tr c2tre ctro5t c1tu c2tum c1ty cub3at c4uf cu5ity cul5ab c2uli cull5er cull5in 1c2ult cu4mi 5cuna cun4e 5cuni 5cuol cu5pa cu3pi c3upl 1cur cur4er cur5ial 4cur4o 1cus cus5a c3utiv c3utr 5cuu cu5v 2cy. cy4bi 1cyc cyl3 cy4m cy5no cys4 cys5to cy4t cz2 4da. d4abr 1d2ac dach4 d5ache 3dact d1ag d4a4gi d4ale d4alg dal5ler dam5a 3dame d3ami da5mu 3dang d1an4t d3ap d3ard 5darm 3d4as2 dast5a d1at dativ4 dat4u daugh3 daun5te 3dav d3b d3c4 d1d4 d4dere d3di d3dler d3dli d3dyi 2de. deac3t de5aw de4bi deb5it 3dec de5cant de4cil de1cr 4dect ded3i defor5e de4fy. de3g de4gu de3io 5de3is de3lat deli4e del5ler del5li de5lo 1d4em 4demie 4dem4is demo4n de4mons de3mor de4mos 4demy de1n2a den4d 4dene d3enh deni4e dens5a dens5er den5tit de3od deo3l deon2 deont5 de1p depen4 deposi4 de2pu d3eq derac4 de3rai d4ere 4dered de5reg 3derer 1deri der3k 3derm der4mi der5min 5derne 3dero4 der5os der3s 5deru 4des. de3sa 5desc des4ca de5scal de3sec des4i de3sid des5igna des1p des5pon de3sq d3est. des3ti 1de1t de3tes de5th de2ti dev3il de3vis de3vit de4voi devol5u 3dex 2d5f dfol4 d2g dg4a dgel4 d4gen d3gr 4d1h dhot4 d4hu 4di. 1dia di2ad 3diar diat5om 4d1ib d1ic. dic5am di4ce di3ch d5icl dic5ol 1dict dic5tat dic4te 5dicul d5icur 1did di4ers 3di3ev d4ifo dig3al di3gam dil4 5dill dilo4 di3lu di5mer dimet4 di1mi 2d1in din4e din5gi di5nos 3di1o dio4c di4ola dip5t 3dire di3ri 4d5iro di4s1 d4isc disen3 3disia 3diss d4itas d4iter dithe4 d3ito ditor3 2dity 1diu 1di1v2 di4val di5vine dix4i d1j 2dl4 d1la 5dlef 5dlest 3dlew dlin4 d1lo d5lu 2d1m 4d1n2 1do 4do. d4ob do4c3u dog4a do4j d4ol. dol3en do5line dol5it do4lon d4ols 5dom. doman4 domin5 dom5ino dom5it do5mo don4at 4dony 3doo d2or 4dor. dor4m dort4 d4os do5sim dossi4 dot1a dot4tin 2dous d4own 3dox d1p dr2 d5rail d3ral 3dram dran4 d4ras drast4 3drel dres4 dress5o dri4e d4rif dri4g3 d4rom dropho4 drunk3 4d1s2 d5sl ds3m ds4mi d4sw dt4 dt5ho 1du 2du. du1at 3duc duch5 duci5an du4co du5eli du5ell du5en du5ett du5in dul3c d3ule dul4l dum4be dun4a d5un4c du2p du3pl 5duro d5use dust5er du3u d1v dver2 dvert3 dvoc5at 2d1w dwell3 2d2y dy4ad. dy5ar 5dy4e 5dyk dyl2 dyll3 5dymi 3dyn dys3p d3zo ea2 4eab e1act eac4te ea5cu e5add ead3er ead1i ead3li ea4g eak1 eal3a eal3er ea3log eam4bl eam3er ean5i eap2 eap5er e3app ear3a ear3er ear4li e5ar2r ear4te earth5i eas5er ea4soni e1as1s eassem4 eas4t east5i eat5eni eat3er eat5ie e3atif eatit4 eat4itu e3atri e4atu eau3 eav5i eavi4e eav5ou eaz5i e1b ebar4 eb2b ebe4 e4bel. e4bels e2ben eb5et eb2i e5bil e4bin e4bis e4bl e4bos ebot3o e2br eb1ra eb2t e4buc ebus5i ec2a ec3ade ecad5en ecal5e e5cam e4capo ec3at ec5ath e1ce ecent5o ech3i e4cib eci4f ecip5i e1cl ec3lip econ4sc econstit5 ec3ora ec5oro ec3rat ec5rean e4crem ec1ro ect5ati ec4ter ecti4c ec4tit ec4t5us ec1ul e5culi 2ed e5dans e2dat ede2 e4ded e5deh e4dele edes3t ede3te edeter5 e3dev e5dew ed4g edi4als ed5ical ed5ics ediges4 ed5igr ed3ime ed1it edi2v ediv5id ed3li edor4 e4dox ed1ro edu5cer e2dul ed3ulo e4d5ur ee4ce eed3er ee4do ee2f ee5g ee1i ee2l1i ee2m eem5er eem3i eep1 ee4pa eer4ine eesi4 ee3to e1f efact5o efal4 ef5eree ef5inite e4fite ef4l efor5est 2efu e4fug efut5a egel3 egi5a e4gib e3gla eg3le eg4mi eg5nab e5g4on e2gr e5gur e1h2 e5ho eh5s ehy2 ehyd5r eid4 5eido 4eif eig2 e5ignit e4in. e3inc e2ine e1ing ein5i e4ins. ei4p4 eir3o 4eis eis3i eit5er eith4 e2iv eiv3er e2iz e1j ejudic4 ek3en ek5is ek4l e4lac e5lad el5age elam4 el5anc elast3 e4lates el5ative elch5er eld3er 2ele elea5g 4e4led el5eni el3eno ele3o ele5ph el1er e1les e5less e4leste el3et3o elev3a ele3vi el5ex e4l3ica4 e1lie eli4ers e3lim el3ing eli3on e4li4s elit4t e3liv el4lab ell5iz e3loa e3loc elo5ca eloc3u elo4di e2log elom5ate el5op. el5ops elp5in el3so el5tie e1lu elu4m elus4 elv4 e5lyi 3elyt em3ago em3ana emar4 emarc5a em5atiz emat5ol em5bi e1me4 e4mee e4mel e3mem e4m3era em5ero emet4e em4icis e4mie e2mig emig5ra em3ina em5ing e3mio em3ism e4mita e4miu em4mae 4emnit emo3bi emod4u e2mog e4moi em3olo em5om 4emon e3moni emon5ol e2mor em5oris em3orr e4motic e5moz empa5r empara5 em5pes 4empli. em4pre em3um e5mut en3ac e4nal en3am3o en4ann e2n3ar en3as. ena5ture 3encep en4cile enct4 2end en4d5al en4dedl end5rit 4ene ene5d en3ee e5nelle e5nep e2ner e5nereo ener5v en5esi e3ness en1et en4ett e2n3eu e3new en3gi en3ic en5ier en3ig3r en5in enit5u en3k en1o en3oi eno2m en3oty enov3 en2s ens5al en3sp en4sum en4sus ent3ar en4ters en5tia en4tify en2to en4tri ent5rin ent5up en4tus 4enu en3ua en3uf en3ur en5ut 5enwa eo3b e4och e4oda eof2 eo2l eol5ar. eol5at eologi4 e5olu eo3m eon4a e3ont eop4t e1or1 eor4de eor3e eor5o eo1s2 eo4to e1pa ep4al ep5arc epa4t epend5en ep5ert e4pete epe5titio ep5ex eph1 eph4i e2pig e5pla ep3lic epol3a epol3i epolit5 ep3reh epres5e ep5rim e4p5rob5 ept3or e1p4u e3pur5 e4puta equin4 equi5no er1 era4cie era4do era4g era4l er3aph er3api er3apy 4erati. 4eratim er5atu er3bat er3be erb5os 2erc er3ch er3cl 2erd erd5ar erdi4e 2ere er3eal 4ered er3egr er5el. er5ell er5els e4reme er3en 5erend eren4e ere5ol e3req er3er ere4s er5ese er3esi er5este er5esti eres5tr eret4 er3et. er3ets er3ett ere4v er3ex ergi3v er3gl er3ia. er4ian eri4cid 5er5ick er2id er3ie er3iff er4imet er3in eri4na eri4on er3iou er4isc eri5sta 4eri2t e3riv er5iz 4erj erk4 er3me er4moi 5ernacl er5nalis ern3er ern3is ern3it 4ero. er3oid ero5is ero5st erpent5in erre5la er4rep er5sine er5ted er4ter ert5er. ert5ers er4thi ert5iz 2eru eru4b eru5d erund5 er4vil 5erwau eryth3 2erz 4es. es5am es5an e2sc es5can es5che esci5e escut5 e3sea e3sect e5see e5seg5 ese4l es5enc e3sh4a e1shi e5shu esi4an es5ic. e5sick es5iden esi5diu es5ies es3im es3in e5sion e4sit es4it. es4its e3skin e3s4mi es4od es3ola es3ol3u es3ona eso3p e1sor es3per3 es5pira es5pit es4pl esplen5 es5pot e5s2pr es4s3an essar5 ess5ee es4sil es2so esta4b est3an e5star es5tau e2sti est5ifi est5igati e3stoc es5too est4r estud4 e1su e2s3ul es4ur5 et2a et3al. et5allis et3al5o eta5me eta3p et3ari et5ary et4as et3ate et3ati et5ay et3eer etell5i etend5er et5eni eter2 et3er3a et5eria etex4 e2th1 ethyl3 2etia e3ticu eti4gi e5tim et3in eti4na e3tir et5itiv eti4u et5olo e5tomete e2ton et3ona etor3i etra5g 4e4tral etra5m et4ran et5ress et1ri et4ria etrib5a e4trim et1ro et2t et3ter etud4 et3ude e4tum et4we et5z eudio5 eue4 euk5 4eum e3urg eur5i eus4 eu5ten eu3ter eut3i ev4abi eval5e eva2p3 ev3ast ev3at ev5eli eve4n ev5erat ev5eren ever4er e4veri e4ves e1via e4viab e2vic evictu4 evid3 ev5ig ev4ile ev5ish evis5in evis5o e4viu evoc3 evol5e evol5ute evu4 e1wa e4wag e5way ew1er e3wh ew5ie ew1in ew5ish e3wit e1wr ex5ic ex4on. 1exp 4ey. ey4as eyl4 ey3s2 ez5er. ez5ers ez5ie 1f2a 2fa. fab4i fa3cet fact2 fa2c3u 2f3ag fall5in 5falo fa5lon fals5ifie 4fan3a fan5tasiz fant3i 5far far3i 5faw 4f5b 2f5d 2fe. 3feas fea3tu feb5r 3fec 2fed1 5fei fe1li fem3i femin5 fend5er f5eni 4fered fer3ee 3fero fe5roc fer5om 3ferr fer3v 2fes. fess3o fest3a fest5i fe4t fet4al fet4in fet4o 3feu fe5veri 2ff f1fe ffec4te f5fet f1fi f5fia f3fic f5fie ffil3 f2f3is ff4le ff3lin ffoc3 ffoni4 ffor3e f3fr ffranch5 4f5h fi5ance fib5u 4fic. 4fical 3fici 4fics fi5del fid3en fiel4 fier4c fight5 1fi2l 2fin fin2a fi3nal find3 fin2e f1ing 5finin fin4ni fir2m1 f3ita f5itee fl2 3fla fle2s f3lica flin4 3flo flo5ric 3flu flum4i 1fo 4fo. 3foc fo2e foeti4 fo1l4i fo4lie foment4 fo2n fon4de 3foo fo5ram for5ay for5b for4di fore3t 5form for4m3a fortu5na fo3v 1fr2 frag5a frant4 frar4 fratch4 fre4s frost5i fruc4 2f3s fs4p 2ft f1ted f4ter. ft5es fti4et ft4ine 3fu 4fu. fu4c fuel5li fug4a fu4min fun2g 4fured fur3n fu3sil fus5o fu5til 4ga. ga4cie gadi4 ga4dos 3gag 3gai 3gale ga5len gali4a gal5ler 3galo gam4bl gan5at 4ganed gang5er g5ant. gan4tr g5ants g5arc g4are gar3ee gariz4a ga5rot gar5p 5garr 1ga4s gas5i gas3o gasol5 gass5in gast3r g1at g4at. gat5iv g4ato. g4atos g4att gat5u gaud5 ga5za g1b g5d4 2ge. 5geal 3gean 2ge4d 3gedi 5gedn 4gef 1gel 4gele ge4li gel4in gel5li ge4lu 2gely gem3i 5gemo 3gen gen4du gen5it gen3o gen5ti ge4o geo3lo 4gere 3germ4 2ges. 5gess gest5at 3get get3a 2g1f 2g1g gg4a g2ge g5gedl g3ger g5gerer ggi4a5 g3gli gglu3 g5gly ggrav3 g4gro 2gh g5hai gh5eni g3ho g4hos gh2t 1g2i 4gi. gi4all gi4at 3gib gi5co gi4g gi5gan gin5gi 3gio gi4or gi4ot 5gip gi5pa g4i4s 5gis. gi2t1 5gitu giv5en. 2gl2 g3lar 5glass. glec4 3gler g4leto g4letr g4ley gli5on g5lis4 3glo 4g5lod glom3 4glop 3glu glu5te glu5ti 3glyp 2g1m4 2gn2 g1na g4nab g5nate 5gnath g5nati gna5tur gn5edl gn5ee gn3er g1ni g4nia g2n3in gn4in. g4ni2o g2no 5gnori gno4s 2go. 5goa 3goc 5god 3goe go4et go4ge 4gogram g5oid go3is go2me 5gonn go5nom 3goo goph4 4gor. 5gorg 4gors g4ory 3gos gos4t 2gou gour4i g1ous gov1 g3p 1gr2 grab4 3gram 4grame gra2p g4re gril4 grim3a g4ro gro4g g5ron grop4 3gru gru3en gru5i grum4b 2g1s gs4c gs4t g4sti gth5eni g5to g4u2a gu5ab 5guan 3guard g5uat 2gue 5gueu 5guit4 gui5ta gu2ma gu4mi 3gun g4uras g4ured gur4n gur4u 4gury gust5a 2g1w 2gy gy2b 5gym 3gyn gyn5o g5z2 ha2 4ha. h4ac hadi4e had4ine hae3o haged5 hagi3o hag5u ha5ic hais4 hak4ine hal5ant ha4m ham5an han4cro han2g h1ani4 h5aniz han4t hant3a ha4pe hap3l har1a har5b har4d har5die harge4 ha5rism har3o har4ted har4ti has4te hat5o haught5 havel4 hav5ersi hav5o h1b h1c h1d hdeac5 hdu4 he2 4he. h2ea 1head 3hear hearch4 heast5 heav5en hec3t4 he5del he3do heek4 h4ei he3is he5lat h5elin he3lio he5liu hel4li h3el3o hem1a he3men hemis4 he5mop hem4p hende5 he3or hep1 h1er. her4as her2b herb3a herb3i here3a here3o h5erett h5erh her5ial h5erine h1erl her5om h4eron h1ers h5erwa hes3tr het1 h4et3a het3i het4ted heu2 heum3 heumat5 he4v4 hev5i hex5o h1f h5h 2hi. hi4ar h1ic hi3c4an hi4cin h4icl h5ie. h1ier h4i4ers h1ies h3ifi4 h3ify hig4o hi5ka hi4l hi5ma4 hi5mer himos4 h1in hin4d h2in2e hi5nie h5iniz hi5nop h2ins hio5lo h4ior hi2p hip3l h4ir hir4r hirr5i hit4a hiv5a 4hl h3la h1le h3let h1l2i hli4a 2h1m h4manic h5mica 2h1n2 hnocen5 4ho. ho3an ho4co ho3don ho5du ho5ep hol3ar hold1 hol4is. ho5lys ho4mag hom5in h2o4n hon5em ho5neu hon3ey hong3i ho5nio hon1o 1hood hoo5r h4ope ho2p5r h4op4te hor5et h4orn horn5i ho5rog hort5h hosi4 ho4ton h2ou 3house3 4h1p 2hr hras5eo hre4 hre5ma hr5er hres4 hri4 hrill5in hrim4 h5rit h3rod hrom4i hry4 h3rym3 2h1s hsi4 h4sk ht5ag ht5ee ht3en. ht5ener ht3eni ht3ens ht5eo ht5es ht4foo h1th ht4ine hu4g hu4mat hu5mer hu4min hun4c hunk4 hun4t hur3i hu3sia huz4 h1w h4wart h2y hy2l hyl5en hy2m hyn4 hy3o hyol5i hy1pe hy3ph hyr4 hys3te hy4t 2i1a2 ia4bl iab5olis iab5oliz i2ach iac3o i2ac2r ia5cri ia5dem i5ae iaf4 i2ag4 ia3gn i5a4g5o ia3gr i3ah i5ai ialect4 i3alit ial5li 4ialn i2a3lo ia5ly i5amb ia3me ianch5 i3ant i5ape ia3ph i2ard 4iarit i3at ia5the i5atom iat4u iatur4a i3au iav4 ib3era ib1i ibio4 ibios4 ib5li 4ibo i4bon ibor4 i4bose i5bou ib1ri 4ibu ib3uta ic3ac ic5ado i4cal ic1an 2icar iccu4 4ice i5ceo 4ich ich4i ich5ing ich5ol 4icin i5cio 2ick ic4lo 2i2co ico3c ic5ola icon3o i5cop icotyle5 2i1cr i4cri i4cru i4cry ic4tedl ic4ter ict5ic 2icu icu4lu ic3um i5cun4 i5cut 2i1cy i2d id1a i5day ide4m id3enc id3era iderm5 i3dicu id3if i5dig i5dil i3dim id4ines idios4 idir4 id1is4 id4ist 2i4d1it idi4v id3li id3ol idol3a 4idomi id3ow 4idr id5ri id3ul ie2 4iec 2ieg2 ie3ga ie5i i5ell 4iem 2i1en ien2d i1er i3eres i2eri ieri4n 4iern ier2o i4ert i3esc ies3el i1es2t i3est. 2i1et i4et. iet3ie 4ieu i5euti iev3a iev3er iev3o 2i1f i2fe if4fa iff5ler if3ic. i4ficac if5ics ifi4d ifi4n 4i2fl i3fo ifoc5 if5tee i3fy 2ig i3gad ig3and 3igar i1ge i3ger ight5er. ight5ers 4igi ign5iz igno5m i3gon ig1or ig3ot i5gret i4g5ro igu5it ig1ur 2i1h ihy4 2ii i5in ija4 4iju 2ik2 ik5an ike4b i2l3a ila4g ila5tel i5later il4ax il5dr il4du i3len ilesi4 il3f il3ia. il3iar ili4arl i3lici i5lien ili4er ili4fe il4ific il1in il5ine. 4iliou il5ipp il5iq il4ite ilit5u il4mo i5lon il3ou ilth4 il2tr 4ilu il5ul i5lum il5ure il3v 4ilym ima4c im2ag im3age im1al im5am i5m2as i4mated i4matin imat5u im1i i3m2ie im4ine im5ino im5mes i2mo i5mog i3mon im5oo i3mos. impar5a imparad5 im5pie impot5 im5pr impu4 im1ul im5um in3ab 4inace in4ado in5agl in3air ina4l 4inalit in5am in3an in3ap in4ars i3nas. 4inata inator5 in3au in4aw 2inc inc4tua 2ind in5dar inde5p indes5 inde3t indeterm5 in5dro 4inea 4ined in5ee in5ega 4in5eo ine4s in3esi ine5te 4ineu inev5 infilt5 infol4 4infu 4inga in5gal 4inge ing5ha 4ingi 4ingle 4ingli 4ingo 4ingu ing3um 2ini in5ia. 4inic in4ici in3ion in4itud 4ink ink4ine 4inl 2inn 2ino 4ino. in3oi i5nole 4inos i3nos. in5ose in3osi 4inq ins2 in4sch5 inse2 insect5 insec5u in3si 5insk insolv5 in4tee int5ess in3til int5res intu5m 2inu in5ul in5um in3un in3ur invol5u 2io2 ioact4 i1od iod3i4 iod5o ioe4 io3gr 4i1ol io3ma i4omani io3mo i5ope io3ph i5opo iop4s i1or iora4m 4iore 4iorit 5ioriz 4iorl ior4n io3sc i3ose i3osi i4oso io5sta i3ot iot4a io5th iot5ic io5tr i4oty i4our. i4ours i5ox 2ip ip3al ipap4 ipar3o ipart5ite ip1at i3pend i1ph2e iphen3 i5pheri iphi4 i4phu ip3id i5pil ip3in ip4ine ipir4 ip5is ip1i4t ip4iti ip3lin ip3lo i3po i4pog i4poli i4pom ipon3 i4pow ip2pl ip3pli ip4re ip5tori ip1ul i5put ipy4 2iq i3qua 2ir ir1a ir4abi ira4c ir4ae. ir4ag ir4alin ir4alli i5raso irassi4 iray4 ird3i ire3a ir3ec ir5ee irel4 ire5li ires4 ir5ess ir1i ir2i4d ir4im ir4is. 5iriz irl5ing ir5och ir5ol ir3om ir4q ir2s ir5ta ir5tee irwo4me i4sa is5ad is3age is1al is3am is1an is3ar is5av 4isb i2s3c is5chi isci5c 4i1sec ise5cr is3ell 4is3en is2er is5ere i2s3et 4iseu is3har ish5ee 4ishio ish3op is5hor 2isia is5ic is3ie 4isim is3inc 4isis is4ke is1l islun4 2isma is1on is5oner iso5p is1p i3s2ph 5ispr 2is1s iss5ad is4sal is5san iss4iv iss4o 4ista is4tal ist5enc ist5ent is5terer 4isth is4t3ic 4istl i4s1to 4is4tom is1tr 3istry 4isty i5sul is3ur 2isy it1a it5ab ita4c 4itai it3am it4ana it4as it3at i3tect it3ee it3enc it3ent it3era 2ith itha5l ith5i i5thol ith3r ithy5 2itia iti4co it5icu it1ie it3ig 4itim it4in. it4ins 4itio. 4itione i5tiq 4i5tit it3iv it4li it5lo 4ito. it5ol 2iton it1ou 2itr it5ress i4tric 2itt it4tit itu4als it5uar 4itue it1ul it1ur it3us 2i1u2 i3um iur5e 2iva iv5anc iv1at i4ved iv5el. iv5eling iv5els i4ver. iv3eri i4vers. iver5sal ives4 iv3et i4vie iv3if i5vilit 5ivist. 5ivists iv1it i2vo ivoc3 i5vore 2i1w 2ix ix3o i5ye 1iz 4izah iz3i2 2izo iz5oi 2izz 1ja 2ja. 3jac ja2c5o jac3u jag5u jal4 ja5lo ja5pan jel5la jeo2 jeop3 4jes jeu4 jew3 2ji 3jig jil4 jill5 5jis. 3jo2 4jo. joc5o joc5u jol4e 4jr 4js ju1di jui4 ju5l ju3ni juscu4 jut3a ju1v k4abi k2a5bu kach4 k3a4g kais5 ka4l ka5lim kal4is k4an ka3o kap4 kar4i 1kas. kaur4 kav4 k1b4 k1c kcom4 k5d2 kdo4 kdol5 4ked ke5da k5ede 3kee ke4g ken4d keno4 kep5t ker5a k4ere k5erel ker4j ker5o kes4i ket5a key4wo k1f kfur4 k3ho 5kih ki2l kilo3 k1in k2in. 3kind kinema4 kin5et k3ing kin4i k2ins kir3m kir4r kis4 3kis. k1ish kit5c ki4w kk4 k5ker k2l2 k3la k5lea k3ler k3let k3li k3lo k1m kn2 k2no 1know ko5a kol4 ko5mi ko5pe k1p k5ro4 k3ru 4k1s k3sl ks2mi ks4t k1t kur5 k5v k1w 3kyl l2a 4la. 5laa lab5ar label4 5labr l4ac la2ca la5ceo la5cer la4ch la2co 5la5col lac5on la3cu la4de l5adm l4ae l4af la3ger la4gis lag3r 5lah4 la4ic. l4al 4lale 5lamandr la5melli lam4ie lam1o l5amu lan3at lan2d 3land. land3i 3lands lan4er lan3et lan5tine lan4tr la4p lapi4 lar5an lar5de 4lared l4as lat5al la4te 5latilis 5latiliz 5latini lat5us l4au 5laur lav5at l4aw 4laz l3b lbe4 l4bit l4by l1c2 l2cat lce4 lcen4 l4cere lch4e l3dar l3ded l3deh l5dera ld3est l5dew ldi2 l3die ld4ine l5di5nes ld3ish ld5li l3do 4le. 3leagu le5atio leav5er l3eb5ra le3ca le5cha lect5ica 2led le5dr leg1a l3egan 3legg le4gin leg3o le3gra lek4 4leled lel5o lelu5 lem5enc lem3is l5emiz 5lemm l3emn le2mo lem5on l5enda len5dar lend4e len4do le1ne le5nie len3o 4lentio len5u le3on leo4s le5q 2ler le5rec 5l4eria l4eric le5rig ler3om leros4 ler3ot 4les. le3sco 3les4s 1let le5tra le5tre 5le5tu5 leur5 2lev l3eva 5leve lev5ita le4wi l5exa 1ley lf5id l2fo lf3on l1g2 l4gal l4gem lgi4a l4gid l4goi l3h 4li. li4ani lias4 lib1r l1ic. 5lich li4cie 5licio l3ic3on lict4o li4cu l3ida l4idar 5lidif 3lieu l4ife l4ifo lift5er 1lig li5ger light5i 5lih 3lik 1l4il lil4i lim2b limet4e lim4p l4ina. l4inas lin4d l4ine 5lin3ea lin4er. lin4ers lin4ger ling3i 5lingt 3lingu 3linq lint5i 3liog li4ol lio3m liot4 li3ou 5liph lipt5 li1q 3lir l1is l4isk 5lisse l1it l2it. l3it5a 5liter 3lith 5litia 3litr lit4u l4iv l5ivat liv3er liv5id lkal5o lk5at lk3er. lk3ers ll2 l1la lla4ba llact4 l5las l4law l5leb l1lec l1leg l3lei l1lel lle5m l1len l3lep l3leu l3lev ll3f l1li lli5am lli4an llib4e llic4 l4licl lli5co l5lie lligat4 l2lin l5lin. l3lina l3line l5lio lli5v ll3m l1lo lloc3a lloc5u llo2q l4lov llow5er ll3p ll3s ll5t l1lu llun4 l5lya l3lyc l3lyg l3lyh l3lyi l5lym lm2 l1ma l1me l4mer lm3ing l5mip l2m3od l1n4 l3ne lneo4 2lo. 5load 5lob3a 1loc loc3al loc5ul lo4cus. 2locy l3odis 3lo3dr 1log lo5gan 4loi. lo5mi lom4m lon4al lon4e l5onel lo5ney long5in 3lonia loni4e l3onis l3oniz loom5er lop4e 5lo5pen l3opm 1lo1q l4ored lor5iat lor4ife lo5rof loros4 l4os. lo1so loss4 los5sie lot5at loth4ie lo5tu 5loup lp1at lp3er lph2 l5phe l3phin l2pho l3pie l3pit lr4 l3ri l3ro l5ru 4ls l5sam ls5an lsi4fia lsi4m ls4is l5sk ls4p l1s2t ltan3e l4tang lt5ant l5tar l1te l4tei ltern3 lth3i lti4ci ltim4a ltin4 lti3t l3t4iv lt4or l1tr ltramont5 l1tu l4tus 4lu. lu1a luch4 lu2c5o luc5ra lu4cu 4lue lu1en lu5er lu1i lu4it lum4bri lu4mo 5lump lu2m5u lunch5eo 5lune l3unta lu3ori 5lup 3lur3o lusk5 luss4 lut5an 4lut5ar 5lutioniz lu5toc lut5r lu1v lv5ate l5vet4 l4vi l4vor l3w lx4 2ly 4ly. ly1c ly4ca lyc4l lyc5os lym2 lymph5 lyp2 ly4pa lypt5o 3lyr lys5er 3lyw 3lyz lz4 4ma. m4aca mac3ad ma5chine 5machy ma4cis mact4 4mad. 4mada 4mads ma4ge 5magn 2mago4 2mah ma5ho 3ma4i 4mai. maid3 5mak mal3ap mal5ari 5male2 mal5ed mal3ef m3alg m3alis mal4is. mal3le mal4li 2mam mament4 m5ament. 1man 3m4an. man3a man5dar man3dr manic4 man4ica ma5nil m4ans mantel5 2map m3aph 1mar 5maran mar5ol ma5ron ma3roo mar5ri mar4shi mar3v ma3son massi4 mass5ing 3mas1t mas4ted mast4ic mas4tin m4at. m4aten ma3ter mater5n4 m4atit mat4iti m4atiza ma3tog mat5om ma3top m4ats 3m4att ma5ture mav4 2m1b mbat4t mb4d m5bec m5berer m4bery m4bes mb2i m2bic m5bil5 m4b3ing m4bis mb5ist mbival5 m5bler m3bli mbru4 mbu3l mbur4 m1c m5d m2e 2me. mea5g me5and me4ba me4bi 2med 4med. 3media med5icat 4medie m5ed5ies 3medit me4do m5edy me2g 5meg2a1 mega5t 4mele mel5ee mel5ler mel3on mel4t melt5er me2m 4m5eme 1men 3men. 2mena men4ag mend5er mend5o me1ne ment5or 5ments 5meog me4p m5eran 4mere mer4ia 2me2s mes5en me5si4a mes5q 3mesti4 1me2t meta3t met1e 4meted meth4i meti4c met5ici met3o met3ri m1f 4m3h 4mi. m1ic mi4cin mi3co 3micro m4ict mi3cul mi4cus m4idi mid4in mid5on mi5fi mig5a migh5ti mi2gr 4mij mi5ka m2il m3ila mil4ad 4m5ilie mil5ies 3mill mi5lo mil4t 3m2im mim5i 5min4d mind5er min4er. min4ers ming5li min5ie m4init min3ol 1m4int minth5o mi3o mi3p mirab4 mi5racu m2is. m4isc mi4se 4misem mis3ha 5missi m3ist. mis4tin m3ists mi2t m5itan 4mity 3miu 5mix 4m1l mlo5cuti mlun4 2m1m2 mman4d mmand5er m3medi mmel5li mmet4e mmig3 mmin3u mmis3 mmob3 m5moc mmor3 mmut3a 4m1n2 mnif4 m4nin mni5o mnis4 mno5l 1mo 4mo. 2moc mod1 mod5ifie mogast4 mo4go mog5ri m5oir mok4i mol3a 4molog. 4mologs 4mologu mo3ly mo1m mo4mis m4on mona4 4moned mon1g mo4no monolo4 monolog5i m4op mophil5i mop4t m3orab m3orat4 mor4ato m5ord mo5rel 3moria m5oriz mor5on 3morp 3morse mor5tal mo3sp 5most mo3sta 2m1ous m1p m3pa m4panc m4pant mpath3 mpel5li m5perer mper3i mpet5it mphal5o m4phe m4phl m2pi mp5id m5pig mp3ily mp1in m3pir mp3is m3po mpol5it mpo2t mpov5 mp3to mp5tr m3pu m5q m3r m4ry 4m1s msel5f m5si msol4 mtu4 muck4e muff4 mul1t2 m5unc mu5nio mun3is mus5co mu4se mus5ke mu3til m1v m3w 2my 5my3c my4d my3e 3myi 5myst4 3myt n1a 2na. na2c nach4 na5cious. na5ciousl nac4te nac5tiva na5culari na4d4a nadi4 nad4op n2ae. naffil4 nag4a n4agen 5na5geri na4gi n5ago 5n4a3gr 5nah 5nail na5iv nak2 4naled n5alg n4alia na3ly 1nam 3name nam4n na5nas nannot4 nan4ta nan5ted nan4to na5o 4n4ard nar5tisti n2as nas5i nas5p nas3s nas5te nat5al na5tat n4atee na3the nath4l nati4 n4ati. nat5ic n4ato. na3tom na4tos nat4r na5turi naugh5ti naus3 3naut naut3i na2v na5vel n3b4 nbarric5 nbeau4 nbe4n nbene4 nbet4 nbit4 n1c2a n4cal. ncarn5at ncel4i ncent5ri n4cept. n3cer ncer4e n4ces. n5cet n5cey n3cha nch4ie n3cho nch5olo n3chu n4cic ncid5en n4cif ncip5ie n1c2l n4cles ncoc4 nco5pat n1cr nc1t nc4tin nct4ivi nct2o n1cu ncu4lo n4cun n4curvi ncus4t 4nd n2da n3da4c n3dal n4dale n3dam nd3anc nde2 n3dea nde3ci n1ded nde4l ndeleg4 nd3enc ndepre4 n3derl nde4s ndes5cr n5dez nd4hi n1dic ndic5u ndid5a n3die nd5ily nd4ine nd3ise nd5is4i nd5ism. nd5ity nd3ler nd1li n5doc ndor4 n2dou nd5our ndrag5 ndram4 n5dron ndu4b nduct5iv n4dun nd2we n3dyi 2ne. ne3alo n3ear ne2b3u 5neck ne4cl ne2co n5ectom 2ned 3nedi ne4du4 neg3a ne3go 5negu neis4 2nele ne5lia neli4g n4ely ne2mo 4n1en n3end neo3l neon4 ne2p n1er 4nered 5nering ner5o ner4r5 ner2v nerv5in 2nes. n1esc ne3sia 1ness n1est nes3tr net3a net3ic ne4tog net1r neuma5to neut5r nev5er n4ew news3 n4eys. n3f nfo4 nform5er nfortu5 nfran3 4ng ng2a n4gae n5gee n3geri n5gero ngh4 n2gi n5gic ngio4g n5glem n3glie n5glio ng1n n1go n4gry n1gu n2gum n1h2 nhab3 nho4 nhy2 nhyd5 n1i 4ni. 3niac ni3ba n4icab ni4cen 4nicl nict5a ni4cul4 ni4dio n2ie ni4ers nif4f nift4 nif5ti ni2g night5i n3igm 3nign nik5e n2il nil4a n3im1 n4ime 5nimet n4ines nin4j 5ninn n4inu 5niol ni1ou 3nipu 5niq n4is. n4isk nis4l nis4o n5iss nis5ter. nis5ters nitch4 ni4te ni3tho n4itos ni5tra nit5res ni3tri nit4ur n2iv niv4a ni3vo nivoc4 niz5en n1j njam2 njur5i 4n2k nk5ar n5kero n3key nk5if nk5il 4n1l2 nland5 n3le nlet4 n3m nmater4 nmor5ti n1n4 nne4 nnel5li nnerv5a n3ni nni3ki nnov3 n5nyi 4no. n5obi no5bil nob4l no5blem nobser4 n5ocula no4di n4ody noe4c no4fa nois5i n5ol. no3la nol4i nom3al 1nomi no2mo 4none 3nonic 5nood nop5i nora4t nor5di nor4ia nor4is nor3ma n4oro nor4t n4os. nos4o no3sp not1a 3note n1ou n4oug 3noun 2nous nou5v nova4l nove2 nov3el novel5e n4ow now5er now3l n3p4 npil4 npla4 npoin4 npo5la npos4 npri4 n1q n4quef n1r nre4i nre3m nres5tr 4n1s ns2c n2sco ns3cot n4scu n5sec nsec4te n2ses n5seu n3sh2 n2si ns3ib n4sic n5sick n3sid n3sie ns5ifi ns3ing n3sio n3s2is nsi2t ns3iv nsolu4 n5son n4sore n4sory n3spir n3s2t nsta4 nstil4 n3su nsur4e n3swa ntab4u nt3age nt1al n4t3anc nt5and ntan5eo n4t3ant nt4ariu n5tasis nt3ast nt1at nt5ath nt3ati nt5ativ n5tau n1te n4tec n4tee. n4tees n3tel ntend5en n4teo n4ter. n3teri n5tern ntern5al nter5nat nth2 n1the nther5 nth5ine nt2i nt4ib n4tic. n5ticis n5ticiz n4tics ntic4u4 n3tid4 n1tie n4tify. n3tig nt5ilati n5till nt3ing nt5ing. nti3p n4tipar n4tis. nt3ism nt3ist n5titio nt3iz n2tj n1t2o n3tom ntoni4 n5top n1tr ntra3d nt3ral n4trant n3trat nt5ress nt3ril ntrol5ler n5trym n1tu n3tua ntub5 ntup5li n5tur n2ty n2u nu1a 5nuc 3nud nud5i nu3en nug4a nu3i nu4is 5nuk n4ulo n3ult nultim5 nu1me 5numenta 5numer 5numi 3nunc nu3tat n5utiv nu4to nu1tr n3v2 nve2 nvel3 nven4e nven5o nvers5an nvi4t nvoc5at n5w nwin4 nwom4 n2x4 2ny2 5nyc nym5it nyth4 n1z2 nzy4 2oa2 o5ace o3act oad5er oad5i o3ag oak5er o3ales oal4i oal5in o5alit oan4t oap5i oar5er oar4se oast5er oat5a oat5ee oat5er 4oba obe4l ob2i ob3ing 2obi3o ob3it o3bla ob1li 4obo ob3oc o5bol o5bot o3bra obrom4 ob5t ob3ul o3bus 2oc oc2a o4cab o3cad oc5ag o5calli o4c5ativ oc5ato 4o3ce2 o4cea ocen5o ocess4i och4e och5in o3chon ochro4n o5chu oci3ab oci4al o1cl o2cle o1cr ocre3 oct2 oc2te oc1to ocu4lu ocum4 oc5uo ocuss4 ocus5si ocut5r o1cy o5cyt ocyt5o od3al. ode4c o5deg ode4ga o5dend o3dent odes4 od3ica o4d1ie od3iga od4il od1is2 odis5ia od5it 5odiz od3li o2do od5olo od5ous o3dro od5ru o2du odu5cer o4duct. o4ducts od3ul o5dyt oe3a oe4bi oe5cu oe4d o5ee oe5ic o3elec oelli4 oelo4 oe3o4p oep5 o5eq o3er oes3t o1et o4et. oet3i oet4r 3oeu o3ev o3ex oflu4 4ofo o4ful ofun4 2o1g o2ga o3gam og5ar5 o3gas ogen1 o5gey o3gi o4gio og2na ogoni4 o4got o2gri o4gro og4sh o2gu o5gyr o1h2 o3ha ohab3 o3he oher4er o3ho4 ohy4 2oi oi4c o3ic. oi5ch o2i4d 4oide oig4 oi5ki5 oil3er oil5i oin3de o3ing oin4t5er oin4tr oi4o 4ois o3ism oi4t oit4al oith4 o1j ok4ine ok3l ok5u ola4c o4lack o5lali ol4an olan5d ol5ast olat5er ol5ch ole2c4 ol5eci ol5efi o3leo ole4on o3lep ol1er o3lest o3leu o1lia ol3ica o3lice ol5iciz ol5ick ol3ics ol5id. oli2e o3lier ol5ies. o5lif oli4f3e oli5go o5lina ol3ing oli5os ol5ip4 olis4 ol2it olle2 ollim3 ol4lope ol4lyi ol3mi o1lo 4oloc ol3oid o4lona olon5el ol1or o3los ol1ou 4ol1ub o3lumi o5lunte ol3us. oly3ph 4olyt 2om o1ma o4mab o2mac o2mal o4mane omast4 o3mat om4be ome4d ome4g omeg5a ome3li om3ena omen4t o3meri om1i o3mia omi2c omic5r om4ie. omil4 om4iny omiss4 om2it omme4 om2na omni3 o4moi omoli3 o2mo4n om5ony o4mos. omot5iv o2mou om5pil ompt5er ona4d on3ai o5nas. onast5i on5ativ 4onau on1c oncat3 on4cho 5ond5ar ond5ent on3der on3dr on5dy o2ne 4onea onec4r 4oned on1ee on5ell o3neo on3ess on1et ong3at on4gu 4onh 4o1nia on5iar 2oni4c onic5a onical4 on4id on3ies on3if o5nig o1nio onk4s 4onnes on5odi on5oi ono4mi 4o5nomic ono3s o5nota ons2 2ont ont5ane. on4ter onti5fi onton5 ont4r on4tre on5ur o5nus onvo5lu on2z 2oo oof3er oo1i ook3er ook3i oo4le ool5ie oo4m oon3i oo2p oop4ie o3opt oo4se oost5er oo2t oot3er ooz5er o1pa o4pab o5pali opa5ra opath5 o5pec opens4 op1er 3opera 4operag o1pha o4phe oph4ie o5phil op5hol o1phy ophy5la op1i op3ies op5ing o3p2it 4opl oplast4 o4poi opol3i opon4 op5ony op5ori opoun4 o2p5ov op2pl op5pli oprac4 op3ran opre4 opro4l op5rop op5so 1op1t op2ta op1u o5quial or1a or5ado ora4g o5rai or5al 4orals oram4 oran3e orator5 orb3in or4ch orch3i or4du 2ore or5ead ore5ar ore5ca ore3f ore3g or3ei oreo5l or3esc ore3sh or3ess orest5at or5este or5ett ore4v 5orex or4fr or5gn or1i 4ori. or3ia. 4orian ori4ci ori5cid orien4 or3if 5orig ori5ga ori4no 4orio. or5ion 4orios ork5a 2orm orm1i or3n4a 5ornis or3nit or3one o5roo or5ose or5oso or1ou orrel3 orres3 or4sc or4sey or4sti 2ort ort3an ort3at ort3er or5tes. or3thi or4thr or4tit ort3iz or4tor or5tra ort3re 4or1u or4un ory5p osa5i os3al osar5 o1sc os4ca os4ce o2sch o4sci osclero5s o3sec osec3u ose5g os5enc osens4 os5eo oser4 o2set os5eu o3sia osi4al osi4an os5ide o3sier os5if os1in o4sis o5ske o5son o3soph os3opo 4osp o3spec os1pi os4sa oss5ar os4sit 4osta ost5age os4tar os5tee os5ten osten5t ost5ica os3til o5stome ost3or 4osu os1ur 2ot ot3a4g o5talit ot3am ot4anic o3tap ot4atio o5ta5v o3tax o4ted oter4m ot5esta 4oth othalam5 oth5erin o5therm otherm5a o5thor o5tia o5till 5ot5iniz ot4iv o3tiva o5tivi o1t2o o5tone o4torn o4tou 4o1tr oturi4 oty3le o4u2 5ou3a oub2 ou5br ou5ca ou5co oud5i 4oue ou3et oug4 ou5ga ought5i ou5gi oul4t oult5i ou3m 2oun oun2d ound5a ound5el oun5gin oun3tr oup5li our3er ou5san 2ouse 5ousia ouss4 out5ish ouv5a ova3le o5var 4ovati ov5eling o4ver. over3b over3s ov4ete ovid5en o1vis ovis5o o2v5os ow3ag ow3an o5way owd4i owd3l ow1el owel5li ow5ha owhith4 ow1i ow5in owi5ne ows4 ow5sh ow5sl ow5y o4x ox3i oxic5ol ox5o 2oy oy5a oys4 2oz o1zo ozo5i o3zyg 4pa. pac4te pa5dou pad4r paes4 pa3gan 4pagat pag4ati pain2 4pairm pa5lan pal3in pa3lo p4als pan5ac pan1e pan3i pa4pa pa3pe pap3u pa3py 1par para5s par3l pa3roc pa3rol par5on 1p4as pass5ive pas1t pas4tin pa3ter pati4n p5ato pat4ric pa5tricia 5pau paul5e pau3p pa5vil 5paw pawk4 paw5ki 2p1b p1c4 p5d2 2pe. pearl5i pe4co pec4tu 2ped 5ped3a 3pede 3pedi ped3is 3peds pe2du p4ee pe2f 4pele pe5leo pel5v pen4at 5p4enc pend5er pen5dr pen4ic 3p4enn pens5ati pen5u pe5on 5perc percent5 4pere perem5i p4eri 5p4er3n p3eron per4os. per5tin pert5is per3v p4ery 2pes pes4s3 pes5til 3pet pet5all pet3en pe2ti pet3r pe4wa 4pex p1f p5g 2ph. 4phae pha5ged ph5al. ph2an phant5i phe4 ph5esi ph3et 3phib 4phic 1phil phi4n ph1is phi5th ph2l 1pho 4phobl 4phoned 3phor ph5oriz phos3p ph3ou 3phra 4phs 1phu phu5i 2phy. 3phyl 4pi. 3piar 4pica p5ical pi3co pi4cr pict4 p2ie p4iest pi5eti p5ifie pig3n p2il 3pile pill5in 5pilo pi3lot pim2 pin4e pin5et 3pinge p4inn 5p4ins 3pi1o pip4a pi4pe 5piq pir5ac pir4t p4is. p4isc pis2s piss5a pis5til pis4tr p2itu 2p3k2 p2l2 1pla pla5no plant5er plas5tici pla5t4o 4ple. 4pled. 3pleg 3plen 2ples 4plism 4plist plu2m plum4be plumb5er p4ly 2p1m 2pn pnos4 1po 4po. po3ca 3pod 4pof 2p5oid pois5i po5lemic po4ly1 poly3s poman5 pom4e p4o2n pon4ac pon4ce pon4i4e 3ponif pon5ta 2pony po4pa po5ple 4porato por3ea 4pored pori4f por3p 3port por5tie 3p4os pos1s2 po1te poult5e pound5er pout5er p5oxi 5poy 4p1p2 ppar3 pparat5 p4pene ppet3 pph4 ppi4c p4pled p5pler p5plet ppress5o pprob5a 1pr2 prac1 pra5d prar4 4pre. preb3 pre1d pref5ere prel5ate 3prem pre5mat pren3 pres3a pre5scin p3rese 5pressi 5prici pri4es 4pri4m pring5er pring5i 4prio p5riol pri4os pris5in priv2 4priva 4pro. pro3bo p3roc3a pro4ch pro1l pron4a proph5e propyl5 pro3r2 pros4i pros5tr pro3th 4pry 2ps2 p3sac psal5t p3sh p1si p5sin. pso3m p1st psul3i 3psyc 2pt2 pt3ab p4tad p4tan p2tar pt5arc p1ted p5tena pt5enn 5ptery p5tet pt4ic p5tie p3til p2t3in pt4ine p3tise p5tisi p5tom p4tr p1tu pub1 pu5be puc4 puch4 pudi4c pu5er puff5er pu4lar pu5lar. pu5lis p4u4m pum4o p4un pun4a 3punc pun5gi pun3i pun2t pu3pi pur5b pur3c p4us push4ie pu3tat p5u5tis pu3tr 4p1w 2p4y py3e 3pyg 3pyl pyr3e py5t 4qf qu4 5quak 4quar qua5tio 2que. 3quera 4quere 4ques. 1quet 5quina 5quir 3quito 4quitu 4ra. ra3ba 5rabe 3ra3bin r2abo ra3bol rac4a r2acu rac5ula ra5culo r2ad ra4de rad4ine rag5ou ra3gr 3raill ra5ist 4ralia ra3ly r5amn ra3mu r4andi ran5dish ran4du ra5nee ran4gen ra3nia ra3noi ran2t ran5ted 5rantel rant5in rant5o rapol5 rap5to 4rarc rare2 rar3ef rar5ia. ras2 ras3c r2ase r4ask ra3so rass5a rass5in r4as5te ra5tap ra5tat rat5eu rath4e rat3if rat4in. ra5toc 5ra5tol 4r4atom ra4tos ra5tui rat5um rat3ur rav5ai rav5eli rav3it rawn4 ra3zie r1b r2ba r4bag rb3ali rb1an rbar3 r2be rbe5c r3bel rbel5o rb3ent r4bes rb2i rbic4 rbic5u r2bin r5bine rbit1 r2bos r4bum rbu5t4 r1c2 rcant5 rca4s r4cele rcen5er rcen5tena r2ces rcha3i rch3al rch5ard rch5ate r3cheo r4cher rch4ier r4chin rch3is r3chit rcil4 rci5nog rcis2 rciz4i r2cl r4cle r5clo rcolo4 rcrit5 rcriti4 rct4 rc5ti r5dam r4d1an4 rd4an. r2dar r5de4l r3dens r4des rd5ess rd5ian r4die r5dig rd2in rd3ing rdi3o rd1is2 rd5ler rd3li r4dol rd5ous r2e 4re. rea4 r4ea. react5iv re3af re3ag re5alt re5amb re3ani re5ant re5asc reas3o r5eau 3reav r5ebrate reb5uc re3cal rec4ce re3ce reced5en re3cha reci5si r4e1c2r rec4t3r re3cu 2r4ed re1de re3dis re4dol re1dr reed5i ree3m 3reer re2fe re3fin re5gali re5gra re3gre reg3ri re3gro reg3ul rei4 re3if re1in re3is reit3 reit4i re1la re1le 4reled re3lia rel3ic re5lig reli4q rel3li r5em. rem5ac reman4d rem5ato r3emp rem5ul rena4 ren5at r4endi rene2 ren4es r4eni renic5 ren4it ren4ter re5num re3oc 3reog re5ola re3oli 3reos re1pe re4per re5ph rep5id re3pin re3ple re4pre re1q rer4a rere4 re5rea re3r2u 2res. re3scr re3sel re3sem re3ser res5ist re5sit re3spe r3esq re5stal rest5er re5stu 3retar re3ten re4t4er3 re5term re1t2o re5ton re3tra re3tre re5tri re3tu re3un reur4 re1v rev3el revi4t r1f rf4l rfu4m r1g2 r4gag rgal4 r2ge r5gee r4gene r3geo r3ger rg5li rgu5f rh2 r5hel4 rhe5ol rhos4 3r2hy 4ri. ri3am ri5ap 2r2ib ri3bo rica5tu 2rice rich5om rick4en r4icl ri5cli ri3col ri5cor ri4cra 2ricu rid4al rid4e ri5el ri3er ri2es rift5er rif5tie 5rifuga ri5gam rig5ant ri5l4a r4ile rill5er. rill5ings 4rim. ri2ma rima4g rim5an4 rim3at r4imb rimen4 4rimm 4rims rin4e r4inet ring5ie rink5er r4ino rin4s rins5i rin4t5er ri3o rio4g 5rione ri4op ri5or ri5p2a ri5pie rip5lica ri5r ris4c ris4is r2isp ris4pa ris4pe ris5ter 4risti ri3ton r5it5r r2i4v riv4al ri5vall riv5eli riv3en riv3il 5ri5zo r1j r2k r5kas rk5ati r5kell rk5eni rk1er r3ket r3key r3kier r5kiest r5kin. r5kins rks4me r1la rlat3 r1le r3l4ic r3line r5lins r4lit r1lo r3mac rma5ce r5mad r2mal r4manc r4mano r4mari r4mary rm4as r4m3ati rma5toc r5ma5tol rme2a r2mic rm4ica r5m2id rm4ie r5mig rmil5 rmin4e rm3ing r4ming. r4mite. r3moc rmol4 r1mu rmu3li r2n2 rn3ab r3nac r5nad rn5ar rn3ate rn5atin rn5edl r3nel r3ness rn5est r3net r3ney r5nia rn5ib r3nic rn3in rn4ine r1nis rn3ist rni5v rn3iz rn5n r3noc r5nog rnt4 rnuc4 r5nut 4ro. ro4be rob3le ro5br 5rocc ro3cu r2od ro3do rody4n ro1fe ro3gn 4roi ro3ic roid3 ro3la r4oled rol5ite ro3ly romant4 ro5mel ro3mit romolec5 rom4p ro3mu ron4ac 4ronal ro5nate ron5ch ron4do rong5i r5onme ro1no ron4ton roo4 1room 5root r2op 4rop. ro3pel rop4ine r4opr r5opte ror5d 4rore r4osa rosi4a ro5sol 4ross ro5stat ros4ti ros5tit ro3tat ro1te ro4ter ro3tu 5roue roul3 round5er rou5sel 4rouss r4out r4ow row3er 4rox rpass5in rp3at rpe2 r3pent rp5er. r2ph rph5e r3phol rp3ing rp5is rpol3a r2p5ou rpre4 rpret5er r3pu r1q 4r1r4 rra4h rran5gi rrap4 rre2l r4reo4 rrhe3 r3ri rric4 rricu4 rri4fy. rrin5ge rri4os rrob3 rrog5 rro4t r5ru rry5 r3ryi r3rym 2r1s2 r4sag r2sal r5salis r5saliz r2san r4sar r2se r3sea r3sec rsel4 rsell5 rs3er. rs3ers r3set r3sha r3shi r4shie r5si2a rs3ib r5sie r4sil rs3ing r3sio r4sit rs3iv rs5li rstor4 rstrat4 r3su r4sus rswear4 rt2 rt3ab rta4g rt3age r3tar r4tare rt3c r1ted r4tedl r3tel4 r5tend rt3eni r5terer r5tet r5teu r4thene rth2i rth5ing. rth3ri r1t4ic r4ticl r5tiet r5tila r5till rtil5le rt5ily r2tin r3tina rt3ing r3titi rti5tu rt3iv r2tiz rt5let rt3li r1t4o rto5l rt5rid rt5si r1tu r4tus rtwis4 ru3a r4ube rub3r ru4ce r2ud rue4l r4uf ru3in ruis5i ru2l r4ume r4umi ru4more run4cl runcu4 runcul5 run2d4 run2e ru5net run4g run4t ru2p rup5lic ru3pu rur4i rus4p rust5at rust5ee rus5tic rus4t5u ru3tal ru3ti r1v2 r4vanc r2ve rvel4i r3ven rven4e rv5er. rv5ers. r3vest r3vet r3vey rvi4t r1w 2r2y ry5er 5rygm ry4go rym4b 3ryngo 4ryngol ryp5a ry2t ryth4i r2z 2sa. 2sab s3abl 5sack sac4q s3act sac4te sad5i sad5o 5sae sa4g 3sai sain4t 5sak sa2l sa5lac 3sale sa3lie s4al4t sa3lu sa4m sa5min sam5o samp4 san3a san4ded s4an4e san5gar san5if 2sant sant5ri s3ap sap3r sar5s 3sas. sas3s sassem4 s2a1t sa2te s5ativ s5atory sat1u 1sau sau5ci saur5 savi2 sa3vou 4s3b s4bei sbe4s sby3 sc2 s1ca sca5len sca2p scar4c scav3 s1ce s4ced 4scei 4s4ces sch2 scid5 s2co scof4 s4coi 3s4cope 5scopic 5scripti 2s1cu 4scura. 4scuras 2s1d2 2se. se2a s4eam seas4 sea3w sec4a sec5an se2co secon4 2sed se4da sed4it 3seed 3sei sei3g 5sela 4sele se3lec selen5 5self 2s4eme sem2i semi5d sem4o sen5g 3sens sen5sati sen5sori sent5ee 5sentm seo5log se2p sep3a sep4si 3sept sep3ti ser4an se5rene ser4to 4servo s2es 4ses. se5sh s5esta 1set 5seum 3sev sev3en sewo4 3sex sexo2 3sey 2s1f sfact5o sfi4 sfor5e sfran5 2s1g4 s2h 4shab sh4abi sh1er sh5et shil5li sh5iness sh3io 5ship s3hon 4shu4 shys4 si4all siast5 4s1ib s3icat 3sicc 2s5icl si4cu si5cul s4id 4sid. si4de side5l sid3en sid5eri 4sids 5sid5u4a si4ers sif4 sif5f si4g 1sili sim4ply 2sin s2ine sin5et 5sing5er sin3i 5sink si5nol si3nus 1sio4 4sio. si5o5s 3sip si4pr s1is2 4sish 4sism sist3a sist3o s1it si4te sit5om 4s1iv 5siva s1j s2k2 4sk. s5kar ske2 s3ket s5key s3kier s5kiest sk5ily sk5ines 4sks sky3l 2sl4 slang5i s1lat 3slau slav5eri s2le s5lea s3let s5ley s3lit slo3c slov5 s5luc 2s1m4 s3man smas4 s3men smi3g 3smith smo4d smu5tatio s1n2 s2na 2so. 2s3od sod3o sody4 3soe 4s3oid s2ol sol3a so5lan sol4er so3lic 3solve solv5er 1so2m soma5to 3some. so5mete so3mo s2ona son5at s4one son5or s2o2p 4sor3ie 5sorio sor4it s5oriz sor3o s3ory sos4 4sose so5th 3sou sov5e so3vi spast4 spens5a 4speo 3sperm s5pero spers5a sph2 s3pha 3spher spic5ul s2pid sp5id. s5pier spil4l s2pin sp3ing spi5ni spital5 s1pl sple2 s4ply s2po 5spom spon5gi 3spons 3spoon spru5d s4py s1r sre2 sreg5 srep5u sre4s 4ss s1sa s5sam2 s1sel s5seng s3sent ssent5er ss3er. s5seri ss3ers s5seu ssev3 s3sia s1sic s1sif ss1in ss4in. s4sine ss4is. s3s2it ss4ivi ss5li ss3m s4sn s1so ssol3u ssolu4b s4sore ssor5ial ss5po s1su ss3w st2 4st. stab2 sta3bi 4stak s4tale stant5iv s3tas. 5static st3c ste2 ste5ar ste5at s4teb s4tec 4s1ted s4tedl s4tedn 4stere ster4ia s4tern. s3tero st5est s1th s4tha s4thu s3ti3a 3stick s3ticu stil5ler s4tily st3ing 5s4tir s5tiz 4stl st3ler st3li s4toe 3ston stone3 ston4ie s5torat stor5ian s4tose s2tou s4tray stre4 strep3 3struc stru5d 2st3s s1tu s4tud stu4m stur4e 4stw s4ty 1styl 4su. su5an su4b1 subt2 suct4 sud4a su3et suf3f sug3 3sui sui5c su5ing 1s2ul s4u2m sum3i sun4a su5pe su3pin supra3 sur4as sur3c s4urg sur3pl su5su su5z 2s3v svers5a sves4 svest5i sw2 5swee swell5i 4swered 2swo s2y 4sy. sy4bi sy1c sy4ce sy4chr sy4d 1syl 3syn syn5e sy5pho syr5i 2ta. 2tab ta5blem 3tabli t2abo ta3bol ta4bou t4a3ce ta5chom ta3chy ta4cid t5ade tad4i 5t2adj ta5dor tad2r tae5n taf4 tage5o ta5gog 3tagr 3tah 1tai 3tail 2tair t4ais 1tak tal2c tal5ent ta5lep t4alia t4alin tal4l3a 5tallu t2alo4 ta3ly tam5ari 5ta3met tamorph5 tan5at tand5er t4ane 5tanel tan5ie t5aniz tant5an ta4pa 1tard tar5ia. tark5i tar3n 3tarr tas3i t3asm 5tass tas4t ta3sta tast5i4c t4ateu 3tatis t4ato. tat4ou tat4r tat3ut tau3to t5awa tawn4 t4ax 4t3b 2tc2 t1ca tcas4 tch5ett tch5u 4t1d4 4te. te5cha 5techn te3cr t4ed te5d2a 4tedd 4tedo 4teei te2g 5tegic t3ego teg1r teg3u tei4 te2l 4teled tel5iz 1tell 4te3lo 3tels tem3a 4teme te5mon ten4ag 4tenar 4tene t5enm 5tenna 4teno te5nog tent4a te2o teo5l 2tep te3pe tep5i tera4c t4erag t4erato 3ter3b 5terd 2tere4 ter3eb ter5ec 5terel te3reo 3teres4 1teri ter3ia ter5id ter5if t4erin ter5iorit ter3it ter5k 5ternit ter5no 3terr 2t2es 4tes. tesi4 t3esq t3ess. t5esses tes4t test3a 5teste test5er test5in test5or tes5tu teti4 tet1r tetr5o tew3ar 3tex 2t3f t3g 2th. tha4 th5al. thal3m 4the. 4thea th5eas 4thed 1thei 3theo theo3l t4her 5therap th5erc t5herd 4thered th3ern th3ery 4thi. t5hill 3think 5th4io th4is. th5lo 2thm2 th4mi th3oli 4t5hoo 4thopt 4thores 3thot 5thoug 1th2r 2ths 5thur 5thym 3thyr thys4 4ti. 1ti2a ti3ab 2t3ib 5ti5bu t1ic t3ic. tic5as t2ici tici5ar 3ti3cin t4icity ti3col tic1u 4ticule t3id. t4ida 3tidi ti3die t5ids 3ti2en 1tif2 ti3fe 4tiff 4tific. 3tigi tigi5o 4tigm 5tigu ti4ka ti4let 5tilin t4ill til4l5ag t4ilt 1tim tim1a 5timet4 t1in 5ti5nad 4tined tin3et ting5ing 3tinn 4tins t4int tin4te tin5ted tint5er tin3ue 1tio ti3oc tiol3a ti5omo 4tionem 1tip ti5plex ti3pli ti4q ti5qua t3iris 2t1is 3tisan tis4c tish5i 3tiss tis2t 5t4iste t4istr ti5t4an tith4e tit5il t3itis 3titl ti3tra 3tiu 2t1iv tiv5all t3ive tiv3is 2tl t1la tlant4 5tleb 5tledr 3tlef 3tlem 5tlen 5tletr 5tlew t1li tlin4 4t3m tmet2 tmo4t5 2t3n2 t4nere 2to. toas4 to1b 4tocc tode5c tod4i to5do 3toe 1tog 2t3oid 5tok 4toled tol4l tolu5 to5ly tom3ac toma4n tomat5ol tom4b to4mog tom5os ton4e ton5ea 3tonn ton3s top4e to5pia to4pos t1or to5rad 4tore tor5er tori4as tor5oi tor5p tor4q 3tos. to3s4p tos4t to5str to5talis to5taliz to3tem tot5u tou4f 5tour t3ous 4tov to3war t3p tr2 tra4co 4tradd 4traist tra5q trarch4 tra5ven tra5vers trav5est 3tray 4tre. 4tred tre4mo tren4 trend5i tre5pr tres4s 4trew t5ricl 3tricu t2rie tri5fli trifu5ga 2tril tri3li tri3me t2rit 4trix t4rod tro5f 5troop tro4pha tro3sp t2rot t5roto tro1v 3troy t4ruc tru3i 2t4ry trys4 4t1s t2sc ts4h ts2i t4sil tstay4 2t1t4 tta4 t3tab t5tan t5tas t3ted t4tere t5terer t5test t3ti tti3tu ttitud4 ttitu5di t3tler t3tli t5toi t5tor t3tos tt5s t4tupe t2ty 4tu. tu1a tu4al5li tuari4 tu4bin tu5bu tu5den tud5ie tu5en 4tuf tu1i tu4is 2tum. 3tumi 4tums 3tun tun4a tu4ne tun5it tup5let tup5lic tu5rac t4uran turb3a tur4d turf5i 5turit tur4n 5tur5o 1tut 4tut4iv t1w t3wa4 t2wi twi5li t3wit t3wo twon4 4ty. ty4a 5tych ty4let tyl5i ty5mi 1typ 3type 1tyr1 2tz2 t5zia t5zie 2ua2 ua3ci u2ag ua5h u1al ua5lu uan4o uant5is uant5it uar3a uar2d uar3i uari4n uar5ters uar4t5i ua5tern uba4 ub5bly u1b2i u4bicu ub3lin ub5lo ub3ra 4uc u1c2a uccen5 u4cend u4ch u5chr uc3l u4com uco5t uc2tr uc3ub uc5ul u5cum u5dac ud1al ud4e ud5ep u4der udev4 ud4g udi4cin ud3ied u5dinis udi3o u5ditio u2do u5doi ud5on u5dor ueb4 u4ed uen4o uen4ter uer3a ues4s uest5rat ues5tri ue4t uf2 3ufa u3fl u4fo uft4 uga4c ug5lif ug2ni u4go ug3ul ug3ura uhem3 2ui2 ui3al u2ic uicent5 uid5o uil4a uild5er ui3lib uil4t uinc5u uin4s uint4 uin4ta ui5pr uis3er uis4t uisti4 uit5er ui5val5 ui3vo u2iz 4ul. u1la u4lab 4ulac ul5ard u5lat ul4bo ul3ca ul4ch 5ulche 5ulchre 4ulea u5lee u1len4 4ulenci u5lent ulet4 ul4ev ul2fa ul2i ul4ia u3line ul3ing ul5ish u5liti u5lity 4ull ul4lat ul4l5ib ul4lis ul4lit ul3m u1lo u5lom ulph3i ulph3o ulp5ing ul4po 2uls ul3sif u1lu ul1v4 u1ma um3am umar4 u5mas um4bar. um2bi umen4t u1mi u4mic u2m5if umi4fy umi5lia umin4ar u4mined u4m3ing u4mora u4mos um2p um4pa ump3er ump5li umpt4 ump5te u1mu umu4lo un1 u4n3a4 un5ab unabu4 un4ae un4as. un2ce un4dal un3ded unde4t undeter5m undi4c un4die un3do un4dus u3n2er unho5li un2i u1nic un4ie un3in un4ine uni5p uni3so un3ist uni1v un3iz unk5eri un5ket un3kn 2unn un4nag un5o un5r un3s4 un5sh un2ti until4 unu4 un3us uo3de uodent4 u5oros u3os uo5tatio u1ou 2up u1pat u1pe u5pee uper3 u1ph u5pid up3ing u4po u5pol u2pr upre4 u5quet u4r ur1a 4ura. ura4ci 4urae ura2g 4uranti uras5 urb5ing ur2c urc3a ur5den. ur5deni ur5die ur4du ur3ea ur5ee ur1er ur3ers ur1e2t ur3ett ur2f ur3fa ur1i u5ri5cu ur4ie. ur5ifie uril4 ur4ili ur5ion uri4os. url5er ur5lie url5ing ur1m4 urn3al urn3er urn5s ur1o uro4d ur5o4m ur5ot uroti4 urpen5t urph4 ur2s urs5al urs5er ur3sh urs3or ur5ta ur1te ur5tes urth2 ur3the urti4 ur1u ur4va u3sad us3ag us3al us4ap us3at 2usc us4can ush5a us5ian usil5 u4s1in usk5er us1p us4pa uss4e 4ust us3tac us5tan ust4ic us5tici ust5ig ust3il us1to4 us1tr us4tre usur4e us5uri u3tane utch4e ut5eni u5teo u4tere ut2i u3tie ut3ing u5tini u3tio ut5ism ut3ist 5u5tiz ut3le utli4 ut2o u4to5s u4t1ra uts2 ut5sm ut4tone u3tu u4tul uu4 uv2 u4va uve2 uven3 uv5eri u5vin ux2o uy4a uy5er 4va. 2v3ab 5vac va1ca va5ceo vacu1 v4ad 3vag3a va4ge 4vaged vager4 vag5r v1al. 1vale vali2 va5lie val4ise 5valu 5val4v vam4i va5mo 5vann vanta4 4vantl var4is 4vase vas5el5 v5a4so vast3a v4at. 5vatee vat4ina 4vatu 2ve. vect4 ve3g 3vei 2vel vel3at 4vele v3eler ve5line v1ell v4ella vel5ler vel3li vel5opi ven4al ven4do ve1ne ve5nia vent5o ven4tr 4venu v5en5ue 5ve3o 5verb verde5v 4v4ere4 ver5ea ver3ei v5erie ver3m4 ver4ne 5verse 4ves. 4vi. 5vialit vi4atr vi1b4 vic2 vi4ca vi5cari vice3r 5vict2 5vicu 5vider vign3 vi4l vil3i 3vili4a v5ilise v5ilize vil5lin vim4 5vime 2v1in vin4ac 3vinci vin2e 5vinit v5iniz vint4 vin5ta 3vi1o viol3 vi5om 5vi3p vire4 vi5rid vir3u 5visecti 5visio v3ism 2v5ist vi2t vit2a vi3tal vi5tel v5itie vit1r vi3tu v3ity viv5al viv5or vi5zo 1vo 2vo. vo2l vo5litio vol4ubi volv4 4von vo5rac 3vorc 4vore 3voro vo3tar 2vow vr4 v5ra4 v5ri v5ro vrot4 4vs v3ure 2vv2 v5ver v5vi 4vy 4wab wag3o wais4 w3al. wall5er w3als wan5gli wank5er war5ded ward5er ward5r war4f war4te war5thi wass4 was4t wa1te wav4ine w1b4 w4bon w5c w5die w3dr we4b w4ed 3weed 5wei weight5i weir4 wel3i weliz4 wel4izi wel4li went4 wes4 west3 w5est. w5f wh2 w5hid wi2 wid4e wi5er will5in wim2p win2e wing5er win4tr 3w4ise with5eri w3la wl1er wl1i wl4ie w1m 1wo wol4 wol5ver 3wom won2t word5i wotch4 woun4 wp5in wra4 ws5ing w5ster wt4 w5te w3to wy2 wz4 x1a x4ach x4ade x2ag x3agg xa5met x3ami xan5d xano4 x2as xas5p x3c4 xcav3 xcor5 xe4 x1ec xec3r xe5cutio xecut5o xe2d x5edl x5edn x5eg x1em x3en xen4op x3er xer4g xer3o x1h xhort4a x1i x3ia. x4ias xi4c x5ige xim3a x4ime ximet4 x3io xi4p x4it. x4its x1o x4ode x5om xo4mat xo4n x4os xotrop4 x3p xpel4 xpo5n2 xpoun4 x1s2 x1t2 x4ted xtens5o xter3i xter4m3 xtern3 x4th xti4 xtra5d xtra3v xtre4 xu4o x1ur xur4b x5us x5w xx4 xys4 xy3t y1a2 y5ac 1y2ar 3yard yas4i 4y1b yb2i yca5m y5chede ych5is y3cho y4chose yc1l yclam4 y4coli y4coll ycom4 y2cos y1d4 yda4 yder4 ydro5s y4drou y3ee yel5o y3en y1er y3est. yes5te y5ett y5f y1g ygi2 ygi5a y3gl ygo4i y1h y1i y3in yle2 ylin5de yllab5i yl3os yl5ou y1me4 y3men y5met y5mia ym5in ymot4 ym4pha yn1 ynago4 ynand5 yn5ap4 yn5ast yn4ci ynd4 yn2e yn3er yng4 yn4gol yni4c yn4y y1o2 yo3d yo4gis youn4 young5 2yp yp5al yper3 y5pere y4peri y4pero y4pet y2ph yph4e yph3i y4p1i yp1n ypo1 y4pox y2pr yp5ri yp4si yp5syf ypt3a y5pu y3rag yr3at yr3ic y5rig yr3is yr3i4t yr5olo yr4r yr4s yr5u 4y2s ys5ag ys5at y3s2c y3sh ys1ic ys3in ysi4o yso5 ys4so ys1t ys4to y3u yv4 y3w yz5er yzy4 z1a1 2za. za4bi za2i z4as za4te zd4 zeb4 ze4d zen4a z5eng zer5a z3et4 z1i zib5 5zic4 z2ie zi5m zin4c3i z3ing zing5i z4is 3zlem z3ler z3li 4zo. 5zoa zo3an 3zoo2 zo3ol zo3on zo5op zo5oti zo5p zot2 z5s 5zum 4zy. zz2 z3zar z5zas z3zie zzo3 z5zot %} %\hyphenation{ % Do NOT make any alterations to this list! --- DW %uni-ver-sity %uni-ver-sit-ies %how-ever %ma-nu-script %ma-nu-scripts %re-ci-pro-city %through-out %some-thing} libfizmo-0.7.15/src/locales/libfizmo_locales.c0000644000175000017500000000361513153330674021471 0ustar chrenderchrender /* libfizmo_locales.c * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef libfizmo_locales_c_INCLUDED #define libfizmo_locales_c_INCLUDED #include "../tools/types.h" z_ucs libfizmo_module_name[] = { 'l', 'i', 'b', 'f', 'i', 'z', 'm', 'o', 0 }; z_ucs default_locale_name[] = { 'e', 'n', '_', 'G', 'B', 0 }; #endif /* libfizmo_locales_c_INCLUDED */ libfizmo-0.7.15/src/locales/de_DE/0000755000175000017500000000000013153330674016743 5ustar chrenderchrenderlibfizmo-0.7.15/src/locales/de_DE/libfizmo_i18n.txt0000644000175000017500000000754413153330674022170 0ustar chrenderchrenderTracefile „\{0s}“ konnte nicht geöffnet werden. Ungültiger Parametertyp „\{0s}“. Aufruf der Funktion „\{0s}“ lieferte einen Fehler. Unültige Backslash-Sequenz in Lokalisierungsdaten. Warnung für „\{0s}“ an Adresse \{1x}: Funktionsaufruf „\{0s}“ resultierte in Fehlercode \{1d}. Ein Fehler trat beim Lesen von Datei „\{0s}“ auf. Konnte Datei „\{0s}“ nicht öffnen. Fehler beim Lesen des ersten Story-Bytes von „\{0s}“. Unbekannte Story-Version \{0d}. Ein Fehler trat beim Schließen der Datei „\{0s}“ auf. Funktionsaufruf von malloc(\{0d}) lieferte NULL, wahrscheinlich verursacht durch Speichermangel. Funktionsaufruf von emalloc(\{0d}) lieferte NULL, wahrscheinlich verursacht durch Speichermangel. Nichtbehebbarer Fehler beim Lesen der Story-Datei. Nicht nicht implementiert. Anweisungs-Form nicht initalisiert. Unbekannter Operand-Typ \{0d}. Opcode \{0d} mit Instruktionsform \{1d} nicht implementiert. Kann keine Werte von leerem Stack ziehen. Nicht genügend Wörter auf dem Stack um \{0d} Wörter entfernen zu können. Bitte geben Sie einen Namen für die Command-Datei ein. Dateiname darf nicht leer sein. Bitte geben Sie einen Namen für die Transcript-Datei ein. Ungültige Output-Stream Nummer \{0d}. Größtmögliche Stream 3-Tiefe \{0d} überschritten. Diese Funktion wurde deaktiviert. Mehr als 15 lokale Variablen sind nicht erlaubt. Ungültiger Stackindex \{0d} für Ziel von „throw“. Größtmögliche Anzahl an Stackeinträgen pro Routine (\{0d}) überschritten. Nur \{1d} Variablen sind aktiv, L\{0d} kann nicht gespeichert werden. Nicht genügend Wörter von lokaler Routine auf dem Stack. Null-Pointer erhalten. Propertynummer 0 ist nicht gültig. Propertynummer \{0d} ist in Story version \{1d} nicht erlaubt. Objektnummer 0 ist nicht gültig. Pbjektnummer \{0d} ist in Story version \{1d} nicht erlaubt. Objekt \{1d} besitzt keine Property \{0d}. Properties mit einer Länger größer 2 können nicht gelesen werden. Attributnummer \{0d} ist in Story version \{1d} nicht erlaubt. Ungültiger Nodetyp \{0d}. Ungültiger Charcode \{0d}. Größtmögliche Abbreviationtiefe ist \{0d}. Unbekannter Fehlerfall. Ungültiger ZSCII Inputcode \{0d}. Ungültiger ZSCII Outputcode \{0d}. Gültige Kommandos sind: Zufallszahlengenerator ist jetzt im berechenbaren Zustand. Zufallszahlengenerator ist jetzt im zufälligen Zustand. libfizmo version \{0s}. Story release nummer \{0d}. Story serial nummer \{0s}. Aktuelle Z-Stack-Größe: \{0d} Enträge. Z-Stack Einträge in Benutzung: \{0d}. Unterlauf-Überprüfung für Routinenstack deaktiviert. \{0d} Bytes werden von Undo benutzt. \{0d} Bytes von Texthistorie belegt. \{0d} Bytes für Blockbuffer verwendet. Interface „\{0s}“ unterstützt keinen Preloaded Input. Interface „\{0s}“ unterstützt keinen Timed Input. Bitte geben Sie den Dateinamen für das gespeicherte Spiel ein. Fehler beim Speichern in Datei. Chunk „IFhd“ konnte nicht gefunden werden. Fehler beim Lesen der Savegame-Datei. Konnte Releasenummer nicht lesen. Konnte serielle Nummer nicht lesen. Konnte Prüfsumme nicht lesen. Release nummer, serielle Nummer oder Prüfsummer sind nicht kombinierbar. Konnte Restore-Programmzähler nicht lesen. Konnte Chunklänge nicht lesen. Die ursprüngliche Storydatei „\{0d}“ konnte nicht gefunden werden. Konnte weder „CMem“ noch „UMem“ Chunk finden. Chunk „Stks“ konnte nicht gefunden werden. Ungülter IFF Zugriffsmodus \{0d}. Signal \{0d} abgefangen, Interpreter wird abgebrochen. Division durch Null nicht möglich. Opcode JE mit nur einem Operand ist nicht gültig. Funktionsaufruf time() lieferte -1. Unbekannte Konfigurationsoption „\{0s}“. Ungültiger Wert „\{0s}“ for Parameters „\{1s}“. Story hat Z-Versionsnummer \{0d}. HistoryOutput ist nicht mehr gültig. fizmo version \{0s}. Angegebenes Blorbfile enthält keinen „ZCOD“-chunk. Die Datei ist kein gültiges Z-Machine-File. libfizmo-0.7.15/src/locales/de_DE/patterns.txt0000644000175000017500000027305113153330674021354 0ustar chrenderchrender% % This file has been renamed from hyph-de-1996.tex to patterns.tex in July 2011 % for usage in the fizmo z-machine interpreter. Empty lines were removed % and lines containing comments divided into separate data and comments % lines for technical reasons. No other changes made. % % dehyphn-x-2011-06-01.pat % % \message{German Hyphenation Patterns (Reformed Orthography, 2006) `dehyphn-x' 2011-06-01 (WL)} % % TeX-Trennmuster für die reformierte (2006) deutsche Rechtschreibung % % % Copyright (C) 2007, 2008, 2009, 2011 Werner Lemberg % % This program can be redistributed and/or modified under the terms % of the LaTeX Project Public License Distributed from CTAN % archives in directory macros/latex/base/lppl.txt; either % version 1 of the License, or any later version. % % % The word list is available from % % http://repo.or.cz/w/wortliste.git?a=commit;h=2d246449f5c4f570f4d735d3ad091f6ad70f6972 % % The used patgen parameters are % % 1 1 | 2 5 | 1 1 1 % 2 2 | 2 5 | 1 2 1 % 3 3 | 2 6 | 1 1 1 % 4 4 | 2 6 | 1 4 1 % 5 5 | 2 7 | 1 1 1 % 6 6 | 2 7 | 1 6 1 % 7 7 | 2 13 | 1 4 1 % 8 8 | 2 13 | 1 8 1 % %\patterns{% .ab1a .abi4 .ab3l .abo2 .ab3ol .ab1or .ack2 .ag4n .ag4r .ag2u .ai2s .akt2a .al3br .al2e .al5l4en .al4tei .alt3s .ampe4 .amt4s3 .an3d2 .anden6k .and4ri .ang2 .an3gli .angs4 .angst3 .an3s .an4si. .ans2p .ans2t .an4tag .an3th .apo1 .aps2 .ari1e .ark2a .ar4m3ac .ar2sc .ar4t3ei .as3t .as4ta .at4h .au3d .au2f3 .au4s3 .ausch3 .ax4 .äm3 .ät2s .be3erb .be3ra .be3r2e .berg3a .ber6gab .ber4g3r .boge2 .bo4s3k .bu4ser .by4t .ch2 .dab4 .da2r1 .da4rin .darm1 .da4te. .da4tes .de2al .de1i .de4in. .de1o2 .de3r4en .de1s .des2e .de3sk .des2t .dien4e .do2mo .do1pe .dorf1 .dü1b .dys1 .ebe2r1 .ehe1i .ei3e2 .ei4na .einen6g .ei2sp .ei4st .ei4tr .eke2 .el2bi .elb3s .em3m2 .en1 .en4d3er .en5der. .en2d3r .end3s .enn2 .enns3 .en2t3 .en4tei .en4tr .er8brecht .er2da .er4dan .er4dar .er4dei .er4der .er1e .ere3c .erf4 .er1i .er8stein .er8stritt. .er8stritten. .er4zen4 .es1p .es3ta .es5t4e .est2h .es3to .es5tr .et2s .eu1 .eu3g4 .eu3t .eve4r .ext4 .fe2i .fer4no .fi3est .fi4le. .fi4len .fi2s .flug1 .for2t .fs4 .fu2sc .ga4t .gd2 .ge5nar .ge3ne .ge3r2a .ge3r2e .ge3u .gs4 .guss1 .hau2t1 .he2 .he3fe .her3an .he3ri .he6r5inn .hi2s .ho4met .ia4 .im2a .ima4ge .im5m .in1 .in3e .ink4 .inn2e .inu1 .ire3 .is2a .jor3 .ka2b5l .ka2i .kamp2 .ka4t3io .ki4e .kle2i .kni4e .kopf1 .ks2 .kus2 .le4ar .li2f .li4tu .li4ve. .lo4g3in .lo3ver .lus4tr .ma3d .ma2i .ma3la .ma2st .md2 .me2e .mel2a .men8schl .men8schw .men3t4 .mi4t1 .mm2 .näs1c .ne4s .ni4e .nob4 .no4th .nus2 .oa3 .ob1a .obe2 .oper4 .or2a .ort2 .orts3e .os5t6alg .oste2 .ost5end .os8ten8de .oste6re .ost3r .ozo4 .öd2 .pa4r1e .par3t4h .pf4 .ph4 .poka2 .pro1 .ps2 .ram3s .reb3s2 .re3cha .rein4t .reli1 .reli3e .res6tr .ri2as .richt6e .ro4a .ro3m2a .rö2s1 .rü1b .rü6cker6 .sali3e .sch4 .se3ck .sen3s .ser2u .se2t1 .sha2 .sim3p4 .si4te .ski1e .spiege8lei .st4 .sto4re .sucher6 .tage4s .tal2e .tan4k3l .ta2to .te2e .te2f .te3no .te2s .te4st .th4 .ti2a .tid1 .ti4me. .ti4mes .ti2s .ti5ta .tite4 .to4nin .to4pl .to2w .tri3es .tro2s .ts2 .tu3ri .uf2e2 .ufer1 .ul4mei .um3 .umo2 .un3a2 .un3d .un3e .un3g .uni4t .un3s .uns4t .ur1 .ur2i .urin4s .ur3o2m .uro2p .ur3s2 .ut2a .ut3r .übe4 .ve5n2e .vo4r .wah4l .wa2s .wei4ta .wi4e .wor2 .wort5en6 .wor8tend .wor4tu .xe3 .ya4l .za2s .zi2e .zin4st .zwe2 2aa a1ab aa2be aa1c aa2gr 4a1a2n 4a2ar aa2r1a aar3f4 aart2 aas5t aat4s3 a3au a1ä a1b 2aba ab1auf ab1ä ab2äu 1abd ab1eb abe1e abei1 ab1eil 2abel abe2la a3ber ab1erk ab1err ab1erz ab3esse 2abet 2abew 1abf 3abfi 1abg 1abh 2abi ab1ins ab1ir ab1it 1abk ab1l 1a2bla ab5lag 1a2blä 2able ab4le. ab3li ab4lo 3a2blö a2blu 1abn a2bo. ab2of 1a2bon 2abor ab3r a3bra a4brä 2abrü 1abs 2abs. abs2a 2absar ab3s2i ab3sp abst4 2abst. ab3ste ab3sz 1abtei 2abu ab1ur 2abü 1abw 2aby aby4t 1abz 2aca 2ac1c a1cem 2ach. ach1a a1chal ach3au 2achb a1che a2ch1e2c ach1ei a4cherf a4cherk a4cherö a4ch3erw 4achf a1chi ach3l ach3m ach3n a1cho a3cho. ach1o2b ach1or ach3ö ach3r ach3su a4cht acht5erg ach2t1o ach8traum ach8träume. ach8träumen. ach6trit a1chu ach1u2f ach3ü 2achv 4ach1w a1ci ac1in a1ckar ack2en a2ckin ack2se ack3sl ack3sta4 a1cl acon4n 2acu a1ç a1d 2ada. a3d2ab ad2ag ada2m ad3ama a2d1an 3a4dap a3d2ar3 4adav 1a2dä ad1c 1add 2ade. ade2al adefi4 a2dein 2aden ade1r2a a2deri 4ade1s ade3s2p ades4s ade5str 2adf 2adh 4a3di adi3en 5adj 2ado ad2ob 2adp 2adq 2ad3rec ad4res ad3ru 2ads2 ad3st ad3sz ad2t1 ad4te ad4tr 2adu 2a1e ae2b ae2c ae2d a2ek a2ela a2ele ae2o3 ae2p 3a2er2o1 aes5t a2et a2ew ae2x af1a a2fak a2fan a3far af4at a2fau 2afe a2f1ec a2fent af1erl a2fex af2fl af4flu 2afi 2af3l afo1s a2fö af3ra af3rä af3re af3rö af3s2a af2sp af2t1a af2tei af4t3erl af2t3r af4t5re af2tur a2f3ur a1g 2aga ag1ab ag1a2d ag1ar ag1au ag2di ag2dr ag2du age1i age4na age4neb a2gent a4gentu ag2er age4ral 2ages age2sa age4sel age4si age2s3p ag3esse age4s3ti ag3gl 1aggr 3a2git 2a2gl ag4la a4glö ag2n ag4ne. ag4nu a2g3re a2g3ri ag4ro agsa2 ag4sam ag4set ags3p ag4spo ag3sta ag3ste ags4toc 2agt ag2th a2gund 2ah. 2a1ha ah4at 2a1he a2h1erh ahe1s a1h2i ahin3 ahl3a2 ah4l1ei ah4l3erh ah2lö ahl3sz ah4n1a ahner4e ahnt2 1ahor ah1os a2h3ö ahr1a ah3r2e ahre4s3 ah3ri ahrta4 ahr6tri 2ahs aht3s a1hu ah1w a1hy aian3 aid2s ai1e2 aien3 aif2 ai3g4 a3ik. ai3ke ai3ku a2il ai2lo a1ind ain4e a1ing ain3sp 2ais ai2sa a3isch. ai3s2e aiso2 a3iv. aive3 a3ivl a3ivs a1j aje2 ajekt4o 2ak. 1a2k4ad 2akal 2a3kam 2akar ak4at 1a2kaz 2akb 2akc 2akd 4a1ke a2kef aken2n a2keu 2a1ki 2ak3l ak4li 4ako 2a1kr 4akra ak3rau 3akro 2aks ak3sh 2akta ak5tan 2aktb 2aktik ak2t3r ak5t4ri 2aktst 2a1ku a2kun 4a3kü 1akz a1la 2ala. al1ab ala5ch2 al1af ala2g al1age a3lal al1am al3ame alami5 al3amp al1ana a2l1ang al1ans al1anz a2lar a3lar. a3lare al2arm al3arr ala4s al1asi al1ass 2alat al1au al3aug a1lä al1äm alb3ein alb3eis al4berh al4b3erw al2b1l alb3li al2boh al2br alb3ru alb3s al2dä al2dr alds2t al3du 2ale 3a2l1e2b 3a2l1ef a4l1eh a2l1ei a4l3ein a2l1el alen1 al3ends a2leng ale2p al1epo a2l1erf a2l1erh al1erl 3alerm a2l1ert 3a2lerz a2l1esk ale4t al1eta al1eth a2l1eu a4leur 3a2lex alf4r 3algi al2gli 2ali ali4ene ali4nal al1ins a2linv alk1ar 1alkoh alk3s2 alks4t al2lab al2l3a4r al2lau al3lend all5erfa al3les 1allgä alli5er. alli7ers. al2lob 3almb 2alo a2l1o2b alo2ga al1ope al1orc a2l1ö al2ös 3alpe. 1alph al3skl al5s6terb al3sun al2tak al3tam alt3eig al4t3erf al2tre al2tri alt3ric al2tro alt2se alt4stü a1lu al2uf a2lum al1umb al1ur 4aly alzer4z al2zw 2am. 2am2a amab4 amad2 ama3g 2amä 2am4e 4ame. a2meb ame2n1 amer2a a2meri ame3ru a4mesh a3met a2mew 2amf a3mi. a3mie 2a3mir a3mis ami3ta ami3ti 2amk 2aml 2ammal am2mei am2min 2amml ammu2 a2mö amp2fa2 am3pr 2am2s am3sa am4schl am3str 1amt. am2t1a am2t1ä am4tel 2amtem am4t3ern am4tö am2t3r am4tre am2tu 2amu 2ana. 2anab ana3c anadi3 a3nak an1alg ana4lin 2anam 2anan 2ana1s4 an1äs 1anb 2anbu an3ch 2and. an3dac and4art andel4s ande2s an2dex an2d3rü and4sas and6spas and3ste and2su 2andu and1ur 2ane an3e2c a3nee an2ei. an3eif an1e4k 3a4n1erb an1eth 1anf 2anfi anft5s an3f2u 4ang. 3angeb an2g1ei an4g3erf an4g3erl an4gerw an4g3erz 2angf 2angh 2angie ang1l an2gla 2ango ang1r an2g3ra 4angs. ang4s3po 1anh 2a3ni an2i3d ani5ers. 3a4nim a4nins 2anj 2ank. an2k1an an2kei an3kl an4klö an2k3no ank1r an2k3ra an2k3rä ankt4 1anl 2anmu 2ann 3an3na ann2ab 3annä an3n2e an1od a3nol a2n1or a3nos a1nö 2anpr 1anr 1ansä 1ansc ans2en an2seu 2ansk an3skr ans1pa 1anspr an3s2z 2ant. an2t3a4r 1antá 1antei 3antenn an3t4he 1anthr 2anto 1antr ant3rin an2tro 1antw 2a1nu anu3s a1nü 1anw 2anwet 2anzb 1anzei 2anzg an2z1i4n 2anzs 1anzü 2anzw an2zwi 2ao ao1i a1op a1or a1os3 ao3t2 a3ot. a1ö a1p 2ap. 2apa 2ape a2pef a2pé a2pf ap2fa a3pfl a3phä a2pht 2ap3l ap2n a2pot 3appl ap3pu 2apr 2a3pu 2aq 2ar. a1ra a3ra. ar2ab ar3abt ara3d2 a2r3al a3ra3li a2r1ang a2r1ans a2r1anz a2r3app 2a2rar a2r1au a1rä 1arb 2arb. 4arba ar2bau ar2bec 2arben 2arbi ar2bl 2arbr ar2bre 2arbs2 2arbt 2arbu ar2b3un 1ar1c ar2dro 2are a2rea ar1eff a4reg a2reh ar1ehr a2rein a4rek a3ren aren4se are3r2a ar2erf a2r1erh a2reri a2rerl are3u ar2ew 2arf arf1r ar2f3ra ar2gl ar2gn 2arh 2ari ar2ia ari3e4n ari3erd ari3erg ar1im arin3it ar1int a3riu ar2kal ark3amt ar2k1ar ark3aue ark3lag ar2kor ar4kri ark1s4 ark3sa ark3sh ark4tre ar2les arm2ä ar4merk ar3m2or ar2nan arn2e 2a1ro ar1ob a2r1o2d a2r1op a2ror 2arr ar2r3ad arre4n3 ar2rh arr3he 2arsa ar4schl arse3 ar3s2h 2arsi ar2st ar3sta ar3t2e ar2the ar3t2i artin2 2arto ar4t3ram art3re 2arts 2aru ar1uh ar1um a2rü 2arv arwa2 2ary ar2zä 2arze 1arzt ar2z1w as1ala as3au a2s1ä a2sca a3sche a4schec a3schi asch3la a2schm a3schu 4as2e a2seb a2s3e2m a3ses 4ash a3s2hi asin2g 2asis aska3s a3skop a2s1o2f as1or a2sö a2s1p as2ph as2pi as2po a3spu as3s2a as3s2e as4s3ei as3s2i as2s1p as2st ass3ti as3str as3stu 2as3ta a1s4tas as4tau as3te as2th as3ti as3to as4tof 2astr ast3rä as6t3re a2sü aswa2s 3a2syl a1ß aße2 aßen3 2a1t ata1 at1ab at2af at4ag a2t1akt ata3l a3tam at1apf at1au a2taus a2t1ä at2c at2e 4ate. a2teb at3eig a2teli 4aten a2tep ater3s2 ate2ru 4ates at2h at3ha 4athe1 3athl 4a3ti atil4s ati2st 3atm 4atmus ato4man 4ator a2t1ort at1ö 4atr atra4t at3rä at3re at3rom at2sa at4schn at2se at4set at2si at2so at2s1p at3ta at4tak att3ang at4tau at2tei at3t4hä at2t3rä att3s a3tub atu2n a3tü atz1er at4zerk at4zerw at2z1in at2zo atz3t2 at2z1w a2u 2au. 2au1a2 2aub au2bli au2blo 4auc auch3ta au2dr 2aue aue2b au5erein aue2s au2fa auf1an 2aufe. 2aufeh auf1er au4ferk auff4 3aufn 2aufs. 2auft. 2aug 4augeh 4au1i au2is 2auj aule2s au3lü 4aum au2mal au2m1o aum3p2 aum3s6 4aun au3n4a aun2e au2nio au1nu a4unz au1o 2aup2 aup4ter 2au3r2 au2s1ah ausan8ne. au2sau 2ausc au4schm au4scho 1ausd aus3erp au4s3erw 3ausf 1ausg 1ausl au2so au2spr 1ausr aus3s2 3aussag aus4se. auster6m aus5tri 1ausü 1ausz 2aut. au2t1äu 2aute au4ten4g au4t3erh 1auto 2auts4 2auu 2auw 2aux 2auz auz2w 2a1ü 2a1v a3v4a ava3t4 4avi a2vr 2a1w awi3e a1x ax4am ax2e 2a1ya a1yeu ays4 aysi1 ay3t 2a1z az2a az2o az2u ä1a ä1b ä2b3l äb2s ä1che äche1e ä1chi äch3l ä2chr äch2sp äch4st ä1chu ä1ck äck2e ä1d ä2da ä2d1ia ä2dr äd2s 2ä1e äf2fl äf3l äf3r äf2s äft4s3 ä1g äge1i äge3s ä2g3l äg2n ä2g3r äg4ra äg3str 1ä2gy äh1a 2ä3he ä3hi ähl1a ähl2e äh4l3e4be 2ähm äh3ne äh3ri 2ähs 2äh3t4 ä1hu äh1w ä1im ä1is. ä3isch. ä1isk ä1j ä1k ä2k3l ä2k3r ä1la älbe2 äl2bl 2äle äl2l1a äl2p3 äl4schl ä1lu ämi3en 2äml äm2s ämt2e 2än. än5de än2dr 2äne äne2n1 äne1s än2f5 2änge än2gl än2gr äng3se 2ä3ni änk2e än2k3l än2kr änk2s än3n4e2 2äns än2s1c änse3h ä1on ä1pa äp2pl äp2pr äp2s1c äp4st 1äq ä2r3a2 är4af är1ä är1c 4äre ä2r1ei äre2n ä2r1ene är2gr är1int är2k3l ärk2s är4ment ärm2s är1o2 ä1rö ärse2 är4si är2st ärt4e är2th ärt2s3 ä2rü 1ärz är2zw ä5s4e äse3g2 äser4ei äse4ren äser2i äse3t äskop2 äskopf3 ä3s2kr ä2s1p äs6s1c äss2e äs4s3erk äs2st ä4s3t2 äs4tr ä3su ä1ß äß1erk ä4t1a2 ä3te ät2e1i ätein2 äte2n ät2h ät1ob ä2t3r ät2sa ät2sä ät4schl ät4schr ät2s1i äts3l ät2s1p ät2s3t ät4tr ät2zw äu2br äu1c äude3 äu3el ä2uf äuf2e 1äug äug3l 4äul 2äum äu2ma äum4s5 ä2un äun2e äu1nu 2äur 2ä3us. äu4schm äu3se ä3usg ä3usk ä3usn äu2sp äus2s1c 1äuß äu2tr 4ä1v 1äx ä1z â1t á1n ba2bl 2babs bach7t4e backs4 b1a2dr 2b1af 3bah bah2nu bais2 ba2ka ba2k1er ba2k1i bak1l bak1r ba2kra 3bal bal2a bal4l3eh bal6lerg bal3th 2b1am ban2a 3b2and ban2dr ba3n2e b1ang ban2k1a ban4kl ban2kr 2banl 2b1ans ban3t b1anz bar3b bar3de ba2rei bar2en bar3n bar3zw 3bas ba3s2a ba2sc ba2st bau3g bau1s bau3s2k bau3sp ba1yo 3b2ä1c b2är b2äs 4b1b b3be bben3 bbens2 bbe4p bb3ler bb2lö bbru2c bb2s bbu1 2b1c 2b3d4 bde1s 3be. 3bea be3an be3ar be3as 3beb b2ebe 1be1c be2del bedi4 be1eh be2erk be1erl be1eta 3bef4 be3g2 2b1eier bei1f4 bei4ge. beik4 beil2 bei3la 2b1eime b2ein be1ind be1in2h bei3sc beis2e bei1st beit2s 3bek 3bel be3las be3lec be3lei be2l1en be2let be3li bel3la bel3sz bel3t4 1bem 1ben. ben3ar ben3dor be3nei 3ben3g be3n2i ben3n ben2se ben4spa ben4spr benst4 ben2su 2bentb b2enti ben5t4r b1ents 2bentw ben3un ben3z2 be1o be1ra ber3am be2ran ber4ei. be4r3eiw be4rerk bere4s ber6gan. ber4in. ber3iss ber3na b1ernt be2rob be3rop ber3st4a be3rum 3be1s bes2a be2s1er be3slo bes2po bess4e b3esst. bes3sz be6stein be4s3tol be3s4ze 3bet be2tap be3tha be1ur 3b2ew 2b1ex 1bez 2b5f4 bfal2 2b1g2 bge3 bges4 2b5h2 bhut2 1bi bi3ak bib2 bibe2 bien3s bie2s bik2a bi2ke. bi2kes 3bil bil2a bi2lau 4b1illu bi2lu 2b1inb bin2e 2b1inf bin3gl 2b1int bi2o1 bio3d bi3on biri1 bi3se b1iso bi2sol bi2sp bis2s1c bi2s5t b2it. b2it2a b2ite bi2tu b2i3tus biz2 4b1j bjek4to 2b1k4 bl2 2bl. bla3b4 b3lad b2lanc 3blat b2latt 2b3law b2le 3ble2a b3leb 2b3leg 2b3leid b3lein 3blem 3ble4n b3lese ble3sz b4let b3leu 2blich 3blick b2lie 2blig bling4 b4lis b2lit 3blitz b2lo b4loc b3los 2blun 3blut 3blü 2b1m 4b3n2 bni2 bnis1 bo4a bo5as b1ob3 bo2bl bo2br bo2c bo3ch2 bo3d2 boe1 bo2e3i 2b1of bo3fe bo1is bo2l1an 3bon. bond1 bon2de bo2ne 3bons b1op bo1r2a bo4rä bor2d1i bor2d3r bo2rei bo4rig bor2s b1ort bor2t3r bo2sc bo4s3p bote3n4e bo3th bot2st bo2xi bö2b3 2böf b1öl 2b1p2 bpa2g 2b1q b2r4 2br. b4ra. 2b3rad b4rah b4ra3k bra1st4 3brä brä4u 2bre. 3brea 6b5rechte 2b3ref 2breg b3reif 3brem 2b3rep b4rer 2b3riem bri2er 2brig b4rio b3roh 2b3rol b4ron b4ruc bru4s brust3 bru2th 3brü 4b1s b2s1ad b3sand bs3ar bsat2 b3sä b4sär bs2äu b5sc bs2ca b6schan b6schef bs4cu b3se. bse2b b3sel. bse2n1 b4s1erf bs3e4r3in b4s1ers b3s2es bsi4t bs2ku b4sl b2s1of bso2r b2sö bs2pl b3s2pu bss2 bs2t bst1a2b bst3ac bst1ak bs3tät bst3er b2stip b3sto b4stod b3stö b2s3trä bs3treu bs4tri b3stü b4stüb b2s1un 4b3t btal3 btast3r b5te b4th btil4 bt4r b4ts2 btü1 bu2chi bu2e3 bu2f bu3li bul2la 2b3umk bung4 b2urg bu3r4i bu2sa bu4s3cha bu4schl bu4schm bu4schw bus1er bu2sin bu2s1p bu2s1u bü1c bügel3e 2b1v 2b1w 3by1 by3p bys2 2b3z2 bzeit1 1ca 2c1ab ca2ch ca2e3 ca3g4 ca1h cal3t 3cam c4an ca2pe 3car car3n carri1 ca3s2a3 cas3t ca3t4h ca1y2 cä3 cäs2 2cc c1ce c1ch2 c2d2 c3do 2cec ceco4 ce2dr 2cef ce1i 2cek 1cen cen3g 1cer cere3 ce3sh 1cet 2ceta ce1u 1cé 2c1f c4h 4ch. 2chab ch3a2bi cha2ck 2chaf 2ch1ak ch2anb 3chanc ch1ang ch3anst 4chanz 1chao 4char. 1chara 3charta cha2sc 3chato 4chatu ch1ärm ch1äs 1châ 2chb 2chc 2chd ch3e4ben 1chef 3chef. che4fer 3chefi 3chefs 4chei ch1eim 4chelem che4ler 4chents 4chentw cher3a che3rei 6chergeb cher6zie ch1ess 2cheta 2ch1e4x 1ché 2chf 2chg 2chh 1ch1ia 2chic chi3na 4chind 3chines 2chinf 2chinh ch1ins ch1int 2ch1inv 1chiru 2chj 2chk 2chl2 ch2le ch3lein ch2lu 4ch2m 2chn4 chner8ei. 2chob cho2f ch1off ch1oh ch1orc 2chp ch2r4 4chre chre3s ch3rh 1chron 4chs ch4sper 2cht 2chuf 2chuh 2chum 2ch1unf 2chunt 4chü 2chv 4chw 1chy 2chz ci1c ci2s c1j c4k 4ck. ck1a 1cka. 2ckac 1ckag 2ckal 2ck3an cka4r1 2ckau ck1ä 2ckb 2ckc 2ckd 1cke 4ckeff 2ckeh ck1ehe 4ck1ei 4ckense ck1ent 4ckentw cke2ra ck2ere 6ckergeb ck1erh 4ckerhö 4ckerke ck2ern 2ckero 2ck1err 4ckerze 2ck1ese 2ckex 2ckf 2ckg 2ckh 1cki 2ck1id ck1im ck1in 3ckis 2ckk 2ck3l 2ckm 2ck3n ck1o2 2ckp 2ck3r 4cks ck4stro 2ckt ckt2e 1cku 2ck1um3 2ckunt 2ck1up 2ckv 2ckw 1cky 2ckz c4l2 clet4 clo1 1clu c2m2 3co co2c co3ch co2d2 co3di coff4 coi2 co1it co2ke co2le col2o com4te. comtes4 con2ne co2pe co1ra cor3d co3re cos3t co4te cô4 2cp 2c1q 1c4r2 cre2 cre4mes cry2 2cs cs2a c2si c1s4tr 4c1t cte3e cti2 cti4o ctur6 3cu cu2p3 cussi4 1cy 2c1z 3da. da1a 2d1ab 3d2abä da2ben 3d2abl da2bre dab4rü 2d1ac d2ac. dach3a da2cho dach1s 4d3achse d1af d1ag dagi2 dah3l da1ho 3d4ai da1in da1is dal2a 2d1alar dal3b2 da3lö d1alt d1amma 2d1ammä damo3 d4amp dampf8erf 2d1amt d2an. 2d1ana dan4ce. 2d1an3d2 d1ang 2dange dan4kl dan5kla dan2k1o dan2kr 2d1ans 2dantw 2danw d2anz. 4danzi 2d1ap d2aph 4dapp da2r3a 2darb2 3d2arl dar2ma dar2m1i da2ro d3arr d2ar3s d1art da2ru d2arw da1s da3s2h das4t dat2a dat4e2 da3tei date4n 4d3atl 4datm dau3e 2d1au2f 2dauk 2d1aus3 4daush 2d1äh 2d1ämt 2d1änd 2d1äng 2d1äp 2därz dä2u dä3us 2d1b4 dbu2c 2dc d1ch dco4r 2d1d2 ddar2 d3dh d5do 1de de2ad de3as de3a2t de3b4 2d1e4ben 3de1c de4ca. de2cka de1e4 2d1eff deg2 de3gl dehe2 de3ho 2d1ehr d1ei d2eic 3d2e1im dein2d dein2s de2l1a4g de4l3aug del1än del1ec delei4g de3lein 2delek 2delem 2delfm delle2 del4leb del4lei de2l1ob de2lop de3lor de2lö del4san del5sc del2s5e del2so del2s1p del5ster del3t4 dem2ar 2d1emp d2en. dend2 de4n3end 4denerg den3g d2enh de2ni den4k3li 4den4sem den4sen den6s5tau den3th 2dentw de1nu de1on depi2 d4er. dera2b de1rad de2rap der2bl 2derdb de2re2b de4reck der3edi de4r3eis derer3 de3r4erb de3r4erf de4r3ero derer4t 4d3erhöh 3derie derin4f 4derklä der3m2 4derneu 4d3ersat der3tau der6t5en6d dert4ra de3ru de4ruh de4rum des1 de2sa de3sac desa4g de4sam des2äc de2seb de4seh de2sei des3elt de2sen1 de4set de2sin de2sor de2sp des3s2 dest5alt de2sto dest5rat de4stre des4tum de2su det2 deten4t 2d1etw de1un de1url de3us de2xis 2dexp 2d1f4 2d1g2 dga2 d2ge. dge4t1e d3gl 2d1h2 dha1s4 d2his 1di di4ab di2ad di4am 3dic di1ce di2e di3e2d die4neb di3eni di3ens. die2s3c diet3 die2th dige4s dik2a dil2s5 2d1imb din2a 2d1ind 2d1inf 2d1inh 2d1in1it 4d3inner 2d1ins 2d1int di2ob dion3s di1p di4re. di2ren di2ris 2d1irl di2sp 2d1isr dist2 di2s5te di2ta di4teng di4t3erl di4t3erm di4t3ers di2th di4t3r dit3s di2tu di5v di3z2 2d1j 2d1k4 4d1l2 d3la d3le dle2ra dli2f dl3m dl3s 2d3m2 4d5n2 dni2 dnis1 d1ob d2oba 2dobe dob4l d2obr 2d1o2f dole4 doll2 do2mar do5n4a doni1e do2o 2dope 2d1opf d2opp d2o3r4a 2dorc 2dord dor2f1a dor2fä dor2fl dor2fr 2d1org do2rie d2orp 2dort dor2ta d2os. dos3s dost1 dot6h do3un d1ö dö2l1 3d2ör dö2s1c 2d3p2 2d1q d2r4 3d4ra. 2d3rad drag4 2drahm d3rai 3d4ram d3rand 2d3rast 2d3rauc 2dräd d4räh 2d3rät 2d3räu 4dre. d4rea. d4reas 3d4reck 2dreg 3d4reh 2d3reic d4reiv 4drem 4d3ren 2d3rep 4d3rer 4dres. d4resc 2d3rh d3ri d4ri. 3d4ria 2d5ric d4rid d4rie d5rieg d4rif d4rik d4ril d4rin. 3d4risc 3d4rit 4dritu d3rob d3roc 2d3rod d4roi 2d3rot d3rou 2d3rov d3rö drö2s1 d5rub 3d4ruc 2d3ruh drunge3 2d5rut drü1b drü5cke 2d1s d4s1amt d2san ds3assi d2sau2 ds1än 4dsb d4schin d2s1e2b d2s1ef d3sei ds2eig d4seins d2s1eng d2s1ent d2s1erf d2serh d2s1erk ds1err d2s1erz dse4t d4s1eta d3s2ha d3sho d2s1im ds2inf d3s2kan d3skul 4dsl d2s1op dso2r ds1ori d2sö d2s1par ds1pas d2spä ds2po d2spro ds2pu dss4 dst4 ds3tab d4stag d4s3täti d2ste d4stea d3stei d3stell d4stem d3s4tern ds2ti ds4til ds4tip ds2tu ds1ums d2sun ds2zen 2d1t dta2d d5tea d2th d4thei dt3ho dto2 d3tö dt3r dtran2 dt5s2 d3tü 1du du1alv du1ar dub3l du2bli du2f 2d1ufe 2d1uh du1i 2d1umb 2dumd 2d1u2m1e 2dumf 2dumg 2d3umk 2duml d2ump 2dumr d1ums d2ums. 2d1umv 2d1un3d dund2a 2d1unf dung4 dun3ke dun2kl 2dunr dun2s 2dunt du1o dur2 2d1url 2dursa du4schn du4schr du4schw dus3t 2düb 3düf 3dün 2d1v2 2d1w dwa2 dwest3 dy2s 2d1z 2e1a e3a2b eab3l ea2c ea3der eadli4 ea2dr ea2g4 ea3ga ea4ge ea3gl eak1 eakt2 ea2la e3alei e4aler. ealti2 eam3 eam1o ea2na e2ano e3ar. ea2ra e3a4rene e3arr e3arv e2as eas3s eat4e2 eater1 e3ath ea5tr eat3s2 e3at5t4 e3au2f e3aug eau1st e1ä2 e1b 2eba e3b2ak 2ebed ebe2i 2ebel eb2en ebens3e ebert4 2ebet 2ebl eb3ler eb4leu e3blie eb3lo eb2lö 2eb2o ebot2 ebö2s 2ebr eb3rei eb4ru eb2s1 eb6sche ebse2 ebs3pa eb3sta eb4stät ebs3tem ebs3t2h eb3str e3bu ebu2t1 2e3ca e1ce ech1ä 2e3che ech1ei e6ch5erzi e1chi ech3l ech3m ech3n e2cho. ech1o2b e2ch3r ech3ta ech3t4ei e1chu ech1uh ech1w e1ci eci6a eck3se 2eckt 2e1cl 2eco eco3d e3cr ec1s4 2ect e1d e3d2a ed2dr ed2e ede2al e3dei ede3n2e edens1 eden4se eden4sp ede2r eder3t2 edi4al e3d2o ed2ö eds2ä ed2s1es ed2s1o ed2s1p ed2s3tr ed2su edu2s e3dy3 4ee ee3a2 eeb2l ee2ce ee1ch ee2cho ee2ck eede3 eed3s2 ee1e e1eff eef4l eef3s eeg2 e1ei ee1im eein4se eel2e ee2lek ee3len e1emp e1en eena2 ee4nag e2enä e2enc ee3ni e2eno een3s e1e2pi ee1ra e1erbt e1erd ee3r2e ee4r3en4g eere2s ee4ret e1erk ee1rö eer2ös eert2 e1ertr ee3r2u e1erz ee3s2 ees3k ee3ta ee4tat ee2th ee1u2 eewa4r e1e2x e1f 2ef. 2efa e2f1ad ef1ana ef1ar e2fat e2fäu 2efe e3fe. e2f1e2b ef1em e2fent ef2er 2eff. 1effi ef2fl 2efi e2f1i2d e2f1ins efi2s 1efku 2efl e3f4lu 2e3f2o e3fra ef3rea ef3rol ef3rom ef4rü efs2 ef3so ef3sp ef2tan 2efu e2fum 2efü e1g egas3 egd4 e3ge ege4n3a4 ege2ra ege4str ege1u e2glo e2gn eg3ni eg4sal eg4se4r1 eg4sto eg2th 2egu egung4 egus3 2e1ha eh1ach e3h2al eh2aus 2e1hä e1he eh2ec eh1eff eh2el ehen6t3 1e2hep e3her ehe1ra ehe3str e1hi eh1int eh1lam eh1lä ehle2 ehl3ein eh4lent eh5l2er eh2lin eh3lo ehl2se 2ehm eh3mu e1ho e3hol ehr1a2 ehr1ä ehr1e2c eh2rei ehr3erl ehr6erle ehre3s eh3ri eh1ro2 ehr1ob ehr1of ehs2 eh3sh eh1ste 2eht e1hu e2hunt e1hü eh3üb eh1w e1hy 2ei3a2 4eib ei2bar ei2bl eibu4t ei4b3ute ei2cho e2id ei2d1a ei3dan ei3de ei4d3err 2eidn ei3dra ei1e 4eien3 eienge4 1eifr ei3g2a 4eigeno eig2er 2eigew ei3gl 1ei2g3n 2eigru 2eigt 2eigu eik2ar ei3kau eik4la e4il 2eil. ei2lar ei2lau 2eilb eil3d ei4lein eilen1 eil3f4 eil3ins 2eiln 1eilzu ei2m1a4g eim3all ei2mor e1imp eim2pl ei2n1a ei4nas ei4nä ein3dr 2eindu ei4neng ei2neu 2einfo ein4fo. ein4fos ein3g2 ein4hab e1init ein3k ein6karn 3einkom ei2n1o2 3einsat ein6stal ein4sz e4inver ei3o2 ei1p eip2f 2eir ei3re e1irr e2is. ei2sa4 ei6schwu ei4s3erw eis2pe eis4th ei1sto ei2sum e2it ei2tab ei2tan ei2tar 2eitä ei3te ei2th ei2tro eitt4 eit3um 2eiu 2e1j e1k ek2a 1ekd e3ke. e3ken e3kes e3key e3k2l ek4n ek2o ek4r ek1s4t 2ekt ekt4ant ekt3erf ekt3erg ek4t3erz ekt2o ek5tri ek2u e3k2w e1la ela4ben el3abi el2abt ela2c el1af ela2h e2l1ak e2l3a2m el4ami el4amp el1ans el1anz 2elao e2l1ap e2l1a2r el3ari ela4s el1asi el1asp el2ast 2e1lä 3elbis el2da eld5erst el4d3erw eld3s2 2ele. elea2 ele2c 2eleh 2elei e6l5eier. e2l1ein e3leine e4leing 1elek e2l1el 1e2lem e3lem. el1emp 2e3len. e4lense e2l1ent e3lep el1erd el1erf e4ler4fa e2l1erg el1erk el1erl e4ler4la e4l3ernä e2l1err 2eles2 el1ess e4l1e4ta e3leu 2elev ele2x 1elf. el3fe elf4l 1elfm 1elft elgi5er. elgi5ers 2eli e2l1id e3lie eli2ne el1ita el3kl el3lan el3le el5le. ell3ebe el4l3ein ell3eis el3lin ell3sp elm2a 2eln el5na 2elo e2lof e2lol elon2 el1ope e2l1or elo2ri el2öf elö2s el2sum elte2k elt3eng 3eltern elto2 el2t3r elt3s2k elt3s2p 2e1lu e2l1um el1ur el3use e1lü e2lya 2elz elz2e el2zwa e1m 2ema e2m1ad ema2k e2m3anf e2m1ans 3emanz em2d3a2 e3m2en emen4t3h e6mentsp e2m1erw eme2s 1e2meti e2m1im emi5na em1int emi3ti 2emm emma3u em2mei e2mop 3empf em3pfl em2p3le em2sa em2spr em2st em3t2 1emul 2emü e2n1a 4ena. 2enac e3nad e4naf 4enah e4nak ena3l2i 4enam en4ame e4nand en3ang en3are en2asc 4enat en3att e3naue e2n1är en1äu en4ce. en3d2ac en2dal en4d3ess end4ort end3rom end3si end3s2p end3sz end2um 2ene. ene4ben en1e2c e2neff e4nein e2n1el ene4le 2enem 2enen e4n1ent en4entr 4e3ner. e2n1erd e2nerf 1e2nerg e4nerh e4nerk e2n1erl e4n3ermo 4enern e2n1err e2n1ers e2n1ert e2n3eru e2n1erw e4nerz 2enes e4n3ess en3f enf2a enf2u 1engad 3engag enge3ra en3g2i en2gl en3glo 1engp eng3se e3ni. e3nic e2nid e3nie eni3er. eni5ers. e2n1i4m e2n1in e3nio 2enis e3nit 2eniv en3k2ü e2n1o2b enob4le e2nof en1oh e3nol eno2ma en1on e2n1op e2n1o2r enost3 e3not eno2w 2e1nö en1ö2d e4nr en3sac en2sau en5sch4e en2seb ens2el 1ensem ensen1 en3ska en3sp ens2po enst5alt en4s3tät 2ensto e4nt ent4ag 1entd en2teb en4terb 1entfa 3entga en2thi 3entla 1entn en4t3rol 3entspr 2entü 1entw 4entwet 1entz en1u 2enut e1nü enü1st 4enwü e1ny en4z3erf en4z3erg en4z3erk enz3ert e1ñ 2eo e1o2b1 e1of eo2fe e1oh e4ol e1on. e1ond e1onf e1onh e1onl e1onr e1ons e1ope e1opf eop4t e1or e3or. e3orb e3ors e3orw eo1s2 e3os. eo3ul e1ov e1ö2 e1p e3pa epa2g e3p2f4 1episo ep3le 1e2poc ep2pa ep4pl ep2pr ept2a ep2tal e3pu epu2s e1q er1a e3ra. e3rad. er3adm eraf4a era1fr era2g e1rai er3aic e2rak e1ral er3all eran3d e3rane er3anf e2ranh er3anm e1rap er3apf e2rar e3rari e1ras e2r3a4si era2ß e2rath e3rati e2ratm e1raub er3aue erau2f er3aug e1raw e1raz e1rä er1äh er1äm erb2e er3br erb4sp er1c er3chl er3da 1erdb er3de 2erdec erd3erw 4ere. er1eb e3rech er3echs er1e2ck ere4dit er1eff e2r1e2h 4e3rei. er1eig e2rein e4r3eis. ere2l er1ele 2e3rem 2eren 4e3ren. e3rena e4rense e4r3entf e4rentn e3renz eren8z7end 2erer 4erer. e2r3erf e2r1erh e4rerl 4erern e3rero er1err er1ers e2rert er1erw 2eres er1ess er3e4ti er1eul ere4vid erf2e erf4r 4erfür 3ergebn 4ergehä erg3el4s3 1ergol erg3s ergs4t er3h 1erhab 2erhü 2eri e2riat e3rib 4e3ric 4e3rie eri3e4n3 e3ri3k4 4e3rin. er1inb e2r1ini er1ink er1int e3rio er1ita 2erk. 1erklä 2erkre erk3t 3erlebn ermen4s erm3ers ern1os e1ro e3ro. er3oa er1o2b er1of er1oh e3ron er3ony e2r1o2p e4ro2r e3ros e3row er1ö erö2d 2erök er3p4 er3rä 2errü ers2a er3se ers2i er3sk er3smo er3sn er3sp er3sz ert2ak er6terei er4t3erf er4ters er2tho 4erti ert3ins erts2e 2eru eruf4s er1u4m er1und erung4 er1uns er3uz erü4b 3erweck 6erweis es3ab es2ach es3ak es3anz e3s2as e4s3ato 2esb es2c es3cap e3sce esch2 e3scha e2s3ein es2el ese4ler es3eva 2esf 4esh es2har es2hu es2id esi1er e2sil es3int es2ir es2kat e4ske es3kl es3ku e4sky es3l es4log 2esm es2ort e3sot es2ö 2esp e3s2pek e3spi e3s2por e3s4pra 2esr es2sau es3sc es3se 4essem ess4e3re ess3erg 2esso es2sof es2s1pa es2spu es3str es3stu estab4b est1ak e1star e4starb 1e2stas e1stat e1s2tec e3stel es4t3eng es4t3erh es4t3ess e1stil e2stip estmo6de est3ori e1str es4tri es3trop e1stu es4tü e2s1um es3ums es3w e3sy es3z e1ß eße3r2e e1t etab4 et1am 3etap et4at et1äh e3te e4tein et2en eten3d2 ete2o eter4hö eter4tr et2h et3hal et3hü e3ti eti2m eti2ta 2e3to eto2b e4t1of etons4 e3tö 2etr e4traum e6t3rec e2tres et4rig etsch3w ets2p et3su ett1a et2tab et2t3au et2tei ette4n1 et2th et2t3r et4tro ett3sz et4t1um e3tü etwa4r 2etz et2zä et4z3ent etze4s et2zw eu1a2 eu3erei eue6reif eu2esc eu2ga eu4gent eu3g2er eu4gla eugs4 euil4 eu1in 1euk eu2kä e1um e3um. e3umb e3uml e3um2s eum4sc eums1p eum3st 2eun eun2e eu4nei e3un2g eu2nio eun3ka eu1o2 eu1p eur2e 3eu3ro eu3sp eust4 eu1sta eu1sto eu1str 2eut eut2h eut6schn 2eux eu2zw e3ü 2e1v e2vela e2vent 4ever eve5r2i e3vo e1w 2ewa e3wä ewä2s 2ewe e2we. ewinde3 e3wir ewi2s e3wit ew2s 2ex. ex3at 1e2xem ex1er e1xi e2x1in 1exis ex3l 3exp 2ext. ex2tin ex2tu 2exu 2e3xy ey1 ey4n eys4 e1z e3z2a e2z1enn e3zi ezi2s ez2w é1b é1c é1g égi2 é1h é1l élu2 é1o é1p é1r é1s é1t2 é1u2 é1v é1z2 è1c è1m è1n è1r ê1p ê4t 1fa fab4 f1abe fa2ben fab5s 3fac fa4cheb facher5f fa2ch1i fa2cho f1ader fa2dr f4ah faib4 fa2ke f2al fa3l2a fal2kl fal6l5erk fal6scha fal6schm fal3te falt2s 2fanb 2fanf fan2gr 2f1ank 2fanl f1anp 2fanr fan3s 2fanw f1an3z 2f1ap f2ar far2br 2f3arc 3fari farr3s 3f4art 2f3arz fa3s4a fa3sh f3at fa2to3 2f1auf f3aug f1ausb 3f4av fa2xa 1fä fä1c fäh2r1u 2f1ärm fä2ßer f1äu 2f1b2 2f1c 2f3d4 fdie2 1fe featu4 fe2c f2ech 2f1eck fe2dr fe2ei fe1em fef4l feh4lei f4eie 2f1eing 4f1einh fe1ini 2f1einw f1eis fek2ta fe2l1a fel2dr 2fe2lek fe2l1er fe2les fe2l1o fel4soh fel3t f2em. fem4m 2femp fe2nä fen3g fe2no fen3sa f1ent f2er. fe1ra fer2an fe4rang fe4r3anz fe2rau ferde3 f2ere fer2er fer3erz f1erfa f2erl. 4ferneu f4erpa f2ers. f2ert f1erw fe2st fest1a fest3ei 2f1eta fe4tag 3fete fet2t3a feuer3e feu4ru 3few f1ex 2fexp 3fez 1fé 2f1f ff3ar ff1au ff2e ffe2e f2f3ef ff3ei ffe1in ffe2m f2f3emi ff4en f2fex fff4 ff3l ff4la ff4lä ff4lo f3flu f3flü f3f4rä ff3ro ff3rö ff2s ff3sho ffs3t ffs4tr 4f3g2 fge3s 2f1h2 1fi 3fi. fi3at fid2 fien3 fi1er2f fi2kin fi3kl fik1o2 fi2kob fi2kr fi2l1an fil4auf fil3d fi2les filg4 fi3li fi4lin fil2ip f2ina fi3ni fin2s fin3sp 2f1int fi2o fi3ol fi2r fi3ra 3fis fis2a fisch3o fis2p fi2s5t fit1o2 fi2tor fi3tu 3fiz 2f1j 4f1k4 f2l2 2fl. f3lad f3lap 1flä 3f4läc 2f5läd f3län 2f3läu 2f3leb f4lee 2f3lein f3ler f4lé f3li. 3f6lim fli4ne 2f5lon 1f4lop 1f4lot flo2w f3lö f4luc 1f4lug flu4ger f4lü 2f3m2 fma2d 2f3n2 fni2s 1fo fob2l 2f1of foli3 fo2na fon2e fo2nu 2f1op fo1ra 4f3org fo3rin 3form for4m3a4g forni7er. for4st for4tei for2th for2t3r for3tu 2f1o2x 1fö 2föf 2f1ök 2f1öl för2s 4f1p2 2f1q f2r2 f4rac frach6tr f5rad fra4m f3rand f5rap 1f4rän 2fre. f3rec f3red 2freg freik2 frein4 f3rep f4reu 2f3ric fri3d fri2e 2frig 1fris f4risc f3roc 1f4ron fro2na fro2s f3rot f3ru f3rü 4f1s fs1all fs4amm f2san fs3ar f2s1as f2sauf f2saus f2saut f3sc f4sce f4schan f4schef fs4co fs1e2b f4s1ehr f2s1em f2s1ent f2s1er fse4t f4s1eta f3si f2si2d f3s2kie f2s1o2 f3span f2s1pas fs1pen f2sph f3s2pl f3s2por fs1pr f2spre fs2pri f2spro fs2pru fs3s4 fs2t f2stas f4s3täti f4stech f3stei f3s4tel f3stern fs3th f2stip f3st4r f4s3tres f4s3tüte f2s1un f2sü f3sy 4f1t f4ta. f2tab ft1a2be ft1af f2t1al ft1an ft1ar f3tat ft1e2h ft1eig ft1eis f4t1ent f4t1e4ti f2th f4thei ft3ho ft1op f3tö f2t3ro f2t3rö f3t4ru ft2s1 ftsa4 ft4sam ft3s2c ft4sche ftse4 ft4seh fts3el ft3st ft4s3tan ft4s3tä fts2ti ft4stri f2tum ft1url f3tü ftwa4 ft3z2 1fu 3fug 3f2uh f1um 2f1unf fung4 2f1u2ni fun2kl fun2ko fun2k3r 2f1unm 2funt f2ur fu4re. fus2sa fus2s1p fus2st fu2ß1er 3fut 1fü 2füb fü2r 2f1v 2f1w 1fy 2f1z fz2a fzeiten6 fzei8tend fz2ö fzu3 fzu4ga 3ga. 2gabf ga2b5l gab4r 2gabz ga1c 2gadl 2ga2dr ga1fl ga3ge 5gai ga1k ga2ka gal2a g4amo 2g1amt 2ganb gan3d gan2g1a 4gangeb gan2gr 2ganh 2g3anku 2ganl g3anla 3g2ano 2ganw ga1ny 2garb 2garc 3gard 2g1arm ga3r2o g1arti ga3ru 2g1arz ga2sa gas3ei ga2si ga2sor ga3sp ga4spe ga4spr gas3s gas4ta gas5tan ga4ste gas4t3el gat2a 2gatm gat4r gau1c 2g1auf g2auk g1aus 2g1aut 2g1äp 2gärz gäs5 gä4u 2g1b2 gber2 gbi2 gby4t 2g1c 2gd g1da g2d1au g2d1er gd1in g1do g1dö g1d3r gd3s2 gdt4 gd1u 1ge ge3a2 geb2a gebe4am geb4r ge1c ged4 ge1e2 ge3ec ge2es gef4 ge3g2l ge1im ge2in. gein2s ge2int gein2v ge1ir ge2is 2g1eise2 gei3sh g2el ge4lanz gelb1r gel4b3ra gel6ders ge3le ge5leh ge4l3ers ge4less gell2a ge3lor gels2t gel3ste gel3sz gel3t2a ge3lum ge3lü gelz2 ge3mi gem2u 3gen ge3na ge4nam ge4nar gen4aug gen2d1r gen1eb ge3nec gen3eid gen3ern gen3g gen3n gen4sam gen3sz 2g1entf gen3th 4gentw geo2r ge1ou ge3p4 ge1ra ge2rab 4g3ereig ge4reng ge4ren4s ge4r3ent ger2er gerin4f ger4inn gerin4t germ4 ger3no ge1r2ö ger4sto ge3r2u g1erwa g2e1s2 ges3auf ge3sc ges3elt ge2s3er ge3si ges4pi ges3s2t gest2 ge3ste ge4s3ter ges3th ge3t2a 2getap ge5tr ge3t4u ge1ul ge1ur 2g1ex 2g1f4 4g1g gga4t g3ge gge2ne g2g3l gg4lo g2g3n gg4r 2g1h 4gh. gh2e 3g2het 3g2hie gh1l 3gh2r g2hu gh1w gi3alo gie3g gi2e1i gi2el gien2e1 gie1st gi2gu gi2me. gi4mes gi2met 2g1ind gi3ne gin2ga 2g1ins 2g3isel gi3t2a gi3tu gi4us 2g1j 4g3k2 4gl. g1lab g1lac 3glad g2lade 2g1lag 3glanz 3g2laub 2g1lauf 3glät 2gläuf g2l4e 2gle. 3glea 2g3leb g3lec g3leg 2gleh 4g3lein glei4t5r g3len 4g5ler 2gles g3lese g4lia 2glib 3g2lid 3g2lie 2glif g2lik 4glin g2lio 2glis 4g3lisc 3g2lit g2liz 3g2loa 3g2lob g3loch glo3g 3g4lok g2lom 3g2lop 3g2lot 2gls 2g1lu glu2t 3glü g2ly 2g1m2 g1n 2gn. g2n2a g4na. 2gnac g4nat 3g2nä gn2e g3neh gne2tr 2gneu 2gng g2nie g2nif g4nin 2gni2s1 3g2no gno1r 4g3not 2gnp 2gns 2gnt 2gnu 3g2num. g2nü g2ny 2gnz go4a goa3li 2g1of 2gog 2g1oh go1i gol2a 2gonis 2g1ope 2g1opf g2o1ra 2gord 2gorg go2s1 go3st go3th got6t5erg go1y 2g1p2 2g1q g2r4 gra2bi gra2bl 2gradl 2g3rah 2g3rak grammen6 gram8m7end 2g3räu 2g5re. g4reb 2g3rec 2g3rede g4re2e 2g3reic 2g3rein g3reit g4rem 2g3renn gren6z5ei g4rer g3ret g3rev 2g3ric gri2e g3riese 3grif 2grig 2g3ring 2groc 2groh gron4 g4ros gros6sel gro4u 2g3röh g4ruf 2g3rui 2g3rum 3g4rup 2grut 2g3rüc 3g4rün 4g2s1 gsa4g g3s2ah g4s3a2k g3sal g4salt gs3ama gs3an gs3ar gs3aug g3s2c g4sca g4s3ce gsch4 g4schef gs4chi g4sco g4s3cr gse2 gs2eh g3s2eil g3sel. gs3eli g3seln gsen1 gs3er gs5erk gse4t g4seta gsi2d g3sil g4sl gso2 gsp4 g3s2pek g3spi gs4pie g4spin gs3pl g3s2por gsrat4 gsrü2 gs5s4 gs3ta g3stan g3star g3s4tati g4s3tä g5stäm g3stel gst3ent gst3err g1steu gst2he g3stir g3sto gs3toc g4stol gs3top g4s3tor g3stö gs3tr gst4ra gs4trat gst4ri gs4t3ros g3stu g4stur gs3tü gs4tüc g4sw g3sy 2g1t g3te gti2m gt4r gt2s g3tü 1gu gu3am gu1an. gu1ant gu1as gu1c gu4d3r gu2e 2gued guet4 2g1u2f 2g1uh gu1ins gu1is 3gumm 2g1unf g2ung. gunge2 4gungew 2g1ungl g2un4s 2gunt2 2g1url gurt3s gu2s3a guschi5 gus4ser gus2sp gus2st gu4st gu2t gut1a gu4t3erh gut3h 2güb gür1 güs3 2g1v 2g1w 2g3z2 3haa hab2a hab2e h2abs ha2cho ha2del ha4din h1adle haf3f4l haft4s3p h1ah ha1kl 2h2al. halan4c ha2lau hal2ba hal4bei halb3r 2hale hal2la hal6lerf h1alp hal2st hal4t3r h1amt h2an. h2and hand3s h4ann 2hanr 2hant h1ap ha2pl ha2pr h4a3ra 2harb h2ard h1arm. har4me. har4mes har2th h1arti h2as 2ha3sa hasi1 hat5t2 hau3f4li 2h1aufm h1aukt hau2sa hau2sc hau4spa hau5stei hau6terk 2hauto hau2tr h1äff hä6s5chen häu2s1c hä3usp 2h3b2 hba2r3a 2h1c 2h3d4 hdan2 2hea he2ad he3be he4b1ei he2bl he3br he5ch2e he1cho h1echt he3cke hed2g he3di he2e3l hee4s he2fan he2fä he2f1ei hef3erm 2heff he4f3ing he2f3l he2fr he3fri he2fu he3gu h1eie h1eif h1eig he2im heim3p hei4mu heine2 h1eink 4heio he1ism he1ist heit4s3 h1eiw he2l3au hel1ec h3e2lek he3len hel3ers he3li hel4l3au hel4mei he3lo he4lof he2lö 3hemd he3mi 3hemm 4h1emp h2en. he4n3a4 he2nä hend2s he2n1e2b hen3end hen3erg he2net heng2 2heni he2no henst2 hen5tr h1ents 2h3entw hen3z 4he2o he3on he3op he3ph her3a2b he2ral 2herap he3ras herb4s he4reck 4hereig he4r3eis he2rel he4rerw h1er2fo h1erfü herg2 herin4f he6rin6nu herin4s herin8ter h1erke h3erlau 2herm he3ro he4r3o4b h1erö hert2 her3th her2zw he1sta he2s5tr he2tap heter2 he3th het2i he3t4s h2e2u heu3g he3x he1x4a he1y2 1hè 2h3f4 hfell1 hfel6ler hfi2s 2h3g2 hget4 2h1h2 2hi. 2hia hi2ac hi2ang hi1ce hich6ter 2hi3d h2ide h1i4di hi2e hi3ens hier1i hie4rin hiers2 hif3f4r hi2kr hi2l3a4 hil2fr hi2n h1indu hi3nel hin2en h1inf h1inh hi3n2i hin3n2 hi3no hin3s2 hin4t1a 2hio hi4on hi3or 2hip1 hi2ph hi2pi h2i2r hi3ra 2hi3re hi3ri hirn1 hir4ner hi3ro hir2s his2a hi2se hi2st hi1th hi3ti 2hiu h1j 2h1k4 2hl h4lac hla2n hl1anz h1las h1lat h1laut h3läd h1läs h1läu hlb4 hld4 h3leb hle3e h5len. hlen3g hl2enn h3ler hle2ra hl1erg h6l3ernä hle3run hl1erw h4lerz h3les h4lesi h3lex hlg4 h2lie h2lif hl1ind h2lip h2lis h3list h2lit hll2 hlm2 h2lo h3loc hl1of hl1op h4lor hlo2re h3losi hl2ö h3löc h2lös hl2san hl2ser hl3sku hl3slo hl3t2 h3luf h3luk h1lüf 2h1m h2mab h3mag h3man h3mar h4mäc h4mäh h4mäl h4mäu h3me. hme1e hme1in h3men hmen2s hme2ra h2mo h4mon h3mö hm3p4 hm2s hm3sa hms1p h2mu 2hn h2na hn1ad h3nam hn1an h2nä hn3d4 hn2e hn3eig hn3ein h2nel hne4n1 hne4pf hner3ei h3nerl h3nerz hn3ex h2nic h2nid h2nie hn1im hn1in h2nip hn3k4 h2nor hn3s2k hnts2 h1nu h2nuc h2nul hn1unf h3nunge ho2bl ho2ch3 ho2cka ho6ckerl hock3t 2hod hoe4 ho2ef ho4fa ho2f3r 2hoi hol1au 4holdy 3hole ho2l1ei hol3g4 4holo ho4lor 3hol3s h1o2ly 3holz hol6zene hom2e ho2mec ho2med h2on hono3 2hoo 2hop ho1ra hor3d h1org ho4sei ho3sl ho2sp ho4st 2hot. ho3th hotli4 2hot3s2 3hov 2ho2w1 h1o2x ho1y2 1h2ö hö2c hö3ck h4ör hö2s1 h3öst 2h3p2 h1q 2hr hr1ac hr3ad h1rai h1rane h3räu hr1c hr3d h2rec h3rech h3red h3ref h4rei. hrei4ba h3reic h4r3eig h3rel h3r2en h3rep hr2erg hr2erk h6rerleb hr2erm hr2erz h3re2s1 hre2t h2r1eta h3rev hrf2 hrg2 h2ri h3ric h4rick hri4e h3riesl h3rin h4rine h4rinh h4rist h2rob h3roh h3rol h4rome h4romi h4ron h2ror h3rou hrr4 hr2s1ac hr2s3an hr2sau hr3schl hr2s1en hr2ser hr4set hr4s1in hrs3k hr4s1of hr2su hr4sw hr2tab hr2tan hr2th hr2tor hrt3ri hr2tro hrt2sa hrt2se h3ruh hr1ums h3rü h4rüb h2ry hrz2 4hs h2s1ach h2san h2sau h4schan h2s1ec hse4ler h2s1erl h3s2ex h2s1ing h2s1of h2s1par h2sph hs2por h2sprä h2spro hss2 h1sta hst3alt hst2an h2s3tau h1stec h3stein h5stell h3s4terb hst2he h1s2ti h1sto h2stor h1s4tr hst3ran hst3ri h1stun h2s1u hs2ung 4h1t h2t1a h3t4akt. h3takts h3t2al h4t3alt h4t3a2m hta4n ht3ane h3tank ht2as h4t3ass h4tasy ht3a2t h2tär ht1e2c h2t1ef ht1eh hte2he h2teif h4teilz h2t1eim h2t1eis h4t3elit h2temp h4tentf h4t3ents ht3erfo ht3erfü h2t1erh ht5erken h4terkl h6terneu h4t3erre ht3ersc h6t5erspa ht3erst h6tersta ht6erste h2t1erz hte2s h4t1ese h4t1ess hte3sta h2t1eu h2t1ex h2th h4thei hthe3u h4tho h2t1in hto2 h2toly h2torg h3töp h4t3rak ht3rand h2t3rat ht6raume h4tref ht4ri h4t5rin h2t3rol h2t3ros ht3rö h4t1rös h2t3ru h2t3rü h4ts ht2so ht2sp ht3spri ht4stab hts2ti hts4tie ht4s3tur ht4s3tür htt4 htti2 h2t1urs h3tü ht3z2 hu2b1a hu2b3ei hu2b1en hu2b3l hu4b3r hu2bu hu1c hu2h1a hu2h1i huko3 huk3t4 hu2l3a hu2lä hu2l3ei hu4l3eng hu4lent hu2ler hu2let hu2l1in hu2lo hu3m2a h1ums hu2n h1una hung4s hu3ni1 h1up. h1ups 2hur hurg2 hu3sa hu2so hus4sa hus2sp hu2tab hu3t2h hu2ti hut2t hut4zen hut4z3er h2ü h4übs h3übu hühne4 hüs3 2h1v hvi2 hvil4 2hw h2wall hwe1c h1weib 3hyg 3hyp hy2pe. 2hy2t h1z hz2o hzug4 i1a 2ia. i4aa i2ab iab4l 2iac i2af iaf4l i4a3g2 i2ah i3ai i2aj i2ak i3ak. i3akt 2ial i5al. ia2l1a4 ia2lä ial3b ial3d i3alei i3alent i3alerf i3alerh ia4l3erm i3a2let i3a4lia ialk2 i3all ial3la ia2lor ial3t4 ia2lu ial3z2 i2am i3am. i4amo 2ian ia2nal i3and2 ian2e i3ann i2ano i3ant i3anz i2ap ia3p2f ia1q i3ar. ia2ra 2ias i2asc ia3sh i2asi i2a3sp ias3s iast4 i3at. i3a4ta i4ate i3at4h 1iatr i3ats i3au ia3un 2iav 2iä i1äm iär2 i1är. i1ärs i1ät. i1äta i1ät3s4 2i1b i2b1auf ib2bli ib1ei i2beig i2beis ibela2 ibe4n iben3a ibi2k i3bla i3ble ib2o i2bö i4brä ib3ren ib4ste i2bunk i2bunt ibu2s1 2ic ic1c ice1 ich1a ich1ä i1che ich1ei i1chi i2chin ich3l i3chlo ich3m i1cho i2ch3r ich4spe ich2t3r i1chu ich1w i1ci i3ck2e i1cl i1d id2ab4 i3dam id2an i2d1au 1i2dee i2dei idel2ä ide3so ide3sp 1i2dio idni3 i2dol 1idol. 2i2dr i3d2sc id2s1p idt4 i2dy ie3a4 ie2bä ie2bl ie2bre ieb4sto ieb4str ie1c ie2cho ie2ck ie2dr ie1e2 ie2f1ak ie2f1an ie2fau ief3f4 ie2f3l ie2fro ie4g5l ie3g4n ie2g3r ie3g4ra iegs3c i1ei i2e2l1a ie3las iel3au iel3d iel1ec ieler8geb i1ell ielo4b iel3sz iel3ta 2i1en i3en. i3ena iena2b ie4n3a4g i3e2nä i3end i2ene ien1eb ie3ner ien4erf ie4n3erg i3enf i3en3g ienge4f i3enh i3enj i3enk i3enm i3enn i3e2no i3enö i3enp i3enr ien2s ien3sc ien3s2e ien3si iens2k ienst5rä ien3sz ie1nu i3env i3enw i3enz ie1o2 ier3a2 ie2rap i2ere ie3r2er ie4rerf ie4r3erz ie3res i3ereu i4eri ierin3 ier3k2 i1ern i3ern. i2er5ni ie2rö ier4seh iers2t ier3sta ier3ste ier3te iesen3s4 ies2sp ies2s3t ie1sta ie3su ie2t1a ie4t3erh ie4t3ert ie2t3ho ie4t1o ie4t1ö4 ie2tri iet2se i1ett ieu2e ie1un i1ex 2if if1ar i2f3arm if4at if1au i2fec ife2i if2en ifens2 if1erg if1erh if2fl if3l i1f4la if4lä i1flü if3r if4ra i1frau i1fre if4rei if4rü if2s if3se if3sp if2ta ift3erk if2top if4t3ri ift3s2p ift3sz 2i1g iga3i i2g1ang ig1art iga1s4 i4gefar ige4na ig1erz i2g1im i2gl ig1lä ig4na i4gnä i3g4neu ig4no i3go ig4ra ig3rei ig4sal ig3sä ig4se ig3so ig3spr ig3stei ig4sto ig4stö ig3str ig4stre ig3stü igung4 2i1h i2h1am i2har i3he ihe1e ihe4n ih3m ih3n ih3r ihs2 i2h1um ih1w ii2 ii3a4 i1ie i3i4g i1im i1in i1i4s i2is. ii3t i1j 2i1k i2k1a4k ik1amt i2k1ano ik1anz i4kanze ik1art ik3att i2k1au i2kär 4ike i2k1ei ike2l1 i2k1e2r2e ik1erf iker6fah i2k1erh i2ker2l i2k1eta i3ki. ik1in i2kind i2k3l i3kla i3k4lä i2kn ik3no ik2o3p4 iko3s i2köl i2k3ra ik3rä ik3re ik1s2 ik3so ik3sz ikt2e ikt3erk ikt3r ik2tre i2kun i3kus i1la i2l3ab il1a2d i2l1ak i2l3a2m il1ans il1asp il1au il4aufb il3aus i2laut i1lä1 6ilb il2c il2da il4d3en4t ild2er ild1o il2dor il2dr il1e2c ile2h il1ehe il1ein il1el i4lents i2l1erf i2l1erg i2l1err ilf2 il2f3l il2f3re ilf4s3 ilie4n ilig1a2 ili4gab i2l1ind i2l1ip i3lip. i3lips 2ill. il3l2a il3l2er il3l2i 2ills il2mak il4mang il2m3at il2mau il2min 2ilo i2l1or il3t2h i1lu2 i2lum ilung4 i3lus ilv4 il2z1ar ilz3erk 2im. i2manw i2m1arm im4at ima2tr imat5sc ima4tur i2meg i2mej i2mek i2mele i2melf i2m1erf i2m1erz i4mesh i2meti i2mew i2m1inf i2m1ins im2mei im4m3ent 1immo 2imo im1org 1impo imp4s im3pse 1impu im2st im3sta 2imt imt3s2 2imu in3a2c i4nack i2n1ad in2af in3am i3nap in2ara in2ars in4art ina4s i2n3au in1äs in2dal in2dan 1index in3do 2indr ind4ri in3drü 1indus 2ine i2n1e2be in1ehe in3ei i2n1eng in3erbe i4nerbi in2erh iner4lö i4ner4tr i4nesk in1eu ine3un ine2x in3f 1info. 1infos 2inga ing1af in2g1a4g in2gl ing4sam 1inhab 2inhar 2inhau 4inhe in2i3d i3nie 2inig ini3kr in2ir 2inis ini3se i3nitz 3inkarn inma4le 2inn. in4n3erm 2innl in2nor inn4sta 1innta 2ino in1od in3ols in1or ino1s4 ino3t i1nö in1ö2d 2inp 2inr ins2am insch2 in2seb 2insen ins3ert in3skan in3skr 1insta in4s3tät in3stel in3su 1insuf in4s3um in3s2z 1integ int2h in3t4r in5tri in1u i3n2um in3unz invil4 i1ny in3zw i1ñ 2i1o io1c io2d i2oda io3e4 iof4l i2o3h io2i3d io3k4 i3ol. i3om. i3oms ion2 i3on. ional3a io2nau ion3d i3ons3 ion4spi ion4st i2ony i2o1p io4pf i3ops i3opt i2or i3or. i3orc iore4n i3orp i3ors i3ort io3s2 i2ost i3ot. i3ots i2ou i2ov io2x i3oz. i1ö2k i3ön i1ös. 2ip. i1pa i1pe ipen3 i3per ip3fa iph2 2i1pi ipi3el ipi3en ipi2s ip4l ip2pl ip3pu i1pr 2ips 2ipu 2i1q i1r2a i3rad 1i2rak irat2 i1rä ir2bl ir1c ir2e i3ree 2irek 2i3ré ir2gl irg4s ir2he ir2i 2irig 2irk ir2k3l irli4n ir2mak ir2mau ir4mä ir2m1ei ir2mum ir4m3unt ir2nar ir2no i1ro 1iron iro2s i1rö irpla4 irr2h ir4sch3w ir3se ir3sh ir2st irt2st iru2s1 i3sac i4s1amt is2ap is3are i2sau i2s1än 2isb i2sca isch3ar i3s2che i4schef i4sch3e4h i4sch3ei i4schin i5sching i2sch1l isch3le i2schm isch3ob isch3re isch3ru i4schwa i6schwir i4schwo isch3wu i2s3cr 2ise ise3e ise3ha ise3hi ise3inf i4seint ise2n1 is2end isen3s i2serh i2s1erm iser2u i2s1ess i4s3etat is2has isi2a i2s1id i2s1of iso6nend is1op 3i2sot is1pa i2spar is1pe is1pic is2pit is2por i2spro is3sa is4s1ac is4sau is4s3che is2st is3sta is3sto iss3tr is3stu is2sum is3t is4tab is4tam ist2an i1s4tat is4tel iste4n istes3 i1s4teu i1s4til is4toc is4tö is5tör ist4ra ist3re is4tü isum3p i2sü i1ß iß1ers it1ab. ital1a it1alt it1am it1an it2an. it3a4re it1art i3tat it1au i3tauc i4t1ax 4itä it2är i2t1äs ität2 i2t1ei i4teig it2eil i4tein 2itel ite2la ite4n iten3s2 i4tepo i2tex i5thr i2t1id 1itii iti4kan iti3k2e i2t1in1 it2inn i6tl itmen2 i5toc i2t1of i3tö it3raf i2t3ran it3ras it3rau it3räu it3re it3ric it3rom it4ron i3tru it3run it2sa its1a4g it2s1e4 its3er1 it2so it2s1pe it4staf it2sto it2teb it4tri itt2sp it1uh i2t1um i2tuns it1urg itut4 i3tü 2itz it2zä it4z3erg it2z1w 2i3u2 ium1 i1ü 2i1v i2v1ak iv1ang i2veb i2v1ei iv1elt ive4n i2v1ene i2v1ent i2v1ur 2i1w iwur2 2i1x i2xa ix2em i3xi 2i1z iz1ap iz1au izei3c ize2n i2z1ene iz4er i2z1ir izo2b i2zö i2z1w í1l ja1c jah4r3ei jahr4s ja3l2a ja3ne jani1 ja1st 2jat je2a jean2s je1c je2g jek4ter jektor4 jek2tr je3na je2p je4s3t je2t1a je2t3h je2t3r jet3s2 jet3t je2t1u2 je3w ji2a jit3 ji2v joa3 jo2b1 job3r jo2i joni1 jo1ra jord2 jo2sc jou4l j2u ju2bl jugen2 jugend3 ju2k jung3s4 ju3ni jur2o jus3 jut2e1 2j1v 1ka 3ka. k3a2a ka3ar kab2bl ka2ben 2kabh 2kabla 2kablä 2k1a2bo ka3b4r 2kabs 2k1abt ka1c k2ad 2k3ada 2k3a2dr ka1f4l ka1fr kaf3t2 k2ag ka1in ka3ka kaken4 2kala. ka2lan ka3lei ka3len. ka4lens kal3eri kal2ka kal2kr k1all kalo5 kal4tr k3ama kamp8ferf kan2al ka4n1a4s ka2nau kand4 2kanda kan2e 2k1ang kan3k4 2kanl 2k1anna k1ans k2ans. 6kantenn ka3nu 2kanw k2anz. ka2o 2k1apf 3kara 2karb k2ard k2arg ka3r2i kari3es k2ark 2k1arm k2arp3 kar2pf k2ars kar3t k2arta 2k1arti karu2 k2arw 3kas ka3se kasi1 kas3s ka2s3t ka3tan ka3t4h ka4t3r 2katt kau2f1o 4kaufr kauf4sp k1aus kau3t2 2kauto 1kä k1äh k1ä2mi k1än kär2 kä2s1c käse3 2k3b4 kbo4n kbu2s kby4 2k3c 2k3d2 kdamp2 2k1e1c k1eff kefi4 kege2 ke2gl ke2he. kehr2s kehr4s3o 2k1eic 2k1eig k1ein ke1in2d 2keinh kei1s 2k1eise keit2 ke2la kel1ac ke3lag kel1au ke2lä kel3b4 2ke2lek ke2len ke2l1er 2ke3let kell4e kel3s2k k4elt 2k1emp k2en. ken3au 4ken4gag 2kenlä ke2no kens2k ken5stei ken3sz k2ente k3enten ken3th k2entr 2k1ents k2entu 2kentw 2keo2 ke2pl k2er. ke1rad k2erc 4kerfah k4erfam k3ergeb ker6gebn k3er4hö ke6rin6nu kerin6st kerin4t ker4ken k2erko k2erl k3er4lau k3er4leb k6erlebe ker4neu k1e2ro k2ers. kerz2 ker4zeu 2k1er2zi k6es. ke2sel ke4t1a ke2t3h ket3s ke1up keu6schl 2k1e2x 2k3f4 2k1g2 2k1h4 kho3m ki3a4 ki1c 2k1i2de ki3dr ki2el kie2l3o ki1f4l ki1f4r ki3k4 2kil2a ki3li ki3lo k2imi k2in. k2ing 2kinh k2ini k2inn ki3n4o3 kin3s 2k1inse 2k1int ki3or kio4s 3kir kis2p kist2 kis4to 2kiz ki3zi 2k3j 2k1k4 kl2 4kl. 4kla. k4lar 4k1last k2le 4kle. kle3ari 4kleh k4leid 4k3leit k3lem. 2k3ler kle2ra 2k3leu kle3us 2klic 2klig k2lin k3lip k2lir k2lisc 2klist klit2s 4kliz 2k3loc klo2i3 k4lop klost4 klö2s k2löt k1lu kluf2 klung4 2k1lüc 2kly 2k1m k2n2 3knab k3ne k4nei 2k5ner kno4bl 2k5nor k3nu 3knü 1ko ko2al 2kobj 2k1o2fe koff4 koh3lu ko1i2 kol4a ko3le kol2k5 3kom ko4mu k2on ko3n2e kon3s4 ko3nu 2kop. ko1pe kop4fen 2kops 2kopz ko1r2a 2k1orc kor6derg ko3ri k2os ko2sp ko2st ko3ta kot3s2 kot4tak 2k1ou 3kow ko2we k1o2x 1kö kö2f k1öl 2k1p2 k1q k2r4 2k3rad k3rats 2kraum k4raz 2k3rät 2k3räum 2kre. 2k3rec 2kred. 2k3rede 2k3ref 2kreg k3reic kre1i2e4 kreier4 k3reih 2k3rh 2krib 2k3ric k3ries 2krip 3kris 3k4ron 2kruf krü1b 2ks k4s1amt k2san ks3ar k2sau ks2än ksch4 ks1e2b k2s1em k2sent ks1erl k2s1ers k2s1erw ks3ha k2s1id k2s1in k2s1o2 k3sof ks1pa k3spe ks2por ks2pu ks3s2 kst4 k1sta k4s3tanz k3stat4 k1ste k1s2ti k1sto k2stor k1str k2strä k1stu k2stum k2s1u ks2zen 4k1t k2t1ad kt1akt k3tal kt1am kt1an k2t3a2r kta4re k2t1au ktä3s kte3e kt1ei k2temp k2tent k4t3erfo k2t1erh kte3ru k2tex k2th kt3ho k2t1id kt1im k2t1ing kt1ins kti4ter k2t1of k3top kt1ope k4torga kt3orie kt4ran kt3ras k4tref kt4ro ktro1s kt3run kt3s4 ktt2 k2tuns k3tü kt3z ku1c kuh1 2k1uhr kul2a ku3l2e ku3l2i 4kulp 2k3uml kum2s1 k2u3n2a kung4 kun4s4 kunst3 2kunt 2k1up. kur2bl ku2rei kuri2e kuri4er ku2ro kur2sp kur2st ku4schl ku2sp kus3t ku2su 1kü 2küb kü1c kür4s 2k1v 2k1w 2k3z2 kze3l 3la. la3ba 2labb 4l3aben 2labf 2labg 2labh 4l1a2bl lab2o l2abr lab4ra lab4ri 2l3abs l1abt 3labu 2labw la1ce la2ce. 1lad lad2i l1adl 2ladm 2l1a2dr 3ladu l1adv 2laf la2fa laf3s laf3t la2ga la2gio la2gn lago2 la2g1ob 2la1ho 1lai la2kes la2k1i l2akk la1k4l 2l1al 4lall 4lalp l2ami la3min 1lammf l2amp 2l1amt lamt4s la4mun l1anal la2nau 2lanb 3l2and lan2d3a2 lan6d5erw lan6d5erz lan2d3r 2lanf lan2gl lang3s4 2lanhä l2anhe 2lanl 4lanli 2l3ann l1anp 2lans 4lansä 2lantr lan2zw 3lao l1a2po2 lap4pl la2r1an la2r1ei la4rene 3l2ar3g lar3ini lar3s 2l1ar3t l3arti la2ru la2sau 4lasd la3se 2lash 2lasi la2so 2lasp 3lasser la2st last1o lat2a la3te la4tel 2l3ath la2t3ra lat2s 2lat2t1a lat4tan lat4t3in lat2t3r laub4se l2auf. lau2fo l2aufz 1laug 2lausl 2lausr 2l1auss 2lauto 1law lawa4 lay1 lä1c 1läd 2läf 2l1ähn 1länd lär2m1a lä2s1c 4lät 2läub 2läuc 2läue 1läuf 1là 2l1b l3bac l2b1ede l4beta l2b1id l2b1ins lb2lat l3blä lb3le l2bli l3blo l4bre. lb3rit lb2s lb3sa lb3se lb4sk lb3sp lbs6t lbst3e lb4sto lb2u l2b3uf lbzei2 2l1c l3che l3chi lch3l lch3r lch3ü lch1w l3cl 4l1d ld3a2b1 l3d2ac ld3a2ck l2d1a2d lda4g l2d1ak ld1al l3dam ld1amm l2d3a2n l2d1a2r ld3ari l3das l3dat ld1au ld1är l2dei l2dele l3der. ld1erp l2d1e2se l2dex l2d1id l2d1im ldo2r ld2os ld2ö2 ld3r l2dran l2dre l3d4ru ld4rü ld3sa ld3st ldt4 ld3th l2d1um 1le 3le. le2ad leben4s3 le2bl 2lec le2chi lecht4e 3led 4ledd le3de le2e le3ei lef2a le2g1as le2gau le2gä le2gl leg4r 3leh leh3r2e 4lehs 4leht 3lei. lei2br l2eic l2eid 4l1eig l2ein. l2eind lein4du l2eine lei6nerb 2leink l2eint leis6s5er l4eist lei4ßer l2eit lei2ta lei8t7er8sc leit3s2 lekt2a 2lektr 3l2ela 2le2lek lel3s 3lemes le2m1o2 4lemp lem3s l2en. le4nad le2nä 4lendet 2lendu le4n3end 4lenerg l2enf le3ni l2enk 2l1enni l2e2no len4sem len3sz l1ents 2l3entw lent4wä 5lentwet 4lentz len2zi le1os 2lep 3lepa 3lepf lepositi8 3lepr l2er. l2e1ra le2ra4g le2rau lerb4 4l3ereig le4r3eim le4rers l1erfo l2erfr l2erfü 3lergeh l3ergen 3l4ergew 2l1ergi lerin4s lerk2 l2erka l2erko l2erle 2l1er2ö 3l2erra l4ers. lers2k lers2t ler3t 6lerwerb l1erz l2erza les2am les2e 2l1esel le3ser le3sh lesi1 le3sk les2t leste3 le1sto 4lesw 2lesy le2tat 2le3th 2leto let4tu le2u 4leud 2leuro 3leut 3lev 2lexe le2xis 2lexz 2l1f l3fah lfang3 l2f1ec lfe1e l4feis l3f4lä lf3lo l3f4lu lf3ram lf2tr lf4u lfur1 l3fü 2l1g lga3t lgd4 lgen2a lge3ra lgeräu3 l2geti l3go lg3re l3gro 2l1h2 3lhi. 1li 3lia li3ac li3ak li3am li3ar lia1s li3b4 libi3 li1c 3lichem 3licher li3chi 4lick li2cka li3d2a li2deo 2l1ido li4ds lid3sc l2ie 3lie. liebe4s li3ene lien3s lie2s3c lie2st 3lig lig4n li2gre li3ke li2kr lik2sp lik4ter li3l lil2a 2lim li3m2a 3limo li3n2a lin3al 2l1indu li2nef li2neh li2nep li2nes 2l1inf lings5 2l1inh 2l1in1it 2l1inj lin2k1a link2s li2nol l2ins. l2insa l2insc 2linsp 2linst 2l1int l1inv 2linz li2o li4om li3os. li2p3a 3lis. li3s2a li4schu 2l1isl 2l1i4so li2sp liss2 lit2a li2tal li3te lit2h lit1s2 lit3sz li3tu 3liu 2lixi li2za lizei3 4l1j 2l1k lk1alp l3k2an l3kar. lken3t lk2l lk3lo l3k4lu lk4ne lkor2b1 lk4ra l2k3ro l2k3ru lk2s1 lk3sä lks3t lk4stä l3k2ü 4l1l ll1abb ll1a2be l2labt ll1aff ll1akt l3l2al l2l1a2m ll3ama lla2n ll2anw ll1anz l3lap ll1arm ll1au ll3aug l2laus l2l1äm llb4 llch4 ll3d4 ll1ech lle3en l2l1ef ll1eim ll2em l3len. lle4n3a ll3endu llen3g l4lents l3ler. lle2ra l4lerfo l6lergen l4lergo ll3ernt ll3ertr l2lerz ll2es l2lex llg4 ll1imb ll1imp l2l1ind ll1ins llk4 ll3l2 ll5m lln2 ll1ob l2lobe l2l1of ll1opf l2l1o2r l3lor. l3lore l2l1ou l3low l2löf ll1ö4se ll3sh ll3s2k ll2spr ll5t4 llti2m llt5s2 llu2f ll1ur llus5t6 ll3z2 2l1m l2m3a2b l2marc lm1aus lm1c lme2e lm3eins l2m1e2p l2m1erz lm1ind lm1ins l2möl lm3p lmpf4 lms2t lm3ste lm3s2z lm3t 4ln lna4r ln3are lnd2 l3n4e l3ni l1nu l1nü 1lo 3l2ob. lo2ber 2lobj 2l1o2bl l2obr lob4ri l1o2fe lo1fl lof4r lo2gau lo3h2e 2l1ohr loi4r 3lok lo2k3r lol2a l1o2ly lo2min lo2n1o lo2o 2lopf 2lopt lo1ra lo4rä 2lorc l1ord lo3ren 2l1or3g2 lo3ro 3lorq 3los. lo4sa 3lose lo4ske lo2spe loss2e lo4ste los3t4r lo2ta lot4h lo3tha lo3thi loti4o 2l1ov lo2ve 2lox 1lö lö2b3 2löd lö2f 2l3öfe 4lög l1öhr 2l1ö4l3 4löß 2l1p l3pa lpe2n3 lp2f l2p1ho lpi4p lp3t4 l3pu 2l1q 2l3r2 lrat4s lre1s lrut4 lrü1b 4l1s l3sac l2s1a2d l3s2al l4s1amb l2sann l3sare l2sau l4schin l4schmü l2s1e2b l2s1ec l2s1em ls1ere ls1erg l2serh ls1erl l2s1ers l2s1erw l3sex l4sha lsho2 l2s1imp ls2log ls3ohne l4s3ort. l3s2pi ls2po l2spro l3s2pu ls3s2 lst2a lstab6 ls4taf l4s3täti l2ste l3stec l3stei l3stel l4stem ls6terne ls6terns ls2tie l2stit ls4tr ls2tu ls1um l2sun lsu3s ls2zen 4l1t l2tab ltag4 lt1ak lt1a2m l4t3ame lt3and lt1ang l3tarb lt1art l2t3ato l2t1au lt1eh l2t1eis l4te4lem lt3eli lt2en l5ten. lter3a lt2erg lt4erö l4t1e4sk lte2th l2t1eu l2th l4thei lt3ho l3thu ltimo4 l2tob l2t1of lt1op l2t1o2ri lto2w lt1öl l3tör lt1ös l4t3öt ltra3l l3trä lt3räu lt3re lt4rie lt3roc lt3ros l2t3rö l6ts lt3sc lt2so lt4stab lt4stoc ltt2 lt1uh l2t1um ltu4ran ltu2ri l3tü lu1an 4lu4b3 luba2 lubs2 lu2dr lu2es 1luf 2l1ufe 2luff luf2t1a luf2t1e luf2t5r lu2g1a lu2g1e2b lu4g3l lu2go lu2g3r lug3sa lug3sp lu2gu 2l1uh lu1id. lume2 2lumf 2luml l2ump l1ums l1umw 1lu2n 2l1una 2l1unf lung4sc 2l1uni 2lunt 2lunw 4luo 2lur l1urn l1urt 2luse lu2sp lus4s3a lus2s1c luss3er lus6serf lus6serk lus6sers lus2s1o lus2s1p lus2s3t lus4stä lu4st lus4t1a lust3re lu2s1u lu2t1a lu2tä lu4teg lu4t3erg lut1o2f lu2top lu4t3r 3lux 2lüb 5lüd lüh1l 2l1v 2l3w 2lx 1ly ly1ar ly3c 2lymp 3lyn ly3no ly1o ly3u 2l1z l2z3ac l3z2an lz2erk lz1ind lzo2f l2zö lz3t2 l2z1u4fe lz1w lz2wec 1ma m1ab m2abe 2mabk m2ab4r 2mabs 2mabt mach4tr ma2ci ma3da ma2d4r ma4d2s mae2 ma1f ma2ge. ma2geb ma2gef ma2geg ma2gek ma2gep ma4ges. ma2get ma2gev ma2gew 2m1agg magi5er. magi5ers ma3g4n 2m1ago mai4se 2m1akt mal1ak ma4lakt ma2lan ma4l3at ma2lau mal3d ma3ler mali1e mal3lo 2mallt malu4 ma2l3ut mam3m 2m1anal ma2nau 2manb man4ce. man3d2 man3ers ma2net m2anf 2m1angr m2anh 2manl m4ann 2mansa 2mansä 2mansc 2mantw 2manz ma2or m2app 2marb mar3g2 4ma3r2o maro3d 4marr mar6schm mar6schr ma3r2u m1arz 3mas ma3s2pa 4m1aspe massen3 mas4tel ma1s4tr 3maß ma2ta2b ma2tan mat4c ma2tel ma4t3erd ma5tri mat3se mat3sp 2m1au2f ma3un 2mausg m4ay ma1yo 3mä m1ähn mä1i2 4m1änd m1ärg mä3t4r mäu2s1c 2m1b2 mbe2e mb4l m3b4r mby4 2mc m3ch 2m1d md1a m2d1ä m2dei mds2e m2d1um 1me meb4 m2e1c medi3 medie4 medien3 2medy me1ef mee2n1 mega1 3meh 2m1eif 2m1eig m2eil mein4da me1i4so 3meist me3lam me2lau 3meld me2lek me2ler melet4 2melf. mell2 mel2se mel5t4 6mel6tern 2m1e2mi m2en. mena2b me3nal men3ar men3au men3ge men3gl me3nor m2ens men4sk men2so men3ta men6tanz 2mentn 4m3entwi me1o 2meou 2meö 3mer. me1ra me2r3ap me4rens mer2er 4m3ergän 3merin merin4d merin4t me2ro 3mers merz4en 3mes mes1a me2sal me4sä 4meser 2me3sh 4m1essa mes6serg mes2s1o mes2s1p mes2st meste2 me1sto 4mesu me3t2a me3th meu1 2m1ex 1mé 2m1f4 mfi4l 4m1g2 2m1h4 1mi mi2ad mi3ak mibi1 mi1c mi3da mie3dr mi2e1i mie3l mien3s mi2er mierer4 mie2ro mi4et mie4ti 3mig mi2kar mi2ki mi2ku 3mil mi3l2a milch1 mil4che mild4s 4milz 2m1imp minde4s min2en min2eu min2ga ming3s4 mi3ni 3min2o mi1nu 3mir. mi3ra 3miri 3mirs 3mirw mi2sa mi4scha mi4schn mi4schw mise1 mis2s1c mi2s5te 3mit mi2ta mi2th mi2t1r mit3s2 mit5sa mi5tsu mi2t1u 4mitz 2m1j 4m1k4 m3ka mk5re. 4m1l2 ml3c ml3l ml3s 2m1m m2mab m2m1ak m2m1al mm1ang m2m1ans mm1anz m2m1au mmd2 mm1ei mme4lin mme4na m4mentw mme2ra2 mme4rec mme2sa mm1inb mm1inf mm1inh mm1ins mm1int mmi3sc mmi1s4t mmm2 mm3p mm2s mm3si mm3sp mm3sta mm3str m2mum mm2un mmül2 mmüll1 2m3n2 m4nesi 1mo moa3 2mobj 3m2od mode3s mo2dr 4mog. mo2gal 3moh mo2i3 mo2k1l 2mol. 3mom mom2e 3m2on mo3ne mo4n1er mon2s3 mon3su 3mo2o 2m1ope 2mopt mo1ra mo2rar 2m1orc mor2d3a mor2dr mo2rer morgen5s6 mork4 3mos mos4ta moster4 3mot m1o2x mo1y 1mö mö2c 4mök m1öl 2m1p m2pf mp4f3erg mpf3erp mpf3err mp4f3erz mp2fl mpf3li mpf1or m3pi m3pon mp3ta m3pu 2m1q 2m3r2 2m1s m2san ms3and m4sap ms1as m2sau m3sä m3sc msch2 m4sco m3se m4s1ef ms1erw m4sex ms1ini mso2r ms1ori m2spä m2sped ms2po m2spot m2spro ms2pu ms3s2 m4stag m3stel m3s2ti m3sto ms4tr ms5trä ms5tren m3s2tu ms4tü ms1um m2sü m3sy 4m1t mt1ab mt1ak m3tam mt1ar mt3are mt1elt m2t1erf m4t1erg m2t1erl m2t1ers m2t1ert m4t1eta m2t1eu m2th mt3ho m2t1im m2t1ins mti2s mtmen2 m3tö mt1ös m4ts1 mt2sa mt2se mt3s2ka mt2spr mtt2 mt1um mt1urt m3tü mt3z 1mu mu1a mu3cke 2m3uh mu3la 2muls 3mun mun2d1a 4m3unf 4m3ungeb mu3ni m4unk munt2 4munz mu3ra mu4r1u2f m4us mu4s1a 3musi mu2s1o mu2sp mus3t mu2su mut1au muts3 mut2st 1mü 2müb mül4len 3mün 3müt mütter3 2m1v mvoll1 2m1w2 mwa2 mwa4r mwel4 1my my4s 2m1z 1na 3na. 2n1ab na2bä 4nabg 4nabh na2bl n2abo na2br 4n3abs 4nabt 3n2ac na2ch1 na3chen nach3s nacht6ra 4nadd n2ade 4na2dr n1af na1f4r 3n2ag na2gem 3n2ah na2h1a n3ahn 3nai nai2e n1aig 2n1ak na2ka 3nako n2al. na2l1a2 na2lä 3n2ald n4ale na4lent na2let nal3la nalmo2 na2lop nal2ph n2als. nal3t4 na2lu 2naly n4am. 3name n4amen 4n3a2mer na3m4n 3namo 2n1amt namt4s n1an. 4n1a2na 4nanb n1and2 4n1ang 2nanh 2nani 4nank 2nanl 3nann na3no n1anp 2nanr 2n1ans 2nantr 2nanw nap2si n1ar 5nar. na2r1a 2narc n2ard 4narg 3nari n2ark n2arle 2narm n2arp 4n3art na3r2u 3nas n2as. na4schw 4nasp 4n1a2sy nasyl2 3nat n4ata na3t4h 4natm nats1 nat4sa nat4sc 4natt n1au 4nauf nauf4fr n3aug 5naui 3n2aul 4nausb 4nausg n2auso 4nauss n4auste 4nausw navi5er. navi5ers 1nä 3n2äc 3näe n1ähn 2n1ä2m 2n1än när4s5 3näs nä2sc n2äss 2näu 3nä1um 2n3b4 nbe2in nbe3n nbe3r2e nbes4 nbu2s nby4 2n1c n3ce2n3 nch3m n2ck 2n1d nd2ag n2d1ak n2danl nd1ann n2d1anz ndat2 nd1au nd1c nde4al. n2dei nde4län n4d3ents nde4rob nder5ste nde2se ndi2a3 n2dob ndo2be ndo1c nd1op nd1or n2dö n2d3rat n2d3re n2drob nd3rol nd3ros n2drö n2drui n4d3run nd2sor nd2spr nd4stab nds3tau nd3th ndt4r n2dü4 ndy3 1ne 3ne. ne2ap ne3as ne3at ne2bl 2n1ebn 2nec 3neca ne1ck 3ned ne2de 2nee3 ne2e2i4 ne3ein n1ef neg4 2ne2he. 2nehen2 3nehm 4n1ehr 2n1ei n2eid 4neif 3neigt 4n3eing 4n3eink ne2ke nek3t4 ne2l 3nela nel3b 2n1ele 4nelek 4nelem ne3len ne3li nel4la 3ne3l2o 3ne3lu n2em. 2n1emb n1e2mi 2n3emp 2n1ems 3nen n4en. nen3a2 n2enb n2enc 4n1endb 4n1endd 4n1endf n1endg 4n1endh 4n1endk 4n1endp 4n1endt 4n1endw ne2n1e2b nen3ei nenen1 ne4nene 4nengb nen4ge. nen4gen 4nengs 4nengt n2enh ne2ni n2enj nen3k ne2no n2ens nens4e nen3sk 5n2en3t2a n1entb 4n1entl 4nentn 5nentr n1ents 4n3entw 4nentz ne2n3u n2env n2enw ne2ob ne1os 2nepf 2n1epo ne2pos n2er. ne1ra ne2ra2b ne3r4al ne2r3am ne2ran ne2rap ne2rau 4nerbe. 4nerben n1erbi nere2 ne2reb n1erf 4n5erfo nerfor4 2nerfü 3nergr n1erh 2n3erhö 3neri n1erk n2erli 2n1erlö n1ermä ner4mit n2ern. 4n1ernt ne2ro ne1rös n2erp 3n2ers. 2n3ersa ner8schle n2ert. n1ertr ne2rup n2erv 2n1erz 3n2es n4es. ne3san nes4c ne3ska nes1o ne2s1p 4n3essi ne1sta nes3ti ne2tad ne2t1ak ne2t1an ne2tap n1etat ne2tau ne2th net3ha nett4sc n1e2tu net2zi ne2u neu1c neu3g 2n1eup neur2 n2ew 2n1ex 3nez 1né 2n1f nf1ak nfalt4 nf2ä nff4 n3fi nfi4le. nf4l nf5lin nf2o nfo1s nf4r nf3s nft2o nft4s3 n2f1u 4n1g ng2abs n2g1ac ng1ad n2g1ak n2g3a2m n2g1and ng2anf ng1anz n2g1äl ng3d4 n3gef n2g1ein ng2en ngen2a n3ger nge4ram n4g3erse nge4zän ng3g4 ng3hu n2g1i2d n3gläs n2glic n2glo n3g2loc n2glö ng3m n2gn ng3ne ng1or ng3rat ng3roc ngs3c ng4s3e4h ngs3pa ngs5tri ng3ts n2gum 2n1h4 n3han n3har n3hau n3hä n3he nhe2r n3hu 1ni 3nia nib4l nich1s nich8ters n1id 3n2id. ni2de ni3dr n4ie nie3b ni1el nie3l2a nie4n3 ni3ene ni1ero nifes3 nig2a 2n3i2gel nig3r ni2gre nig4sp 3nik ni2kal ni2kar ni3ker ni4k3ing ni3kl ni2kr 3n2il nim2o 4n1imp nin1 3n2in. n2in4a 4n3ind 2ninf 3n2ing4 4n1inh ni2nor 2n1ins n2ins. 4ninse 4n1int 2n1inv ni2ob ni3ok ni3ol n2ip ni3ra 3n2is ni4schw ni2s1e ni3se. ni2s1p ni3spi nis3s4 ni2s1u 2nit ni2ti ni3t4r nit4s ni3tsc nitts1 nitt4sa ni3tu ni3v 3nix n1j 2n1k n2k3ad n2k1ak n3k2al n4k3alg nk2am n2kans n2kaus n2käh n2k1är nke2c n4k3erfa nk4erg nk1inh n2k1ins nk3len nk3les n2klie nk2lo nk2lu nk3lun nk4na n2kne n2k1ort nk2öf n2köl n2k3ro nk2s1al nks2ei nk3s2z nk2tak nk2tan nkt1it nk4top nk2tru 2n3l2 2n1m4 nmen2s 4n1n nna2be n2nada n4n1all n2n1an n2nau nnen3g n4nents nn2erh nn2erk nne2rö n4n3er4wa nner2z nne2s nnes1e nne4st nn2ex nn3f nng4 n3ni n2nof nn1o2r nn3sc nn3se nn3s2p nn2th n2n1uf n2n1unf nn1ur 1no 3no. 3nobl no2bla n2o3ble 2n1ob2s no1c 2no2d no3dr n1of 2n3o2fe n3ole no2leu n2on. 3n2opa 3nor. nor2a no2rad no1rak no3ral 2norc nor2d5r 3norh 3norm 3nors n1ort 3n2os. no3sh no2s3p n2oste nost1r 2nostv no3tab no2tä no4t3ei no2tel no3t3h no4tha no4thi no2t3in no2t1op no2tr 3nov 3now 2n1o2x 3noz 2nöd 2nö2f 4n1ö4l 2n3p4 npa2g npro1 npsy3 2n1q 2n3r2 nräu3s nre3sz nrö2s1 6n1s n2s1a2d n2s1all n2sang n2sant n2saus n3sav n2s1än n2s1äus ns2ca n6schef n4schro nsch7werd ns1eb ns1e2d nseh5ere nsen4sp ns1ent n2s1ep ns1erf ns1erg n2serh n2s1erk n2s1erö ns1ers n2s1erw n2s1erz nse2t n4s1eta n3sex nsfi4l nsho2f n3sil n2simp n2s1ini nsi4te nsi2tr ns2kal n2s1op n4s3ort. nsp4 n4spat n4speri n4sph n3s2pi ns4pie n2spo ns3pon n4sprä n4s3prie n4spro nsrü2 ns3s2 nst1ak n3star n3stat n4stat. n4s3tate nst3eif n3stemm ns4tent ns6terbe n5s6terne n5s6terns nst4erö ns2ti nst5opfe ns4tor n4strac n4strie ns2tu nst2ü nstü1b n2sty ns2um n2s1un ns2ung ns4unr ns4uns n3sy n4s3zi 2n1t nt3abs n3t2a3c n3t2al nta3m nt1ang n4tanza nt2arb nt1ark nt2arm nt4at nt1äm n2t1äu nte3au nte2b nt1ebe nte1e nte3g6 nt1eh n2teig nt2en nt4ene nten6te. n3ter nt4ern nt4ers nt4ert n4t1ess nteu3 nte3v nt2her n2t3ho n3thr n3t4hu nti3c nti3k4l n2tinf n2t1inh ntini1 nt2ins n3ti1t nt4lem ntmen2 ntmo2 n3to nto3me nton2s1 n3tö nt3rec nt3reif n5trep nt4rig n5trop n2t3rü n4ts nt3sa nt4sau nts2o nts2p nt4s3par nts2t nt2sto n3tu 3n4tu. ntum4 ntu2ra ntu4re. ntu4res n3tü nt3z2 1nu. 1nu1a nu3ar nubi1 1nu1c 1nud 3nue nu2es nuf2 nu2fe 1nug 2n1uh 1nui nu3k4 n2um. 2n3umb 2numf 2numg 3numm 2numr 2n1ums 2n3umz nu2n 2nuna 1n2ung4 3nung. n3ungl 2n1uni 2nunt 1nuo 2nup 2nur 3nu2s nu3sc nu3se nu3sl 1nut nu2ta nu4t3r 1nuu 1nux 1nuz 3nü. 2nü4b nür1c 3nüs 1nüt 2n1v2 n3ver 4n1w 1ny. 1nyh 2nymu n1yo 1nyr 1nys 1nyw 2n1z n2zad n2z1a4g n2zan n2z1au n2z1än n2zär nzdi1s nz1ec n4zense n4zentw n4zentz nz3erwe nzi2ga nzig4s nz1ini n2zor nz2öl nz3s n2zurk n2z1wa n2z1wä n2zwö n2z1wu ño1 2o3a2 o4abi o4ac oa3che oa3chi o4ad oa3de oa4g o4ah o4a3i oa3ke oa4k1l o4a3la o4a3mi o2ar o2as 3oa3se o4at o5au o1b ob2al 2oban o3bar 2o3b2ä 2obb ob2e 2obe. 2obea ob3ein 2o3b4en oben3d4 oben3se ober3in4 obe4ris 2obew 2o3b2i obi4t ob3ite 1obj ob1l o2b3li 2o3blo 2o3bo o2b3re o3bri ob3s2h ob3sk obs2p ob2sta ob3sz 2o3bu obu2s 2o3bü 2oby4 2oc o3ca oc1c o1ce och1a ocha2b o1che oche4b o2ch1ec och1ei ocher4k och3l och3m och1o och3ö2 och3r och1s ocht2 och3te o1chu ochu2f och1w o1ci o1ck o2ckar o3cke ock2er o3cki o2cko ock3sz o1cl o1ç o1d o3d2a od2dr o3deb o3d2e1i odein3 ode2n1 odene4 ode3sp o3dex 2o3dia o3dir o3div o2don odo4s 2odr o2dre odt4 2o3du 2o1e2 o2ec oen1 o4e3s o2e3t o3et. o3ets o1ë 2ofa of1a2c of1am of1au o2f1ei of2en o3fer of2f1a of2f1in 1offiz of2f5l of2f3r offs2 of2fu 2ofi of3l of1la of4lä of4lö 2ofo 2o1f1r of3ra of3rä of4rü ofs1a of4sam of2spe of2spr of2s1u 2oft of2tei of3th 2o1g o2g1ab oga3d og1ala og1ang o2g1ei oge2l1i o3gh ogi2er og2lo o3g4n ogs2 og3sp og1ste o1ha o1hä o1he o2h1eis ohen3s o2h1ert o2h1erz o1hi ohl1a ohl3au oh3lec ohl1ei oh3lem oh3len oh3lep oh4lerg oh4l3erh oh4lerw oh3lo ohls2e oh2lu 3ohng oh2ni 1ohnm oh2n1o o1ho oho2la oh1o2p o2h3ö ohr1a oh4rin oh1ro oh1s oh3t o1hu oh1w 2o1hy 2oi o1i2d o3ie o1im oimmu4 o1in oi2r o2isc o3isch. o1ism oiss2 oi1th 2o1j 2o1k oka2la okale4 3o2kel oki2o ok1lä ok4n 4okr ok2s1p okt4 2ol o1la o2lab o2l1ak ol2ar olars2 ol1auf o1lä ol4dam ol4dr ole3e ol1eie ol1eis oler2 ole3s ol1ex o1lé ol2fa ol2fl olf1r ol2fra ol2gl ol2gr ol2i oli3k4 ol2kl olk3r ol2kre ol2lak ol2l3au oll1e2c ol2l1ei ol2lel oll5ends ol4lerk oll5erwe o3lo ol2of olo3p2 ol1ort ol2str o1lu 3oly 1olym ol2z1a ol4z3ern ol2zin ol2zw 2om o2mab oma4ner om2anw om1art o2m1au o2meb ome3c o2m1ei o3m2eis o2mel o3men. o2mep o2meru om1erz om2es omiet1 o2m1ind om1ing o2m1int om3ma om1org om3pf oms2 omtu3 o4munt omy1 2ona ona2b o2nae o3nal on1ap o2narb on2au on3aus 2onä onbe3 2onc onderer5 2one one2i one2n3 onens2 on1erb o2n1erd on1erg on1erö o3nett on3f2 on3g2l ong4r ong3s 4o3ni on2i3d o4nikr o4n1im on3ing on3k2 onli4 onlo2c on3n2an on3n2e ono1 o3nod o2noke on1orc ono3s ons1a onsa4g on4sam on2seb onse2l onsi2 ons3l ons1p onst2h on3t2a ont3ant on4t3end ont3erw ont2h on4t3ri ont3s o1nu 2onuk on3v 1ony on3z o1ñ oof2 oo2k3l o1op o1or oor3f oo4sk oo2tr 2o1ö2 o1pa opab4 o2p3ad op3akt o3pan opa5s o1pec o1pei o1pe4n 2opf. op2f3a op3fah o2pfe op4ferd opf5erde opf1l opf3la op1flü 4oph2 o3phe o1pi opi5a4 opi3er. opi5ers. opin2 op5lag o2p3le op3li 2o3po op4pl op2pr 2o1pr 1opsi op3sz 1op3t4 o1q 2or. or1a or3a2b o1rad 2orak 2oral o2r3alm or4alt 3oram or2and o2ranh or3arb o1ras or3att o3rä or1änd or1ät or2bar orb2l or1c 2orca or2ce 4orda or2d3am or2dau or4d3eng or2deu or2d1ir or2dit 1ordn or2do 2ordr 2ords ord3s2t or2dum 2ordw 4ore ore4as o2r1e2ck o2r1ef ore2h or1eig o2rein or1er o2rerf or1eth 2orf or2fle orf3s4 or3ga 2orget or3g2h 2orgia orgi1e or2gl or3gle or2gn 2orh 2o3ric 4orie. o4rient o3rier 4oril 4orin1 2orit ork2a or2k3ar ork2s 2orm or4mans or4ment or5ne. or3n2o1 2o1ro oro3n2a 2o1rö 2orq 2orr orr4a or3rh 2ors2 or3s4a orsch5li or3sh or3sz or2t1ak or4t1an or2t1au or2tär or2tef ort3eig or4t3ent or4t3ere ort3erf or2t3ev or2the ort3ins or4t3off or2tor or4tö or4trau or4t3räu ort3re ort3ric or2t1um o3ru or2uf o4r3un o2r3ü o2rya 2o3s2a os3ad os4an osa1s o3sche os4co 2o3se ose3e o2s1ei ose2n o4sents 2osh o3s2hi o3sho 2osi o3sk o4ska os3ke o4ski 2os2kl 2os2ko os2lo 2oso 2os1p os2pe os3pec o3s2po os2sa oss3and os4sä os2sei os4s3en4k os4s3enz os2s3o os4son os2s3p os2s3t ost1a2b os4t3am ost3ang os3tarr os4ta4s ost1au os4tei oster3e os6t5er6we os2t3h os3til os3to os4t1ob ost3ran ost3rä ost3re ost3rot ost3uf 2osu4 2o3sy o3s2ze o2ß1el o2ß1en2k o2ß1enz o2ß1ere o2ß1erf 2o1t ota2go o5tark o2t1au ot3aug o2teb o3t2e1i otei4n ote2l1a ote4lei ot4em3 otemp2 o2t1erw ote2s 4ot2h ot4he ot5hel o2t3hi ot3hos o2thr o2t1i2m ot2in otli2 ot4ol ot1opf ot2or oto2ra oto1s o3tra o2t3re ot3rin ot2sa ot3sc ots1p ot4spa ots2pe ot2spr ot4terk ot2th ot2t3r ot4tri o3tü o2u oub4 ou2ce ou1f4l oug2 ou2ge ou3gl o3uh ou4le. o3um o3unds oun4ge. 2our ouri4 our4ne. ou3s2i outu4 2ouv 2o1ü o1v ove3s 2ovi oviso3 2ovo 2o1w o3wec owe2r1 o3wi o1x ox2a ox2e 1o2xid ox3l o2xu 1oxy o1yo oy1s4 2o1z o3z2a oz2e ozen4ta o3zi ozon1 órd2 ö1b öbe2la öbe4li öb2l ö2ble ö2b3r öb2s3 2ö1c öch1l ö2chr öch2s öchs4tu öcht4 ö1d ödi3 öd2st ö1e 1öf öf2fl öf3l ögen2s1 ög3l ög3r ö1he öh3l2e öh3ri ö1hu ö3ig. ö1ke ö2ko3 ök3r 3öl. öl1a2 öl1ei öl1em öl4en öl2f1ei öl1im öl1in öl2k3l öl3la öl2nar öl1o2 öls2 öl3sa öl3sz ö2l1u öl2ung ölz2w öm2s 2ön ön2e ö3ni önizi1 önn2e ön2s ön3sc ön3sp ö1nu öo1 ö1pe öpf3l öp4s3t ör3a2 ör1c ör2dr ö2r3ec ö2r1ei ö2r1e2l ör2erg ö2rerl ö3r2erz ör2f3l ör2gl ö2r1im ör2kl örner2 ör1o2 örs2e ör3s2k ört2e ör2tr öru4 ö2r1une ö2sa ö2scha ö4sch3ei ö2schl ö2sch3m ö2schw ö2s1ei ö2sp ös2s1c ös2st ö2st ös3te ös2th ös3tr ö3su ö1ß 2ö1t ö2t3a öte4n3 öt2h öts2 öt2sc öt2tr ö1v ö1w ö1z öze3 özes4 p2a 1pa. 1paa 1pac pa3da pa2dr pa1f4r pag4 pa3gh pa1ho 1pak pa1k4l pak2to 3pala pala3t 1palä pa3li 2palt pa2nar pa3nei pa2neu pan3k4 2panl 2pann 1pa2no pan3sl pant2 panz4 1pap papi2 papieren8 papie8r7end 3para pa2r3af par3akt 1parc pa5reg pa5rek 2par2er 2parg pargel6d 1park. par4kam par4kau par2kl par2kr 1paro 2parp 1partn 1party par3z2 pa3s2p pa4st 2paß 1pat pat4c pat4e2 pa5t4r 1pau p3auf pa3uni 1pä 3pä2c pä3cke 3päd 3pär 3päs pä4t1e2h pä4t3ent pä2t3h pä2to pät3s4 2p1b 2p3c 2p1d2 pda4 p2e 1pe. pe2a pea4r pech1 1ped pe2en pef4 pei1 2peic pe1im pekt4s 2peku 3pel pe2l1a4 pel3d pe2let pe2lex pe3li4n pe4l3ink pell2a pell4e 1pem pena4 pe3n2al pen3da pe4nen 1penn pe2n1o 3pensi 1pensu pen3z2 1pep pe1ra per2an pere2 1perl per4na 3pero pe2rob per2r1a 5pers perwa4 pe3sa pes3s2 pe2st 3pet 1pé 4pf. p2fab p2fad p2faf pf1ai p2f1ak pf1ans p2fa4r pf3are p2f1au 4p3fe. p2fei pf1eim pf1ein p3fen. p2fent p3fer. pf2erw p3f2es pff4 p2f1in3s p2f3lä pf3lei pf3lie pf3lo pf3lu p2for pf3r pf1ra 2pfs2 pf3sl pf3sz 2pf3t 2p1g pgra2 1ph 4ph. ph2a 2phä 2phb 4phd 2p1hei phen3d phen3s 2ph1ers 2phf 4phg phi2ka 4phk ph2l 2phm 2phn p3hop 2phö ph4r 2phs ph3t2 2phthe phu4s 2p1hü 2phz pi2a3 pias4 pi3as. pi3chl p4id2 piegelei8en pi2el piela2 3pier 3pik 1pil pi3le pil4zer pin2e pingen4 ping3s 3pinse pi2o pi3oi pi3onu 3pip pi2pe pi4pel pi3ri 3pirin 3pis 4piso pi3t2a pi1th pit2s 2pitz pi2z1in p1j 2p1k2 pku2 pkur1 1p2l4 2pl. 3p4la p5la. p5lad plan3g 3plä 2ple. ple1c p4leg p4lem 3ple5n4 2plig p4lik p4liz p4lo 2p3lu 2p1m2 2p1n 1p2o po3b4 po1c 3pod 2p3oh po2i po3id 3poin 3pok 3p4ol po2lau po3li po4lor 2pond po1o2b po2p3ak po2p3ar po1pe po2pl po3pt po1ral po1rau 2porn por3s por4tin por4tre por6tri pos2e po4sta pos4t3ag po4stä po2s3te post3ei po2sto pos6tr post3ra po3ta 3pote po2t1u po2w po3x pö2bl pö2c 2p1p p2p3a2b pp3anl ppe4ler ppe2n1 p2p1f4 p2p1h p3p2ho pp3l pp5lan pp1lä p2ple p2p3ra p2p3re p2pri pp3sa ppt2 p2r2 1prak 1prax p4rä 1präd 1präg 3präm 3präs 2pre. 2prec 1pred pre2e1 1prei 3preis 2p3rer 3p4res pri4e 2prig 1prinz 1p4ro 3prob 2proc 3prod 3prog 3proj 2pross pro1st 3prot 1prüf 2prün 2p1s 4ps. ps4an p3se p3s2h ps1id p2sö ps2po p2st p3sta p3stea p3stel p3s2ti pst3r ps2tu p3stü 3p2sy ps2ze 2p1t pt1a pt2ab pt3alb pt3at p3te p4t3ec p4t1ei pte4l p4tele p4t1ent pt3erei p4t1erw p4t1erz p2th pt1in1 pto3me p4tos pto2w p2t3r pt3s2 ptt2 pt1um pt1urs ptü4 3p2ty pt3z 1pu pu1a pub4 2puc pu2dr 2p1uh pul2sp 2pund pun2s 2punt 2pur pu2s3t 3put put2s 1püf 2pül pün2 2p1v 2p1w pwa4r 3py1 pys4 py3t 2p1z qu4 1queu 1ra. ra2ab 2r3aac r3aal ra3ar r1ab ra2bar rab2bl 2rabd r2aber 2rabf 2rabg 1r4abi ra2br 2rabs 2rabt 2r3abw 1raby ra1ce 2r1acet ra4cheb ra4chin racht3r rach6trä ra2chu r2ack r2ad r4ad. ra2dam 2radap 3radf 3radl r3a2d3r rad5t 1rae r2af raf3ar ra2fer ra3ge ra3gle ra2gn 3r2ahm 4raht r2ai 2raic rail4l 2r3air 1rake 3ra1k4l ra2kre ra2kro 2rakti 3rakü r2al r4al. ra2la2 ral3ab rala4g r3alar ral3b 3r4ald ra3le 2ralg r4ali rali5er. rali5ers ralk2 ral3la rall2e 2rallg 2r3alm. r3alp. 2ralpe r4als r3al3t r4alt2h ra2lu 3raly rama3s ra2mer 1r2ami r2amm ram4man ram6m5ers ram4m3u ram2p3l 2r1amt ramt4s r2an. 4ranc r4anda r4ande ran4dep ran4d3er rand3s 4r3anei r4aner 2ranf 1rangi rani1e ran2kr 2ranl 2r1anm 2r1anp 2ranr r2ans. r2ansp ran4spa 2rantr 2r3anw r2ap 2rapf r1ar r2ara 2rarb 3rarei rar3f4 ra2r1in r2ark r2arp 2r3arz r2as r4as. ras2a ra4schl 2r3asph 2raß 1rat r4at. ra2t1a r3atl rat4r rat2st 2r3atta 4rau. 3raub. 4raud rau3e2n 2rauf 2raug 3raum rau4m3ag rau4man rau2mi 3rausc 2rausg rau2sp 2raus5s raut5s 1raü r2ax 3r2äd 4räf 4räg 2räh 2räm 3rän. 3räni 3räns 2r1är r2är. rä3ra rä2s1c 3rätse rä2u räu2s räu5sche 4räut 2r1b r2b1ab r2b1a2de r2bak rbal3a rba3re rb1art rb1auf rbb2 rb1ech r4belä rb1ent rbe3r2e r3b2la rbla2d r8blasser r4b3last r3blä r2ble. rb3ler rb2lin rb2lö rb2o rb4ri rb2s rb3se rb4sei rb3ska rbs1o rb3sp rb4stä rb3str rb2u rby4t 2rc r1ce r1che. r1chen r1chi rch3l rch3m rch3r rch1s2 rch3sp rchst4r rch3ta rch6terw rch1w r1ci r2ck1 r1cl r1ç 2r1d r3d2ac r2daf r2d1ak r2d1al rd2am rdani1 rd1ant rd1anz r4dap r2dei rd2ei. r2d1elb r3den rden3d rden4gl rde3re rder4er rderin6s r4d3ernt rde3sp rdi3a2 rdia4l r2d1inn rd1it rdo2be r3don rd1os r2dö rd3rat rd4ri rdt4 rd3ta rd3th rdwa4 1re 3re. re3aler re2alt re2am re3as re3at. re3ats 2reä re2b1a re2b1l reb1r reb3ra re2bü r2ech rech3ar 4rechs 2reck. 2recki 3red. 4redd 2redit re1el re1er 3refe 4reff 3refl 3refo 3reg 5reg. rege4l3ä re2hac re4h3ent re2h1i rehl4 re2h1o r2ei. rei4bl r2eie 2reig 3reigew rei3l2a rei3l2i reim2p r1ein rei3nec 4reing r3eink 4reinr rein8s7tre re1in2v reister6 3rek 4re2ke re3la 2r1elb rel2e re3lei 2re2lek 2r1elf re3lo 2r1elt relu2 r4em. r2emi 4rempf 4remu r4en. r2ena rena2b re3nal re2nä 3rendi ren3dr re4n3end ren4gl 2rengp re2ni r1ense 2r1entl 2r1ents 2rentw 4r3entz r2enz re3or 3repe 3repo 4repp 3r4er. 2r1erb r2erbr 2r1erd r1erf r1erg r4ergen r1erk 4r3erken r2erki r1erl 4r3erlau 2rerlö 2r1erm rer2n 2r1ernä 4r3erns 4r3ernt r2ero re2rob r1erö 3r2ers. 2r1ersa r2erse 2rersp r1ert r2erte 2rertr 2r1erz rer5ze r2erzy 3r4es. re2sa 3rese 3reso 2ress ress2e res6s5erw 3rest re1sta re2s2tu 3resu re2thy re2u reu3g2 2reul re3uni 2r1eur 2reü 2r3evid r1ew rewa4r re2wi 2r3e2x1 3rez 4rezi 1ré 2r1f rf1ält rf2äu r2fent rf2es rfi4le. rf3lic rf3lin rf4lö r3flü rfolg4s r3for rf4ru rf4rü rf2sa rf2s1ä rf4s1id rf2s3pr rf2s3t rf2ta rf3t4r rf2u 4r1g rg2ab r2g1a2d r2g1ah r2g1ak rg2an rge4an rge2bl rge4l3er rgen4z3w rge4ral rge4tap r2geto rgi4sel r2glan r2gleu r2glig r2gno r2g1ob r2g3ral r2greg r2gres r2gret rg3rin rg3sp rgs4tr rg5s2tu r1h4 2rh. 2rha r2ha. 2rhä 3r4he. 3r4hen r3her r2hoe rho2i3 2rhol 2rhö 2rhs rhu2s 1ri ri3am ria1s ri3at rib2bl ri1ce ri1cha rid2 ri2d3an 2ridol r2ie rie2fr ri1el riene4 rien3s rie2nu ri1er. ri4ere ri3ers. ri3esti ri1eu ri2f1a ri2f1ei ri2fer ri2f1o ri2fr rif3s rif4ter 3rig 5rig. ri4gene 5rigj rig1l 4rigr rik1l ri4kla r2imb 2rimp rim2s rim4sc r2i3na 2r1ind rin4dex rin4diz ri3n4e rine1i 2r1inf rin2fo ring3l rin2gr 2r1inh 2rinit 2rink 3rinn 6r5innenm 4r3inner 4rinnta r1innu 2r1ins 3r4ins. rin4so rin2sp r4inspi 2rint rin4teg rin4t5r 2r1inv 4r1ir r2is ris2a ri4scho ri4schw 3risik ri3so ri4s1p 3riss ri2st ris6t5ers r2it r3i2tal ri3t2i rit4r rit2tr 5ritu rix1 1rí 2r1j 2r1k rk2am r2käh r3klau r2klis rk4lo rk2lu rk4n r2k5nu rk3räu r2k3rea r3kri rk3rin rk2s1e rk3shi rk2sp rk1st rkstati6 rk4stec rk2ta rk4t3eng rk4t3erf rkt3ers rk6tersc rk4t3erw rk2tin rk2t1o2 rk2t3r rk3tra rk4tri rk1uh rk2um rku2n rk1uni 4r1l r3l2a rl2e rle2a r3lec rle2i r3let r3l2i rli2s r3l2o rl2ö rlös3s rl2s1p rl3ste rl2s3to rl3t 4r1m r3m2ag rma2la r2m1ald rm1ans rm1anz rm1a2p r2maph rm2är rm3d2 r3me. r2m1ef r2meo rm2es r2mide r2m1im r2m1o2ri rmo1s rm3sa rm3sta rmt2a rm2u rm3ums 4rn rna2b rna4n rn2and rn3ani r2n1anz rn2a2r rn3are rn3ari r2nau rnd4 rn3dr r3ne rn3e4ben r4nef rn2ei rn3eif r4n3eis rne2n r4n1ene rn3ense r4nerf r4n1erg rn4erhi r4nerk r4n1ert r5nes rn2et r4nex rn3f rng2 r3ni r4n1in r3nod r2n1op r2n1or rn1ö r1nöt rn3s2ä rn3s2p rn3s2z rn3t2e r1nu rn1ur r1nü r1ny ro2bei 2robj 3robo 2robs ro1c 3rock. r2o3de ro3e4 2rof roh1l roh3na 3r2ohr 3roi ro1ir ro3le rol4lan rol3l4en rol3s 2roly 4rom. ro2mad ro2mer 4romm 4romt r2on ro4nerb 3ronn rons2 ron4tan 4ro1ny ro1pe ro3ph r1or r2ora ror3al ro2rat ro2rei ro2r1o ror3th ro3sh ro3s2i ro3smo ros2s1c ro3sta rost1r 4roß ro2ßu ro4tag rote3i ro2tho ro4tri rots2o rot2ta ro3t2u ro3unt 3rout 2rox rö2b3l rö2du 2röf 4rög 1r2öh r1ök 1r2öl 3römi 4röp r1ör r2ös. r2öse 2r1p2 r3p4a rp4e rpe2re rpe4r3in rpf4 r2pli r3po rpro1 rps3t rp3t r3pu r1q 2r1r rr2ab rr2ar rr1äm rrb2 rr1c r3r2e rre4ale rrer4s rre2st r4rew rr2he rrik2 rr2n3a rr2o r2r3ob rro3m rr2st rr3stu rr2th r3ru r3r2ü rrü1b 4r1s rs3ab r2s1a2d r4samp r4s1amt rs2an r2s3ang rs3anp rs3ant rs3ar r3sch2e r6scherl rsch2l r3schu r3schw r2sein rse2n1 rs2end rse4ne rs1ere rs1erö rs1ers rs1erz rs1eta r3sho r3si rs2kal rs2kan rs2kie rs2kis rs2kl r4sko r4skr r4sku rs3l rs4no r3so r4sob r4s1op r4sord r4s3ort. rs2p4 r2s3ph rs3s2 r4stant rs2tec r6st5eing rs4temp rs4terb rs4t3er4w rs2th rs2ti r3stie r2stin rst3ing r2stip r3sto rs4tob r4stot r3stö r3s4tr rst3ran r6strang rs2tu r3s4tü r3swi r3sy 4r1t rtal2 r2t1alm rtals1 rt1am rt1ang rt1ann rt1ant rt1anz r2t1ar rt3a4re r2t3att rt1är rte1e2 rt4eif rtei3la rtei1s4 r2telf r2temo rte2n1 rten3s2 rt3erei r4terfa r4terfo r4t3erh r2t1erk r4t3er4la r4t3erle r4t3ernä rter4re rt1ers rte3s2k r2thi rt3hol rt2hum r2t1id r2t1ima r2tinf rto1p rt1or rto2ri r3tö r4t3rak rt3rec r4treis r5tri rt3ros rtrü2c r4ts rt4s1eh rt2so rt2spa rt2spr rtt4 r2t1urt r3tü rt3z 1ru ru1a ru3a2r3 rube2 ruch3st ru6ckerl ru2cku rude2a ru2dr 3ruf ru2fa ruf2s3 4rug 2r1uhr 3ruin ru1ins ru1is 2rum 4rumf ru2mi 4ruml r2ums. 4rumz 2r1una 2rund run2d1a r2unde rund3er run6derl run6ders run6derw 2r1unf 2rungl 2r1u2ni 4r3unio run2kr 2r1unl 2r1unm 4runn 4r3unt 2runw ru3pr 4r3ur ru2ra ru2r1e 5ruro ru2si rus2s1p rus4st ru2st ru3sta 3rut ru4tei rut3h ru2t1o2 ru2t3r 4ruz ru2zw 1rü 2rüb rü1ben rü1ch 4rümm 2r1v rve4n1e 2r1w rwun3s 4r1x 1ry ry2c 2r1z rz1a2c rz2an r2zar r2zas r5zene rz1eng r4z3ents r2z1erf r2z1erg r2z1erk r2z1erw rz1id r3z2of rz1op rz2ö rz3te rz2th rz2t3ro rzug2u r3zwä r3z2wec 1sa 3sa. 3saa 2s1ab sa2be 3sabet sa2bl sa3ble sa2br 4sabs sa2cho2 sach3t 2s1ada s1adm 2s1a2dr 3safa sa2fe 2s3aff 3safi sa1f4r 3saga sa4gent sag4n sa2gr 3s2ai sa3i2k1 sail2 2s1ak sa2ka 3saki 3sakr 4sakt 3s2al. sa4l3erb sa2l1id 3salo sal2se 2s1alt 3s2alz 3sam s3ameri 5samm 6s1amma 4s1amn s1amp sam2to s1an s2an. 2s3a2na s3anb s2an2c s2and s4and. san4dri 3sang. 2s3anh 3sani 2s3anl 2s3ans san4sk 4s3antr 2s3anw 2s1ap sa2po 3sapr 2s1ar 3s4ar. 3s2ara 4s3arb 3s2ard 3sari s3arr 3s2ars 4sarti s1asp 4s3a2sy 3sat sat2a 4s3ath 4s3atl 4satm sa2tr sa3ts sat4z3en s1a4u 3sau. 3sauc 3saue 2s3aufb sau2gr 3saum 3saur sauri1 2s3ausb 3s2ause s3ausw 2s3av sa2vo 1sä s3ähn 3säl s1ält 2s1äm 2s1änd 3sänge 2s1är 3s2ät 3säul 2säuß 4s3b4 sba4n sbe3r2e 1sc 2sc. 2scam s2can s2cap 2scar 2s1ce 6sch. 2schak s4ch2al 4schanc 4schang 2schao s4chä 4schb 4schc 2schd 3sche. 2schef sch3ei. 4schemp sch2en 3sches 4schess 4schex 2schf 2schg 2schh schi4e s4chim 4schiru 3schis 2schk s4chl 4schle. 6schlein sch6lit 2schmö 2schn. 2schox s4chö 2schp 2schq 4schre. 4schrin sch3rom 4schrou 6schs schs2e sch3s2k 4sch3t scht2a scht4r s4chu 4schunt sch2up 3schü 2schv 4schwet sch4wil 2schz 2scj 4s3cl 2sco 3s4cop 3sco4r s2cr 2scs 2scu 4s3d2 sda3me sde1s sdien4e sd4r 1se se3at. 2s1e2ben seb4r 2s1echo s1echt 2s1e2ck 3see se1ec se2e1i4 see3ig seein2 se1er. se1erö 2s1eff se2gal se2gl seg4r 3seh se2h1a4 se3he se4h1ei se4hel se4herk se2hin seh1l seh3re seh1s seh3t se2hüb 2s1ei. 2s1eie 2s1eig s1ein 5s4ein. 2seinb sein4du sei3n2e sein4fo 4seing 2seinh 4seink 2seinl 2seinn 4seinr s4eins. 4seinsp 4seinst 2seinw 4s1eis 3s2eit 3s2ek s2el. se2l1a se3lad sela4g se3lam sel1ec 4selem se4l3erl sel3ers 2self. s3elix se2l3ö s2els sel3sz sel3tr s4e3ma 2s1emp 3s2en. se4nag se2nä 2s1endl sen3gl 3s2eni 3senk se2no se4nob 3s2ens s2ent. 4s1entf 2s3entg s2enti 2s1ents 2sentw 2sentz se2n3u seo2r 4s1e2pos 3seq s4er. 3sera ser3a2d se2r3al se5ref s3ereig 6sereign se4r3eim se4r3enk ser2er 2s1erfo s2erfr s3erfü 4serfül ser3g s2ergr s1erh 2serhö 3seri 4serken 2s3ernt se2rob 4s3eröf s2ers. 2sersa 4serseh s4ert. s2erta seru2 se4r1uf se3rum se3rund 3s4erv 5ses. se2sel se1sta se3su 3set 4se4tap se2tat 4s1e2th se1u2n 2s1ex se2xe 4sexp sex3t 1sé 4s3f4 sfal6l5er sflo4 4s3g2 2s1h sh2a 3s2ha. sha2k 4s3han 1shas s3hä s3h2e 3shi. 3shid shi4r sh3n s3hoc 4shof 3shop sho4re 3show s3hö sh4r 1si si2ach si3ach. si2ad 2siat sib4 5si1c 2s1i2deo s2ido 3s4ie siege4s sien3 si3ene si1err sie2s si1f4 3s4ig si2g1a2 sig4n si3gnu si2g3r sig4st si2k1ab si2k1ä sik3erl si2ki si4k1l si2kr sik3s sik3t4 si2ku 3silo 2s1imm si3n4a 2s1ind 2s1inf sing1a sin3gh sin3g4l sin2gr sing3sa 4s1inh sin1i sini1e 2s1inq 2s1ins 2s1int 4s1inv 3sio sion4 3s2is si2sa si4schu si2s1e si2s1o si2s1p sis3s 3s2it si2tau sit3r si2tra si3tu siv1a sive3 si2vr 1sí 2s1j 2s1k2 4sk. 3skala 4skam 4skanz s3kar 4skas ska4te. 4skateg ska4tes 4skb s4kep 3s2ki. s2kif s2kig 3s2kik 4skir ski1s 3skiz sk4l 4s3klas sk4n 4skom 4skor 4skow 4skö 4sks 4sk3t 3skulp 2s1l2 3slal 4slan sla2ve s2law s3lä sl3b s3le sler3s s3li 3s4lip sli4tu s3lo. slo3be s3loe 2s3m2 2s3n4 4sna snab4 sni3er. sni3ers 4s5not 4snö 1so 3so. so4a 2s1o2b so1c so3et 3soft 3sog s1o2he 4sohng 2s1ohr 3sol so3la so4l1ei sol4ler 4so2ly 3som 3s2on son3au sone2 son5ende son3sä son2s1o so3o 2sopf 3sor. so1ral s1orc 2s3ord so2rei 2s1orga 5s2orge 2s1o2rie so2r1o2 3sors so4ru 3sos s4os. 4s1ost so3unt 3sov 4s1o2ve 3sow 2s1ox 3soz 1sö sö2c sö2f 2s1ök 2s1ö2l s1ös 1sp2 2sp. 2spaa 4spak 2spala spani7er. 4spap 2spara 4sparo 3sparu 3spaß 4spau s2paz s2pä 3späh 2spär s3pe. 2spel 4spensi spe3p4 s1peri 2sperl 2spero s2perr 4spers 4spet 3s2pez 4s3pf 2spha s4phä s3phe 3s2pi4e 4spier4 spi2k 4spil 3spio 4spi4p 4spis 2spl 4spla 4splä 4sple 3s2pli s3p4lu s3pn 2spod 2spog s2poi 2spok 4spol 4s3pos s2pott 4spr. s2prac s2pran 4sprax 2spräm 4spräs 3s4prec 2spred 2spres 2sprob 3spross 3spru 4sprüf 2s3ps 2s4pt 2spun 2spup 3spur 4sput 4spy 2s1q 4s3r4 srat2s srat4sc sret3 srö2s1 srücker6 srü2d 6s1s ssa3bo ss1a2ck s5saf s3sag ss1aj s3sal s4s1ala s4s1alb s4s3amt s4s3ang s2sano s4sans ss2ant s4s3anz s3sa1s2 ss3att s3s2ä s4sce s4sco ss1ec s2s1ega sse3ha sse3inf sse3in4t sse6r5att ss1erö ss3erse s3s2es sse3ta ss3l ss1off ssoi4 s2s1op ss1ori ss2po s2spro ssquet4 ss3s4 sst2a s3stel ss2th ss2ti ss4tip ss2tur s3stü ss1ums s1t 6st. s2ta 4sta. 3staa 2stabb st2ac 3s4tad 3staff 2stag 3stah 2stak 2stale s3ta3li 2stalk st1alm st1alp st1ami 4stan. sta4na 3stand 2stani 4s3tann 2stans 2stanw s4tar. 4stari s4tars st1asi s3tat. s4tau. 2stauf 2staum 3staur 2staus 3staus. 2stax 3s2tä 4stäg 4stält s4tänd 5stätt s3täus 2stb 2st3c 2std st2e 4s5te. 2stea 4stechn s2ted 4stee 3s2teg ste2gr 3s4teh s2te2i 3steig 4steil 3steilh stei4na 1s2tel 2stel. stel4l3ä 2steln 2stels 2stem 4stem. ste4mar 4sten s5ten. s4t3ends s4t3engl st4ens s4t3entf s2tep 2ster 6s5ter. ste6rers 4sterm 3sternc 4stes s4t3ese stes6se. ste4st 2stet s4teti 3s4tett 3s2teu 1steue 4steuf st3ev 4stex 2stf 2stg 4sth s4thä s4thi s2t3ho s2thu 2stia 2stib s2tic sti2e 2stie. s2tieg s2tiel 2stien 3s2tif 2stig 2stik s2til 3s4tim s4tinf s3tinn st1ins 2stio 1s2ti2r 2stis st1i4so 1stitu 2stiv 2stj 2stk 4stl 4stm 2stn s2to 2sto. s3tob 2sto3d 4stod. 1stof s4toff s4t3om 4ston 4stoo 2stopo 2stor. 2store 2storg 2stori s3tort 2stose sto3s2t 1stoß 4stote 4stou 2stow 2stoz 1stö 2stöch 2stöt 2stp 2stq s2tr 2strad 2strag 1s4trah 4strai 4strak 2stral 4strans 3s4tras 5straß 4straum 4s5träg 4sträne 4s5tref 4streib 5st4reif st3renn 2s4trig 1s4tri2k 2s5tris st3roll stro4ma 1stru 2strua 2strug 3struk 4st3run 2strup 2s4t3s4 2st3t4 st2u 1stub 4stuc 3s4tud 2stue 3stuf 3stuh 2stum2s stum4sc 2stumt stu2n 2stun. 3s4tund s2t3uni 4stunn 2s3tuns 2stunt stu3re st3url 2sturn 2st3urt 2s3tus 1stü 2stüch 2stür. 2stüre 2stürg 2stürs 3stüt 2stv 2stw 3s2tyl 4st3z 1su su1an 3su2b3 su4ba2 4subi 3su1c su2cha such4st 2s1u2f 2s1uh su1is su1it. sul2a sul2i sult2 su2mar su2mau 3s2ume su2mel su6m5ents s3umfe 3summ sum1o2 su2mor s3umsa s3umst su2n 3sun. sun6derh su4ne s1unf 2s1uni 4sunt 3s2up sup3p su2ra 2s1url s1urt s4u2s1 su3sa su3sh su3si sus3s 3suv 1sü 2sü4b 3süc sü2d1 süden2 3sün 4s3v 2s1w s3wa s3we sweh2 4swie 4swil 1s4y syl1 sy4n3 2s1z 4s3za 4s3zei s2zena 3s4zene 4szent s2zes 4s3zet s2zis sz2o 4s3zu s3zü 4s3zw 2ß1a2 2ß1b2 2ß1c 2ß1d 1ße 2ß1ec 2ß1e2g 2ß1ei ße2l1a ßen3g ße2ni ße2no ße2ro ß2ers. 2ßerse ßer3t 2ß1f 2ß3g2 ßge2bl 2ß1h 1ßi ßi2g1a2 ßig4s 2ß1in ß1j 2ß1k4 2ß1l ßler3 2ß1m 2ß1n2 ß1o2 ßos2 2ß1p2 2ß3r2 2ß1s2 ßst2 2ß1t 1ßu 2ß1um 2ß1ü 2ß1v 2ß1w 2ß1z 1ta 3ta. 4taa 5taan 4tab. ta2b1an 2t1abb 3tabel 2taben ta4bend 2tabf 2tabg 2tabh 2tabk 3table 2t3abn ta2br 4tabs 2t3abt ta2bü 2tabw 2tabz 2t1ac 3tacu t1ada tadi3 2t1a2dr ta3d2s 3taf. 3taf2e 4taff t1afg t1af4r 3t2ag ta2ga2 ta2g1ei 4t3a4gent 4ta3gl t3ago tag4st tah2 tah3le tahl3sk t2ai ta3i2k tai2l ta1ins tai4r ta1ir. t1a2ka ta2kro tak6ta 3taktb 3t2aktu 2takz 3t2al. ta2la ta3lag ta3lak t1alb. t1albk tal3d 3t4ale ta4lens tal2lö 3talo ta2l1op 2talt 2tam 3tame ta2mer ta2mi t1ampl t1amt 3tan. t1a2na 2tanb 4t2and ta3ne 4tanf 2tang 3tani t2ank t3ankl 4tanl 2t1anme 4t1anna t2ano t1ans 3t2ans. 4t3ansi 4t3ansp ta2nu 2tanwa 2tanwä t2anz. t1anza tan6zerh t1anzu ta3or ta2pe. ta2pes 2tapf ta2pl 2tarb ta4rens ta4r3ere 3t4a3ri 4tark 2t1arm 2tart t1arti tar2to ta2ru 2t1arz 3tas ta3sa 4t1asp ta2ta2b ta2tan ta2tau tat3ei ta2tem ta2t3er ta2th tat3he t3atl t4atm ta2tom 4tatue ta2t1um 2t1auf 4taufg tau3f4li 4taufn t1auk 3taum t1ausb 3tausc tau6schr tau6schw t2ause 4t3ausg t1ausk 4tausl 4t3auss 4t1ausw 3tav 3tax taxi1s 1tä 4täb tä1c 4täd 3täe 3täg 4tägy 2täh 2t1ält 4täm t1ämt t1ängs 3tänz t1äp t2är. tä2ru tä2s t2ät 4tätt 2täuß 2täx 1tà 4t3b2 tbe3r2e tblock5e tblocken8 4t1c t3cha t3che tch2i tch3l t2chu tch1w t4ck t3cl t3cr 4t3d4 tdun2 1te 3te. te2a2 2teak te3al te3an 3teba 3t4ebb 4t1e2ben t2ech te3cha 3techn 2teck teck2e te2cki te1em te2en3 te1erw te2es 2teff teg3re 2teh 3teha 3tehä 3tei. t3eifr teik4 3teil 4teilhe 2t1ein tein3e4c t3einge t3einla 4teinn t3eis. t3eisb tekt2 5tel. 3tela te2l3ab te2l1ac te2l1au telb4 3te3le tel1eb tele4be te4l1ec te4l1eh te4lein 2telem tel1en te4lerd te4leu 4t3elf. 3telg te2l1in te2lit 3telk tell2e 5teln te4lost te2l1ö 3telp 5tels tel3s2k 3telt4 tel3ta tel3th 3tem. te2m1ei te2min 2temme te2m1o2r 3temper 2tempf tem3s te4m1u 3ten t6en. ten3a tena2b te4na2d te4na4g te4nas te4nau te2nä t4enb ten3da 4t3endf t6endi 4t1endl t6endo 4t3endp ten3d4r te2n1e2b te2nef te3n4ei. ten3eid ten3ens 4tenerg te2net ten3g 4t1eng. ten4gla t4enh te2ni te4n3in t4enj t4enm ten3n tens2e 4tensem t4enta t3entb 4tentd t4ente 4tentn tent3ri 4t3entw 4t3entz ten6zerh ten3zw t3e2pi 3t4er. tera2b te1raf ter3am te3ran. 4terbs 4terbt 3terc 4t3erde. te2re2b te4r3eif te2rel ter3end te4reng te4rerk terer4z 4terfol t4erfr 4terfül 3ter3g2 6tergrei t6ergru t4eri te3ria 4terklä 2t1erlö ter4mer 3termi ter4n3ar 2ternc t3erneu t4ero t3erö ter4re. t4ers. t6erscha ter4ser terst4 t4erst. t4ersti t4erstu tert2 teru2 te4r1uf ter4wäh 6terwerb ter3za 2t3erzb 3tes tesa2c te2san tesä2c te2sel te2spr tes3s2 t2est tes3tan test3ei tes6ter6g tes6terk testes4 te2su 3tet2 t2et. te2tat 4teth 4tetl teu3ere teu3eri 3teuf 3teum te1un 3teur. teu2r3a te2vi te1xa 2t3e2xe 2t1e2xi 4texp 3text 2t1exz 4t1f4 tfi2l 4t1g2 tger2 t1h 4th. 2th4a 3t4ha. t2hag t3hai t2hak 3thal. 4t3hau 2t3hä th2e 1t2he. 3thea 2theb t2hec 2t3hei t4hein t2hek t2hem 1then t4hene t4heni 3theo 2therr t2hes 3these t2heu 1thi t2hik 2t3hil 2t3him 2thk 4th3l 4th3m 2th3n 1t2ho 2t3hoc t3hof 2t3hoh t4hol. t3hor 2t3hot thou2 4t3hö 2thp 1th2r2 4thrin. 4thrins 2ths 2thub 4thun 2thü 2thv t2hy 1ti ti2ad ti3a2m 3tib4 ti1ce tiden2 ti4dend ti2deo 3tief. tieg4 2tieh ti1el ti3e4n3 3ti2er tie4rec ti1et ti1eu 3tif. ti1fr 4tift 3tig ti4gerz 3tik ti2kam ti2kar ti2kin ti2krä ti2lar ti2lau ti2lei ti2lel 3tilg ti2lö til3s tilt4 ti2lu ti2ma2g t2imi tim2m1a 4t1imp 3t2in. ti3na t1inb 4t1ind ti3n2e t1inf tin2g1a ting3l ting3s t1in1it 2t1inj tin2k1l 3t2ins. 4t1inse 2t1int ti1nu 4t1inv 3tio ti3or 3tip ti3pl ti4que. ti1rh 3tis ti4scha tisch3w ti2sei ti2sp ti1sta 3ti3t2e 2ti3tu tium2 3tiv ti2van tive3 ti2vel ti4v3erl ti2v1o ti2v3r ti2za 2t1j 4t3k4 4t3l tl4e 5tlem tle2r3a 6t5li tlung4 4t3m2 tmal2 tmen6t3 tmo4des 4t5n4 tnes2 tnes4s 1to 3to. to4as to5at 4tobj tob2l to1c 3tocht to6ckent 3tod tode2 4to2d1er to4d1u toi4r 3tok to3la 3tole 4tolz tom1e2 to2men 2tomg 3ton to2nau to2neh 3too to2pak to2pat 3topo 2topt 3tor. to1ra to2rau to4rän 4torc t1ord 3tore to2rel t1org t3orga 3torin tor3int to2rö 3tors t1ort. to2ru t2orw to3sc 3tose to4sk tos2p 4toss 3tost4 to1sta 4toß 3to3te to2tho 3totr tots2 3t4ou touil4 to3un 3tow 2tö 3töch 4töf 4t1ök tö4l 3tön t1öst 4töß 3töt 4t3p2 tpf4 2t1q 1t2r4 2tr. 5tra. 3trac tra3cha 4tract t3rad. tra4dem tra4far 3trag 6trahm 5t4rai 3trak 3tral 2t3rams 3t4ran. 2trand 3trank t3rann 3trans t3rase t3rasi 4traß 5träc 3träg 3träne 4träs 4träß 4t5re. tre4ale 4treb tre2br 4trec t3rech t4reck 6t3red 5t4ree 3tref 4trefe 4trefo 4treg t4rei. 3t4reib 4treic 2treif t3reig 2t3reih t3rein t3reis 6treit t3reiz 2trek 6t3rel t4rem t4ren. 3trend 4trendi t3rent 2trepe 2trepo t4repr t4rer t4res. t4ret tre2t3r t4reu 3treuh t3rev 2trez 5t4ré 2t3rh 3tri 4tric 5trieb tri4er 5trigg t3rind 4tring tri3ni 4trinn t4rip 4tript tri2x trizi1 3tro. 3troe 3t4roi tro2ke 4trom. tro2mi 4troml 3tron 2t3roo t4rop 3tropf 3troy t3röc 2tröh 3trös 2t3röt 3trua 4truk trum2 trums1 2t3rund 3t4runk 5t4rup tru2th t4rüb trü1be trü1bu 2t3rüc trücker6 t4rüg try1 2ts 4ts. t4sa4b t3s2ac ts1ad t2s1ah ts1al t4s1amt4 t2san t4s3ar ts1as t2sau t2s1än t3s2cha t4schar t3sch2e t4schef ts4chem tsch4li t4schro ts4cor t2s1e2b t3seil t4seind ts1em tse2n1 t2s1eng t2s1ent t2s1er t4s3esse t2s1i2d ts1ini t2s1ir ts3kr t1slal ts1o tso2r t3sou t2sö t3spal ts1par ts4pare t2spä ts2ped t3spek t2sph t3s2pi t2spo t3s2pon t3s2por t4sprei ts3s4 t1st4 t4stag ts3tak ts4tal ts3täti t2s3tep t3s4tero t2stip t4stit ts3toc ts3tor ts3trad t4stran ts3trau t2s3trä t4streu t2stri t4strop t2s3trü ts2tu t2s1u 1tsub t3sy 4t1t tt1ab tta2be tt2ac t2t1ad tta6gess tt1ak tt2al tt2ant tt1art tta1s tt1ebe tt1eif tt1eis t3tel tte2la tte4leb tte4len ttel1o ttes1 tte2sa tte2sä tt2häu t2t3ho t3ti t3to tto1s t3tö t3tro tt3ru tt3rü tt2sen tt2sor tts1p tt2spe tt2spr tt2sti ttt4 t3tu tt2un t3tü 1tu tu1alm tu3an 2tub 3tuc tu2chi 2tud 3tue 4tuf tuf2e tu3fen t3u2fer tuff3 2tuh tu2is 2tuk t3u2kr tul2a t2um. 3t2ume 2t3umf 2t3umg 2t3umk 2t3umr tum2si tum2so tums5tr 2t3umt 2t3umz 3tun. 2t1una 2t1und 3tune 2t3unf 3tung t3unga tung4s5 2tunif 2t1u2nio 2t3unt t1up. tu2r1a4g tu2rä tur1c tu2re. tu2rei tu2r1er tu2res tu2r1e4t turin1 3turn tu2ro tu4ru tu2sa tu4schl tu2so tu3ta 2tü 4tüb 3tüch tück2s 3tüf 3tüm 3tür. tür1c 3türe 3türg 3tür3s 3tüten 4tütz 4t3v 4t3w twa2 twi4e 1ty1 3typ ty2pa tys4 4t1z t2za4 tz1ag tz1al tz1ar tz1au tz1ä t3ze. t2z1e2c t2z1eie t2z1eis tze4n1 tz2ene tz3ents tz1erl tz2ers t3ze2s tzgel2 tz1ind tz1int t2zor tz2ö tz2th tz2tin tz1wä tz1wi tz1wu 2ua u1a2b u1a2c uad4r u1al. ua2lau u1alb u3alet u1alf u3a2lo u1alr u1als u1alt ua2lu u1am u1ans u3ar. uara2b u1ars ua3sa ua2th uat2i u3au u1ay u1äm u1äu 2u1b u2be2c u3b4i ubi3os. ub2l ub3lic u2b3lu u2bop ub1r ub3rä u2b3rit ub2san ub2s1o ub2spa u2büb 2uc uc1c u1ce uch1a u1cha. uch1ä u1che u2ch1e4c uch1ei u3ches u1chi uch1il uch1in uch3l uch3m uch3n u2ch3r uch2so uch4spr uchst4 uch4tor uch2t3r u1chu uch3ü uch1w u1ci u2ckem u4ckent u3ck2er u2cki u1cl 2u1d u3d2a uden3s2 uder2e udert4 udi3en uditi4 u2don ud3ra u3dru 2u1e ue2ck u2ed ue2en u2eg u2ela ue2le ueli4 ue2mi uen1 ue2nä ue2ner uenge4 ue2ni ue2no uen2zu u2ep ue2r3a ue2r1ä u2ere u3ereh ue3reig u3erer ue4rerg ue4rerk u3erex uer3g2 u4erinn u3erin4t uer2ne uer4ner uern3s4t ue2r3o u3err uer3sc uer3t2 u3erum u3erunf u3erunt ue2ta ue4tek u3fah uf1ak uf3ar u3fas uf1au u2f1äs u2f1ä2ß u2f1ei u2f1em u3fen. u2fent u2f1erh u4ferle uf2ern 2uff uff4l uf2fro uffs4 uf3l u2fob ufo2r uf1ori uf3r uf3sä uf4sin uf4so uf2spo ufs3tem uf2t1eb uft3s2 u2fum 2u1g u4gabte ug1af ug1ak u2g1ap uga4s ug1au ug3d2 u2g1ei u2g1erf u2g1erl ugge4st ug3hu u2g1l ug3lad ug3lo u3g2lö u4glu u2g3n ugo3 ug1or u2gö u4g3reis ug3ro ug3rüs ug3se ug4ser ug3si ug3spa ug4spr ug4spu ug5stä ug3str ug3stü u2gü u1h 2uh. uhe3s6 uh1la uh1lä uh2li uhme4 uhr1a uh2rer uh3ri uh4rin uhrt4 uh2ru uh4rü uh1w 2ui ui2ch u1ie ui1em u3ig u4ige u1in. u1is. u3isch. u3ischs uisi4n ui4s5t u1j uk2a u3käu u1ke u1ki u1k2l ukle1i uk4n uk2ö u1k4r uk2ta uk2t1in uk2t3r u1ku uku2s u1l ul1ab ul1am ula2s ul1äm ulb4 ul2dr uld2se u2l1el ule4n ul1erf ul1erh ul1erw ule2sa ule2t ul1eta u2lex ul3f4 ulg4 uli2k ul1ins ul3ka ul2kn ull2a ul2les ull3s ulm3ein ulo2i ul1or ul2p1h ul2sa ul4sam uls2th uls3z 2ulta ul3th ul4tri ult3s u2lü ul2vr ulz2w u2m3a2k um1all um1anz u2m1art u2m1aus u2maut 1um3d2 um2en ument4s umer2a u2m1erg u2m1erl u2m1erw 1umf 1umg um1ins um1ir 1umk 1um3l 4umm umm2a umpf4li um2p3le 1umr 3umsat um4ser um2sim um2s1pe um2su um3t2 um2un u2m1ur 1umz un1 4un. 2una. 1unab un3ac un4al u3n2am u2n3an 2un2as un3at 1unda un4dab 1undd un4dei un4d3erf und5erha 1undf 2undg un2did 1undn un2dor un2d3r 4unds. und3sp und3st un2d1um 1undv 1undz u3ne une2b une2h un2ei. un3ein unen2t un4es4 1unget 1ungew ung5h 1unglü un2g1r ung3ra ung3ri ung4sa un2id un3ide 1u2nif unik4 un2im uni2r 2unis un3isl u3n2it 3u2niv 2unk un2k1a2 un2kei unks2 unk4tit unk2t3r 3unku unna2 un2n3ad un3n2e uno4r un2os 1unr uns2 2uns. un3se 1unsi un3sk un3sp uns4t1r 1unt un3ta unte4ri un3tr unt3s 2untu unvol2 unvoll3 1unw 2unz 2uo u1o2b u3of u3or. u1or3c u3ors uos2 u1os. uote2 u1pa u1pe2 uper1 up2fa u2pf2e u2pf1i u3pi up2pl up2pr u1pr up4t3a2 upt3erg upt1o up4tr u1q 2ur. u1ra u2rab u3raba ura2be u2r3a2m u2r1ana ur2anb u2r1ang ur2anh u2r1an5s u2rar ur3a4ren u2r3att u2r1au 2u1rä ur1än ur3b2a urch1 urd2 ur3di 2ure ur1eff u2rele ure4n u4r1ep ur1erh ur1erw 2urf urf3t ur2gri urgros4 urg3s4 uri2c ur1im ur1ini ur3ins ur1int urk2s 1urlau 4u1ro u3rol uro1s u1rö ur3p ur3sac ur2san ur2sau ur2ser ur4sin urst4r ur4sw ur3s2ze urt2 u3ru urü2 ur2za ur2zä ur2zi ur2zo ur2z1w 2us u4saf us4ann u6schent usch5wer u2s1ec u2s1ei u3seid u3sep use1ra u2serp u2s1ese usi3er. usi5ers. us3kl u4sko us3oc u3soh u2s1op us1ou us3part u2s1pas u2spat us1pe u3s2pek us1pic u5s4piz u2spo us2por u2spu us4sez us2sof ust3abe u1stal us3tau us2th ust2in us3tr u5stras us6tris u1stu u2stun u2stur us2ur u2sü 2u1ß 2u1t ut1alt ut3a2m u2t1ap u2t1ar u2tär u3te ut1eg ute4ge ut1ei. ut1eie ute2n1 u2tent uter4er u4t3ersa ut2es ut2et u4tev u4t1ex utfi4 ut2he u2thi u2t3ho u2thu uto1 uto4ber uto3c ut1opf u2tops ut4or utos4 u3tö ut3rea ut3rü ut3s2a ut2s1ä ut4schl ut4schm ut4schö ut2spa ut3te ut5t4l utts2 utu4re utu5ru u3tü utz3eng ut2z1in ut2zo ut2z1w 2u1u2 uufe2 u1ü2 2u1v4 u2ve. uve3rä u1w 2u1x ux2e ux2o ux3t u1ya 2u1z uz1we uz3z4 1üb 2übc 2übd übe2 übe3c über3 üb3l üb3r üb2s3t 2üc ü1che üch3l üch2s1c ücht4e ü3cken ück1er ück3eri ü4ckers ück4spe 2üd üd3a4 ü3den. üden4g ü3d2ens üd1o4 üd3r üd3s2 üdsa1 üd3t4 üdwes2 ü2f1a ü2f1ei üfer2 ü2f1erg üf2fl ü2f1i üf3l üf2to ü1g üge6leis ü2g3l ü2gn üg3s üg4st üh1a ü1he ü2h1ei ü2h1eng ü2h1erk ü2h1erz üh1i ühla2 ühl1ac ühl2e üh3mo üh3ne ühn2s üh3r2e ühr3ei. üh1ro ühr3ta üh1s ühs2p üh3t üh4th ü1hu üh1w ü1k ül1a ül2c ül4e ül2la ül2l1ei ül2lo ül2lö ü1lu ü2ment 2ün ü2n1a ün2da ün2dr ünd3s ünen3 ün2fa ün2f1ei ün2fli ün2fr ün2g3l ünn2s ün2s ün3sc ün3se ün3sp ün3str ünt2 ü1nu ün2za ü1pe ü1pi üp2pl ür1a ü2r1ei ür2fl ür2fr ür4g3en4g ü3r2o1 ürr2 ür2s ür3sc ür3se ür3sp ürt2h üs2a ü2schl üse3h üse3l üse1s üs2s1c üss2e üs2st ü2st üste3ne ü1ß 2üt ü2t1al ü2t3r üt2s1 üt2tr ü1v ü1z 2v1ab va1c val2s 2vang 2varb va1s v4at va2t3a4 va2tei va2t3h vatik2 va4t1in vati8ons. va2t3r vat3s4 va2t1u 2v1au 2v1b 2v1d 1ve2 ve3ar ve3b ve3c ve3d ve3g ve3h ve4i veit4 veits3 ve3la ve4l1au ve3le ve3li ve3lo ve3ma 2ve3mu ve3nal ven2c ve3ne venen4d ve3ni ve3nö ve3o ver1 ver3a ve3rad ve3rand ve3ras ver3b2 verd2 vere2 ve4rek verf4 verg4 ve3ri ve4rin ver3k ver3st vert2 ver5te ver3u ves1 2ve3sc 2ve3s2e ves3ti ve3ta vete1 ve3tr 2veü ve3v ve3x2 2v1f4 2v1g 2v1h vi3ar vi4a3t vi2c vid3s2t vie2h3a vi2el vi2er vie4rec vie2w1 vig2 2vii vi2l1a vi4leh vi2l1in 2v1i2m vima2 vi4na vin2s 2v1int vi3sa vise4 vi3s2o vi2sp vis2u 2v1k 2v1l2 2v1m 2v1n 2v1ob vo3ga vo2gu 3vol voll1a vollen4 vol6l5end vol2li 2v1op vo2r1 vor3a vor3d vor3e vor3g vo3ri vo5rig vormen4 3voy vö2c 2v1p v2r 2v3ra v3re v4ree 2v3ro 2vs vs2e v1sta v1steu v3s2z 2v3t vu2et 2vumf 2v1v 2v1w 2v1z w2a 1waa wab2bl wa3che wach6stu wach4t4r waffe2 waffel3 1wag wa5ge wa2g3n wa3go 1wah wahl5ent wah4ler wah2li wai2b 1wal 2walb wal4da 2walm wal2ta wal2to walt4st wa3na wandels6 wang4s wa2p 1war2e ware1i war3ste wart4e 1was wa3sa wa4scha wa3se wa3sh wass4e w2ä 1wäh 1wäl 2wäng 1wäs wäs2c wä3sche 2w1b2 wbu2 2w1c 2w1d we2a we2ba 4webeb we2bl web3s we3cke. we5cken. we3ckes we2e4 weed3 we2fl 1weg we2g1a we2g3l we2g3r weg3s4 1weh we2i wei4bl 2weie weik4 weis4s3p wei3str wei4tr wel6schl wel6schr wel2t1 wel4t3a4 wel6t5en6d wel4tr wen3a4 we3ni wen4k3ri we2r3a wer2bl 1werbu werd2 5werdens 1werdu werer2 wer2fl wer4gel we4r3io 1werk. wer2ka 1werke wer2kl wer2ku we2rö wer2s wer2ta wer6t5erm wer2to 1werts 1wese we2s1p we4st west1a west3ei wes2th west1o2 west3r wes4tu 1wet wet2s wett3s 2w1ey 2w1g 2w3h wi3cka 1wid wi2e wie3l wien2e wie2st wik2 1wil wim2ma wim4m3u win4d3e4c win2dr win2e 2wing win8n7ersc 1wi4r wi3s2e wi2sp 1wiss wi3th 1witzl 2w1k 2w1l 2w1m 2wn wn3s 1wo1c wo2cha woche4 1woh woh2le 1wolf wolf4s3 wol4ler wor3a wo2r3i wor2t3r wo4r3u wot2 1wöc wört2h 2w1p w2r w3ro 2w1s w3s2k ws2t 2w1t wti2 w2u 1wuc wul2 wul3se wun2s 4wur. wur2fa wur2s 1wurst wus2 wus3te 1wu4t1 1wüh wül2 wün3 2w1w x1a 1xa. 2xa2b 1x2ad 1xae xa1fl 1x2ag x3a2m x2anz 1x2as 2x1b 2xc x1ce x1ch x1cl 4x1d 1xe x1e4g 2xek xe2l xe3lei x1em 3x2em. x2en xen3s2 x2er. x2ere xers2 3xes 2x3eu 2x1f 2x1g 2x1h xib4 xi1c xich2 xide2 xi2d1em x1i2do xie3l xi3g xil1 xil2a xi2lo xi2lu xin3s2 x2is1 xis2c xi2se xi2so2 xis3s xis4tä xi2su x1i2tu x1j 2x1k2 2x2l2 x3lä x3le 2x1m 2x1n x1or 4x1p xpor6ter x1q 2x1r 2x3s2 4x1t x2t1a xt2as xt1ä x2tän xtblo4 x2t1e2d x2t1ei x4tent x2t1er2f x2t3ev xtfi4 x2t1il2l xtra3b4 x2t3ran xt3s2 xt1u x3tur 1xu xu1a x1u2n xu2s 2xv 2x1w 2xy 3xy. 3xys x1z 2y1ab 1yac y1al. y1a2m yan2g y1ank y1ät y1b y1c2 y2chi y3chis ych3n y1d4 y1e y2ef yen4n y2ere y2es. yes2p ye2th y1f2 y1g ygi2 ygie5 yg2l y1h yhr2 y1i4 y1j y1k2 yke3n yk3s2 y1l y2l3a2m yl4ante yl3c y4le. yli4n yloni1 yl3s2 y2l1u yma4t ym3p4 ympi1 y2n1o yno4d ynt2 y1nu y1of yom2 yon4i y1ont y1os y1ou y1p ypa2 yp3an ype2 y2pf y3ph y2p1in ypo3 y4p3s y1r y3r2e y3ri yri2a yri1e y3r4o yrr2 ys2an y3s2c yse1 y3s2h y4s3l ysme3 ys2po ys1pr ys3t4 y1s4ty y2s1u2 y3s2z y1t2 y2te. y2tes y3to1 yu2r yure3 y1v y1w y1y y1z2 2z3a2b zab3l za1c z1a2d za3de 2z1af za3gr 3zah 2z3a2k zale3 2z1all 2z1am z1an za2na 2z3anf 3zani 2z3anl 2zarb 2zarc z1arm z1arti zar2tr 2z1arz z1as za1st4 2z3at3 3zaub z1au2f z3aug 3zaun zä2 2z1äc 3z2äh 2z1äm z1ärg z1ärm 4z3b4 zbü1b zbübe3 2z3c 2z3d2 zdan2 zdä1 2z1e2ben 2zecho 2z1eck ze1e 2z1eff zeik4 zei3la zeile4 2z1ein zei3s4 zeist4 zei2t1a zeit5end zei4t3er zei2tr ze2l1a2 ze2len ze2l1er ze2l1in zell2a zel3sz zel3t2h zelu2 2z1emp 5zen. ze4n3ac zen3n ze2no zens2e zen4sem 3zent zent3s zen4zer z2er. ze2r3a ze2re2b 2z1ergä 4z3ergeb z3erhal 2zerhö zerin4t zerk2 z2erl. 2zerlö z2ern zer4neb zer4n3ei ze2ro 2z1erq zers2 2z1ersa 4z3erste zert1a4 zer4t3ag zert4an zer6tere zer4tin zer6trau 4zerwei 2z1erz 3z2erza ze2sä ze3sc zes1e zes1i ze3sku ze2sp zessen4 zes6s5end zes2sp zes2st ze2s3t ze3sta ze2tr 2zetts 2z1ex 2z1f4 2z1g2 zger2a 2z1h z2hen zhir3 zi3alo zi3ar zid3r zi1erh ziers1 zi1es. zil2e 2z1imp zin2e zin4er 2z1inf 2z1inh zin1it zin2sa zin4ser 4zinsuf 2z1inv zi2o3 zi3op zirk2 zirk6s zi3s2z zi1t2h 2z1j 2z3k4 2z1l2 2z1m2 zme2e 2z3n4 2z1ob 2z1of zo2gl 2z1oh 3zol zon4ter zo2o 2zope z1or zo2ri zor4ne 2z1osz 2z3ot 2zö2f z1öl 2zön 2z3p4 2z1q 2z3r2 4z1s2 z3sa z3sh z3sk z3sz 2z1t z2t1au z4tehe z3t2her zt3ho zt1ins z3tö zt3rec zt3s2 z3tü zu1 zu3a zub4 zu4ch zu3cke zud4 zudi4 zu2el zu3f4 zu2g1ar zu4gent zu3gl zug1un 2z1uhr zu3k 2z1um. zumen2 2zumf 2zumg 2zuml 2z1ums zun2e zung4 2zunt zup2fi zu3r2a z1urk 2z1url 2z1urs 2z1urt zu3s4 zu5t2 zuz2 2züb zür1c 2z1v zw2 z1wac 4zwah zwan2d1 z2wang z1war 2zwas 4zwäl 2zweg z2weig z1weis 2z1wel 2z1wen 2z1wer z2werg 2z1wes 2zwet 4zwir z2wit 2z1wo z1wör z1wur 2z1wü 4z1z z3z4a zzi1s4 z3z2o zz2ö %} % %\endinput % %%% Local Variables: %%% mode: tex %%% coding: utf-8 %%% End: libfizmo-0.7.15/src/locales/fr_FR/0000755000175000017500000000000013153330674017001 5ustar chrenderchrenderlibfizmo-0.7.15/src/locales/fr_FR/libfizmo_i18n.txt0000644000175000017500000000642013153330674022216 0ustar chrenderchrenderCould not open trace file "\{0s}". Invalid parameter type "\{0s}". Function call "\{0s}" aborted due to error. Invalid backslash-sequence in localization data. Warning for "\{0s}" at address \{1x}: Call of function "\{0s}" returned error code \{1d}. An error occured while reading from file "\{0s}". Impossible d'ouvrir le fichier nommé "\{0s}". Error reading first story byte from "\{0s}". Unknown story version \{0d}. An error occured trying to close file "\{0s}". Function call malloc(\{0d}) returned NULL, probably out of memory. Function call realloc(\{0d}) returned NULL, probably out of memory. Erreur fatale lors de la lecture du fichier de jeu. Not yet implemented. Instruction form not initialized. Unknown operand type \{0d}. Opcode \{0d} of instruction form \{1d} not implemented. Cannot pull from empty stack. Cannot drop \{0d} words from stack: Not enough words stored. Please enter name for command file. Le nom de fichier ne doit pas être vide. Please enter a filename for the transcript file. Invalid output stream number \{0d}. Maximum stream 3 depth \{0d} exceeded. This function has been disabled. More than 15 locals are not allowed. Invalid throw destination stack index \{0d}. Maximum number of stack entries per routine (\{0d}) exceeded. Trying to strore variable L\{0d}, but only \{1d} variables are active. Not enough stack words from local routine on stack. Null pointer received. Property number 0 is not valid. Property number \{0d} is not allowed in story version \{1d}. Object number 0 is not valid. Object number \{0d} not allowed in story version \{1d}. No property \{0d} for object \{1d}. Cannot read properties with a length greater than 2. Attribute number \{0d} not allowed in story version \{1d}. Invalid node type \{0d}. Unknown char code \{0d}. Maximum abbreviation depth is \{0d}. Unknown error case. Invalid ZSCII input-code \{0d}. Invalid ZSCII output-code \{0d}. Valid commands are: Random generator is now in predictable mode. Random generator is now in random mode. libfizmo version \{0s}. Story release number \{0d}. Story serial number \{0s}. Current Z-Stack size: \{0d} entries. Z-Stack entries in use: \{0d}. Routine stack underflow check disabled. \{0d} Bytes used for undo. \{0d} bytes allocated by text history. \{0d} bytes allocated by block buffer. Preloaded input not availiable in interface "\{0s}". Timed input not implemented in interface "\{0s}". Veuillez entrer le nom du fichier de sauvegarde. Erreur lors de l'écriture du fichier de sauvegarde. Can't find chunk "IFhd". Erreur lors de la lecture du fichier de sauvegarde. Could not read release number. Could not read serial number. Could not read checksum. Release number, serial number or checksum doesn't match. Could not read Restore-PC. Can't read chunk length. Le fichier de jeu original "\{0s}" n'a pu être trouvé. Can't find "CMem" or "UMem" chunk. Can't find chunk "Stks". Invalid IFF access mode \{0d}. Caught signal \{0d}, aborting interpreter. Cannot divide by zero. Opcode JE with only 1 operand is illegal. Function call time() returned -1. Unknown configuration option \{0s}. Invalid value "\{0s}" for parameters "\{1s}". Story has Z-Version number \{0d}. History-Output object is no longer valid. fizmo version \{0s}. Supplied blorb file provides no "ZCOD" chunk. Supplied file is not a valid Z-Machine file. libfizmo-0.7.15/src/locales/fr_FR/patterns.txt0000644000175000017500000004632413153330674021413 0ustar chrenderchrender% % This file has been renamed from hyph-fr.tex to patterns.tex in Febuary 2017 % for usage in the fizmo z-machine interpreter. Empty lines were removed % and lines containing comments divided into separate data and comments % lines for technical reasons. No other changes made. % % copyright: Daniel Flipo and Bernard Gaulle 1994-2002, Arthur Reutenauer 2016 % title: French hyphenation patterns % version: V2.13 2016/05/12 % language: % name: French % tag: fr % notice: > % This file is part of the hyph-utf8 package. % See http://www.hyphenation.org for more information. % licence: % name: MIT % url: https://opensource.org/licenses/MIT % text: > % Permission is hereby granted, free of charge, to any person obtaining % a copy of this software and associated documentation files (the % "Software"), to deal in the Software without restriction, including % without limitation the rights to use, copy, modify, merge, publish, % distribute, sublicense, and/or sell copies of the Software, and to % permit persons to whom the Software is furnished to do so, subject to % the following conditions: % % The above copyright notice and this permission notice shall be % included in all copies or substantial portions of the Software. % % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS % BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN % ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN % CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE % SOFTWARE. % ========================================== %%%%%%%% The most famous good guys who worked hard to obtain something usable. % Jacques Desarmenien, Universite de Strasbourg : % - << how to run TeX in a French environment: hyphenation, fonts, % typography. >> in Tugboat, 5 (1984) 91-102. and TeX85 conference % - << La division par ordinateur des mots francais : % application a TeX >> in TSI vol. 5 No 4, 1986 (C) AFCET- % Gauthier-Villars % Norman Buckle, UQAH (nb; many additions) % Michael Ferguson, INRS-Telecommunications (mjf) June 1988 % Justin Bur, Universite de Montreal (jbb; checked against original list) % all patterns including apostrophe missing from nb list % after that, GUTenberg and specially Daniel Flipo and Bernard Gaulle % did their best effort to improve the list of patterns. % % %\patterns{ %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%* 2'2 %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%a .a4 'a4 .â4 'â4 % df-bg 1998/02/07 for abhorrer ab2h .ab3réa 'ab3réa % df-bg 1998/02/07 for adhèsion & co ad2h a1è2dre .ae3s4ch 'ae3s4ch 1alcool '2alcool a2l1algi .amino1a2c 'amino1a2c .ana3s4tr 'ana3s4tr 1a2nesthési '2a2nesthési .anti1a2 'anti1a2 .anti1e2 'anti1e2 .anti1é2 .anti2enne 'anti2enne 'anti1é2 .anti1s2 'anti1s2 .apo2s3ta 'apo2s3ta apo2s3tr archi1é2pis .as2ta 'as2ta a2s3tro %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%b 1ba 1bâ % hyphen disappeared from french 5/2/94 .bai2se3main 1be 1bé 1bè 1bê 4be. 4bes. % mute syllable: tombent (df) 22/02/94 2bent. 1bi 1bî .bi1a2c % like .tri1a2t for tri-athlon bg 12/27/93 .bi1a2t .bi1au .bio1a2 .bi2s1a2 .bi1u2 1b2l 4ble. 4bles. % mute syllable: troublent (df) 28/02/94 2blent. 1bo 1bô 1b2r 4bre. 4bres. % mute syllable: palabrent (df) 28/02/94 2brent. 1bu 1bû 1by %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%c 1ç 1ca 1câ % for caoutchou... added 3/1/94 df-bg ca3ou3t2 1ce 1cé 1cè 1cê 4ce. 4ces. % words ending with -cent (df) 22/02/94 2cent. ja3cent. ac3cent. é3cent. munifi3cent. réti3cent. privatdo3cent. inno3cent. es3cent. acquies4cent. is3cent. immis4cent. % .ch4 1c2h 4ch. 2chb 4che. 4ches. % mute syllable: touchent (df) 22/02/94 2chent. % hyphen disappeared from french 5/2/94 .chè2vre3feuille 2chg ch2l 4chle. 4chles. chlo2r3a2c chlo2r3é2t 2chm 2chn 2chp ch2r 4chre. 4chres. 2chs 2cht 2chw 1ci 1cî .ci2s1alp 1c2k 4ck. 2ckb 4cke. 4ckes. % mute syllable: stockent (df) 22/02/94 2ckent. 2ckf 2ckg 2ck3h 2ckp 2cks 2ckt 1c2l 4cle. 4cles. % mute syllable: encerclent (df) 28/02/94 2clent. 1co 1cô co1acc co1acq co1a2d co1ap co1ar co1assoc co1assur co1au co1ax 1cœ co1é2 co1ef co1en co1ex % missing from nb list .con4 % missing from nb list .cons4 .contre1s2c % hyphen disappeared from french 5/2/94 .contre3maître co2nurb .co1o2 .co2o3lie 1c2r 4cre. 4cres. % mute syllable: massacrent (df) 28/02/94 2crent. 1cu 1cû 1cy % -- as .con4 .cons4 (march 92) .cul4 %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%d 1d' 1da 1dâ .dacryo1a2 d1d2h 1de 1dé 1dè 1dê 4de. 4des. % words ending with -dent (df) 22/02/94 2dent. déca3dent. é3dent. cci3dent. inci3dent. confi3dent. tri3dent. dissi3dent. chien3dent. .ar3dent. impu3dent. pru3dent. % .dé1a2 .dé1io .dé1o2 % originaly in JD file .dé2s %.dé2s1a2 removed 09/17/92 because wrong for the % original JD 500 words test .dé3s2a3cr % .dés2a2mi introduced 09/17/92 bec. i .dés2a3m % can't see why désamidonner ran in JD. % Moved to .dés2a3m df 12/27/93. .dé3s2a3tell .dé3s2astr % 1 moved 3 due to .dé2s 09/17/92 .dé3s2c %.dé2s1e2 removed 09/17/92 because wrong for the % original JD 500 words test .dé2s1é2 .dé3s2é3gr .dé3s2ensib .dé3s2ert .dé3s2exu %.dé2s3h removed 09/17/92 because wrong for the % original JD 500 words test .dé2s1i2 .dé3s2i3d .dé3s2i3gn .dé3s2i3li .dé3s2i3nen .dé3s2invo .dé3s2i3r .dé3s2ist %.dé2s1o2 removed 09/17/92 because wrong for the % original JD 500 words test .dé3s2o3dé .dé2s1œ .dé3s2o3l .dé3s2o3pil .dé3s2orm .dé3s2orp .dé3s2oufr % 1 moved 3 due to .dé2s 09/17/92 .dé3s2p % 1 moved 3 due to .dé2s 09/17/92 .dé3s2t .dé2s1u2n 3d2hal 3d2houd 1di 1dî di2s3cop .di1a2cé .di1a2cid .di1ald .di1a2mi .di1a2tom .di1e2n .di2s3h % mute syllable: jodlent (df) 28/02/94 2dlent. 1do 1dô 1d2r 4dre. 4dres. % mute syllable: engendrent (df) 28/02/94 2drent. d1s2 1du 1dû 1dy .dy2s3 .dy2s1a2 .dy2s1i2 % missing from nb list .dy2s1o2 .dy2s1u2 %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%e .e4 'e4 .ê4 'ê4 .é4 'é4 .è4 'è4 % df-bg 1998/02/07 for rédhibitoire éd2hi 1é2drie 1é2drique 1é2lectr 1é2lément .en1a2 'en1a2 1é2nerg e2n1i2vr .en1o2 'en1o2 épi2s3cop épi3s4cope e2s3cop .eu2r1a2 'eu2r1a2 eu1s2tat extra1 extra2c extra2i %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%f 1fa 1fâ 1fe 1fé 1fè 1fê 4fe. 4fes. % mute syllable: agrafent chauffent (df) 22/02/94 2fent. % 1fi 1fî 1f2l 4fle. 4fles. % mute syllable: gonflent (df) 28/02/94 2flent. 1fo 1fô 1f2r 4fre. 4fres. % mute syllable: balafrent (df) 28/02/94 2frent. f1s2 1fu 1fû 1fy %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%g 1ga 1gâ 1ge 1gé 1gè 1gê 4ge. 4ges. % words ending with -gent (df) 22/02/94 2gent. ré3gent. entre3gent. indi3gent. dili3gent. intelli3gent. indul3gent. tan3gent. rin3gent. contin3gent. .ar3gent. 'ar3gent. ser3gent. ter3gent. résur3gent. % 1g2ha 1g2he 1g2hi 1g2ho 1g2hy 1gi 1gî 1g2l 4gle. 4gles. % mute syllable: meuglent (df) 28/02/94 2glent. 1g2n % (df) 16/01/02 'a2g3nat % (df) 16/01/02 .a2g3nat % (df) 16/01/02 (pattern dia2g3n deleted) a2g3nos % (df) 16/01/02 co2g3niti % (df) 16/01/02 'i2g3né % (df) 16/01/02 .i2g3né % (df) 16/01/02 'i2g3ni % (df) 16/01/02 .i2g3ni % (df) 16/01/02 .ma2g3nicide % (df) 16/01/02 .ma2g3nificat % (df) 16/01/02 .ma2g3num % (df) 16/01/02 o2g3nomoni % (df) 16/01/02 o2g3nosi % (df) 16/01/02 .pro2g3nath % (df) 16/01/02 pu2g3nable % (df) 16/01/02 pu2g3nac .sta2g3n % (df) 16/01/02 .syn2g3nath wa2g3n 4gne. 4gnes. % mute syllable: accompagnent (df) 28/02/94 2gnent. 1go 1gô 1g2r 4gre. 4gres. % mute syllable: immigrent (df) 28/02/94 2grent. 1gu 1gû g1s2 4gue. 4gues. % words ending with -guent (df) 22/02/94 2guent. .on3guent. 'on3guent. % 1gy %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%h 1ha 1hâ 1he 1hé 1hè 1hê hémi1é hémo1p2t 4he. 4hes. 1hi 1hî 1ho 1hô 1hu 1hû 1hy hypera2 hypere2 hyperé2 hyperi2 hypero2 hypers2 hype4r1 hyperu2 hypo1a2 % missing from nb list hypo1e2 hypo1é2 hypo1i2 hypo1o2 hypo1s2 hypo1u2 %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%i .i4 'i4 .î4 'î4 i1algi i1arthr i1è2dre % ill patterns missing from nb list il2l cil3l rcil4l ucil4l vacil4l gil3l hil3l lil3l l3lion mil3l mil4let émil4l semil4l rmil4l armil5l capil3l papil3la papil3le papil3li papil3lom pupil3l piril3l thril3l cyril3l ibril3l pusil3l .stil3l distil3l instil3l fritil3l boutil3l vanil3lin vanil3lis vil3l avil4l chevil4l uevil4l uvil4l xil3l % end of ill patterns % missing from nb list 1informat '2informat .in1a2 'in1a2 .in2a3nit 'in2a3nit .in2augur 'in2augur .in1e2 'in1e2 .in1é2 'in1é2 % missing from nb list .in2effab 'in2effab .in2é3lucta 'in2é3lucta .in2é3narra 'in2é3narra .in2ept 'in2ept .in2er 'in2er % missing from nb list .in2exora 'in2exora .in1i2 'in1i2 .in2i3miti 'in2i3miti .in2i3q 'in2i3q .in2i3t 'in2i3t .in1o2 'in1o2 .in2o3cul 'in2o3cul .in2ond 'in2ond .in1s2tab 'in1s2tab 'inte4r3 .intera2 'intera2 .intere2 'intere2 .interé2 'interé2 .interi2 'interi2 .intero2 'intero2 .inte4r3 .interu2 'interu2 .inters2 'inters2 .in1u2 'in1u2 .in2uit 'in2uit .in2u3l 'in2u3l io1a2ct i1oxy i1s2tat %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%j 1j 2jk 4je. 4jes. % mute syllable: galèjent (df) 22/02/94 2jent. %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%k 1ka 1kâ 1ke 1ké 1kè 1kê 4ke. 4kes. % mute syllable: jerkent (df) 22/02/94 2kent. 1k2h 4kh. .kh4 1ki 1kî 1ko 1kô 1k2r 1ku 1kû 1ky %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%l 1la 1lâ 1là la2w3re 1le 1lé 1lè 1lê 4le. 4les. % words ending with -lent (df) 22/02/94 2lent. .ta3lent. iva3lent. équiva4lent. monova3lent. polyva3lent. re3lent. .do3lent. indo3lent. inso3lent. turbu3lent. succu3lent. fécu3lent. trucu3lent. opu3lent. corpu3lent. ru3lent. sporu4lent. % 1li 1lî 1lo 1lô l1s2t 1lu 1lû 1ly %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%m 1ma 1mâ .ma2c3k .macro1s2c .ma2l1a2dres .ma2l1a2dro .ma2l1aisé .ma2l1ap .ma2l1a2v .ma2l1en .ma2l1int .ma2l1oc .ma2l1o2d % nb (jbb: ?) .ma2r1x 1me 1mé 1mè 1mê .mé2g1oh % missing from nb list .mé2sa % missing from nb list .mé3san .mé2s1es .mé2s1i .mé2s1u2s .méta1s2ta 4me. 4mes. % words ending with -ment (df) 22/02/94 â2ment. da2ment. fa2ment. amalga2ment. cla2ment. ra2ment. tempéra3ment. ta2ment. testa3ment. qua2ment. è2ment. carê2ment. diaphrag2ment. ryth2ment. ai2ment. rai3ment. abî2ment. éci2ment. vidi2ment. subli2ment. éli2ment. reli2ment. mi2ment. ani2ment. veni2ment. ri2ment. détri3ment. nutri3ment. inti2ment. esti2ment. l2ment. flam2ment. gram2ment. .gem2ment. om2ment. .com3ment. ô2ment. slalo2ment. chro2ment. to2ment. ar2ment. .sar3ment. er2ment. antifer3ment. .ser3ment. fir2ment. or2ment. as2ment. au2ment. écu2ment. fu2ment. hu2ment. fichu3ment. llu2ment. plu2ment. bou2ment. bru2ment. su2ment. tu2ment. % 1mi 1mî .milli1am 1m2némo 1m2nès 1m2nési 1mo 1mô 1mœ .mono1a2 .mono1e2 .mono1é2 .mono1i2 .mono1ï2dé .mono1o2 .mono1u2 .mono1s2 % missing from nb list mon2t3réal m1s2 1mu 1mû 1my moye2n1â2g %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%n 1na 1nâ 1ne 1né 1nè 1nê 4ne. 4nes. % words ending with -nent (df) 22/02/94 % fric-tionnent - syllable muette - bg 27/12/93 2nent. réma3nent. imma3nent. perma3nent. .émi3nent. préémi3nent. proémi3nent. surémi3nent. immi3nent. conti3nent. perti3nent. absti3nent. % 1ni 1nî 1no 1nô 1nœ .no2n1obs 1nu 1nû n3s2at. n3s2ats. n1x 1ny %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%o .o4 'o4 'ô4 .ô4 %'\"o2 % mjf % deleted 3/1/94 df-bg o2b3long % missing from nb list 1octet '2octet o1d2l o1è2dre o1ioni ombud2s3 omni1s2 o1s2tas o1s2tat o1s2téro o1s2tim o1s2tom o1s2trad o1s2tratu o1s2triction .oua1ou 'oua1ou .ovi1s2c 'ovi1s2c oxy1a2 %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%p 1pa 1pâ paléo1é2 .pa2n1a2f .pa2n1a2mé .pa2n1a2ra .pa2n1is .pa2n1o2ph .pa2n1opt .pa2r1a2che .pa2r1a2chè .para1s2 .pa2r3hé 1pe 1pé 1pè 1pê 4pe. 4pes. % words ending with -pent (df) 22/02/94 2pent. re3pent. .ar3pent. 'ar3pent. ser3pent. % % pent- or penta- but never pen-ta bg 12/27/93 .pen2ta per3h % pé2n1ul moved back 09/17/92 to JD def. pé2nul .pe4r .per1a2 .per1e2 .per1é2 .per1i2 .per1o2 .per1u2 % 2r1 moved 09/17/92 to 1r2(it was a typo) pé1r2é2q .péri1os .péri1s2 .péri2s3s .péri2s3ta .péri1u2 1p2h .ph4 4ph. .phalan3s2t 4phe. 4phes. % mute syllable: triomphent (df) 22/02/94 2phent. ph2l 4phle. 4phles. 2phn photo1s2 ph2r 4phre. 4phres. 2phs 2pht 3ph2talé 3ph2tis %%%% Here is an example of a pb involving phonetic and etymologic patterns 5/94 %%%% .phyto3ph2 % originaly, but wrong for phy-toph-thora 9/92 %%%% .phy2topha % for -pharmacie but wrong for phyto-biol.. 5/94 1pi 1pî 1p2l 4ple. 4ples. % mute syllable: accouplent (df) 28/02/94 2plent. .pluri1a 1p2né 1p2neu 1po 1pô po1astre poly1a2 poly1e2 poly1é2 poly1è2 poly1i2 poly1o2 poly1s2 poly1u2 % JD hypenated it asis 09/17/92, exception .pon2tet .pos2t3h .pos2t1in .pos2t1o2 .pos2t3r .post1s2 1p2r 4pre. 4pres. % mute syllable: empourprent (df) 28/02/94 2prent. .pré1a2 % missing from nb list .pré2a3la .pré2au .pré1é2 .pré1e2 .pré1i2 .pré1o2 .pré1u2 .pré1s2 .pro1é2 .pro1s2cé pro2s3tat .prou3d2h 1p2sych .psycho1a2n 1p2tèr 1p2tér 1pu .pud1d2l 1pû 1py %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%q 1q 4que. 4ques. % words ending with -quent (df) 22/02/94 2quent. é3quent. élo3quent. grandilo3quent. %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%r 1ra 1râ % missing from nb list radio1a2 1re 1ré 1rè 1rê .ré1a2 .ré2a3le .ré2a3lis .ré2a3lit .ré2aux .ré1é2 .ré1e2 .ré2el .ré2er .ré2èr .ré1i2 .ré2i3fi .ré1o2 .re1s2 .re2s3cap % for res-cision 09/17/92 (missing from nb) .re2s3cisi % for res-cisoire 09/17/92(missing from nb) .re2s3ciso .re2s3cou .re2s3cri .re2s3pect .re2s3pir .re2s3plend .re2s3pons .re2s3quil .re2s3s .re2s3t .re3s4tab .re3s4tag .re3s4tand .re3s4tat .re3s4tén .re3s4tér .re3s4tim .re3s4tip .re3s4toc .re3s4top .re3s4tr .re4s5trein .re4s5trict .re4s5trin .re3s4tu .re3s4ty %.ré1u2 % pattern rejected 12/2/92 .réu2 % (don't hyphenate as ré-union nor réu-nion) .ré2uss .rétro1a2 4re. 4res. % words ending with -rent (df) 22/02/94 % es-pèrent - syllable muette - bg 27/12/93 2rent. .pa3rent. appa3rent. transpa3rent. é3rent. tor3rent. cur3rent. % 1r2h 4rhe. 4rhes. 2r3heur 2r3hydr 1ri 1rî 1ro 1rô 1ru 1rû 1ry %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%s 1sa 1sâ .sch4 1s2caph 1s2clér 1s2cop 1s2ch e2s3ch i2s3ché i2s3chia i2s3chio 4sch. 4sche. 4sches. 2schs 1se 1sé 1sè 1sê sesqui1a2 4se. 4ses. % words ending with -sent (df) 22/02/94 % massent - syllable muette - bg 27/12/93 2sent. ab3sent. pré3sent. .res3sent. % % jbb .seu2le .sh4 1s2h 4sh. 4she. 4shes. % mute syllable: smashent (df) 22/02/94 2shent. 2shm 2s3hom 2shr 2shs 1si 1sî 1s2lav 1s2lov 1so 1sô 1sœ 1s2patia 1s2perm 1s2por 1s2phèr 1s2phér 1s2piel 1s2piros 1s2tandard 1s2tein stéréo1s2 1s2tigm 1s2tock 1s2tomos 1s2troph 1s2tructu 1s2tyle 1su 1sû .su2b1a2 .su3b2alt .su2b1é2 .su3b2é3r .su2b1in .su2b3limin .su2b3lin .su2b3lu sub1s2 .su2b1ur supero2 supe4r1 supers2 .su2r1a2 su3r2ah .su3r2a3t .su2r1e2 .su3r2eau .su3r2ell .su3r2et .su2r1é2 .su2r3h .su2r1i2m .su2r1inf .su2r1int .su2r1of .su2r1ox 1sy %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%t 1ta 1tâ 1tà tachy1a2 tchin3t2 1te 1té 1tè 1tê télé1e2 télé1i2 télé1o2b télé1o2p télé1s2 4te. 4tes. % words ending with -tent (df) 22/02/94 % mentent - syllable muette - bg 27/12/93 2tent. .la3tent. .pa3tent. compé3tent. éni3tent. mécon3tent. omnipo3tent. ventripo3tent. équipo3tent. impo3tent. mit3tent. % .th4 1t2h 4th. 4the. 4thes. thermo1s2 2t3heur % th2l was wrong for ...ath-lon (jd said 2thl) df 12/27/93 2thl 2thm 2thn th2r 4thre. 4thres. 2ths 1ti 1tî 1to 1tô 1t2r tran2s1a2 tran3s2act tran3s2ats tran2s3h tran2s1o2 tran2s3p tran2s1u2 4tre. 4tres. % mute syllable: infiltrent (df) 28/02/94 2trent. .tri1a2c .tri1a2n .tri1a2t .tri1o2n t1t2l 1tu 1tû tung2s3 1ty %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%u .u4 'u4 .û4 'û4 uni1o2v uni1a2x u2s3tr %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%v 1va 1vâ 1ve 1vé 1vè 1vê vélo1s2ki 4ve. 4ves. % words ending with -vent (df) 22/02/94 2vent. conni3vent. .sou3vent. % 1vi 1vî 1vo 1vô vol2t1amp 1v2r 4vre. 4vres. % mute syllable: recouvrent (df) 28/02/94 2vrent. 1vu 1vû 1vy %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%w 1wa 1we 4we. 4wes. % mute syllable: interviewent (df) 22/02/94 2went. 1wi 1wo 1wu 1w2r %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%x % mute syllable: malaxent (df) 22/02/94 2xent. %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%y .y4 'y4 y1asth y1s2tom y1algi %-------------------%-----------------------% % phonetic patterns % etymological patterns % %-------------------%-----------------------% %%z 1za 1ze 1zé 1zè 4ze. 4zes. % words ending with -zent (df) 22/02/94 2zent. privatdo3zent. % 1zi 1zo 1zu 1zy %} libfizmo-0.7.15/src/locales/libfizmo_locales.h0000644000175000017500000001520713153330674021476 0ustar chrenderchrender /* libfizmo_locales.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef libfizmo_locales_h_INCLUDED #define libfizmo_locales_h_INCLUDED #define i18n_libfizmo_COULD_NOT_OPEN_TRACE_FILE_P0S 0 #define i18n_libfizmo_INVALID_PARAMETER_TYPE_P0S 1 #define i18n_libfizmo_FUNCTION_CALL_P0S_ABORTED_DUE_TO_ERROR 2 #define i18n_libfizmo_INVALID_BACKSLASH_SEQUENCE_IN_LOCALIZATION_DATA 3 #define i18n_libfizmo_WARNING_FOR_P0S_AT_P0X 4 #define i18n_libfizmo_FUNCTION_CALL_P0S_RETURNED_ERROR_CODE_P1D 5 #define i18n_libfizmo_ERROR_WHILE_READING_FILE_P0S 6 #define i18n_libfizmo_COULD_NOT_OPEN_FILE_NAMED_P0S 7 #define i18n_libfizmo_ERROR_READING_FIRST_STORY_BYTE_FROM_P0S 8 #define i18n_libfizmo_UNKNOWN_STORY_VERSION_P0D 9 #define i18n_libfizmo_ERROR_WHILE_CLOSING_FILE_P0S 10 #define i18n_libfizmo_FUNCTION_CALL_MALLOC_P0D_RETURNED_NULL_PROBABLY_OUT_OF_MEMORY 11 #define i18n_libfizmo_FUNCTION_CALL_REALLOC_P0D_RETURNED_NULL_PROBABLY_OUT_OF_MEMORY 12 #define i18n_libfizmo_FATAL_ERROR_READING_STORY_FILE 13 #define i18n_libfizmo_NOT_YET_IMPLEMENTED 14 #define i18n_libfizmo_INSTRUCTION_FORM_NOT_INITIALIZED 15 #define i18n_libfizmo_UNKNOWN_OPERAND_TYPE_P0D 16 #define i18n_libfizmo_OPCODE_P0D_IN_FORM_P1D_NOT_IMPLEMENTED 17 #define i18n_libfizmo_CANNOT_PULL_FROM_EMPTY_STACK 18 #define i18n_libfizmo_CANNOT_DROP_P0D_WORDS_FROM_STACK_NOT_ENOUGH_WORDS_STORED 19 #define i18n_libfizmo_PLEASE_ENTER_NAME_FOR_COMMANDFILE 20 #define i18n_libfizmo_FILENAME_MUST_NOT_BE_EMPTY 21 #define i18n_libfizmo_PLEASE_ENTER_SCRIPT_FILENAME 22 #define i18n_libfizmo_INVALID_OUTPUT_STREAM_NUMBER_P0D 23 #define i18n_libfizmo_MAXIMUM_STREAM_3_DEPTH_P0D_EXCEEDED 24 #define i18n_libfizmo_THIS_FUNCTION_HAS_BEEN_DISABLED 25 #define i18n_libfizmo_MORE_THAN_15_LOCALS_ARE_NOT_ALLOWED 26 #define i18n_libfizmo_INVALID_THROW_DESTINATION_STACK_INDEX_P0D 27 #define i18n_libfizmo_MAXIMUM_NUMBER_OF_STACK_ENTRIES_PER_ROUTINE_P0D_EXCEEDED 28 #define i18n_libfizmo_TRYING_TO_STORE_VARIABLE_L_P0D_BUT_ONLY_P1D_VARIABLES_ACTIVE 29 #define i18n_libfizmo_NOT_ENOUGH_STACK_WORDS_FROM_LOCAL_ROUTINE_ON_STACK 30 #define i18n_libfizmo_NULL_POINTER_RECEIVED 31 #define i18n_libfizmo_PROPERTY_NUMBER_0_IS_NOT_VALID 32 #define i18n_libfizmo_PROPERTY_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D 33 #define i18n_libfizmo_OBJECT_NUMBER_0_IS_NOT_VALID 34 #define i18n_libfizmo_OBJECT_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D 35 #define i18n_libfizmo_NO_PROPERTY_P0D_FOR_OBJECT_P1D 36 #define i18n_libfizmo_CANNOT_READ_PROPERTIES_WITH_A_LENGTH_GREATER_THAN_2 37 #define i18n_libfizmo_ATTRIBUTE_NUMBER_P0D_NOT_ALLOWED_IN_STORY_VERSION_P1D 38 #define i18n_libfizmo_INVALID_NODE_TYPE_P0D 39 #define i18n_libfizmo_UNKNOWN_CHAR_CODE_P0D 40 #define i18n_libfizmo_MAXIMUM_ABBREVIATION_DEPTH_IS_P0D 41 #define i18n_libfizmo_UNKNOWN_ERROR_CASE 42 #define i18n_libfizmo_INVALID_ZSCII_INPUT_CODE_P0D 43 #define i18n_libfizmo_INVALID_ZSCII_OUTPUT_CODE_P0D 44 #define i18n_libfizmo_VALID_COMMANDS_ARE 45 #define i18n_libfizmo_RANDOM_GENERATOR_IS_NOW_IN_PREDICTABLE_MODE 46 #define i18n_libfizmo_RANDOM_GENERATOR_IS_NOW_IN_RANDOM_MODE 47 #define i18n_libfizmo_LIBFIZMO_VERSION_P0S 48 #define i18n_libfizmo_STORY_RELEASE_NUMBER 49 #define i18n_libfizmo_STORY_SERIAL_NUMBER 50 #define i18n_libfizmo_CURRENT_Z_STACK_SIZE_P0D_ENTRIES 51 #define i18n_libfizmo_CURRENT_Z_STACK_ENTRIES_IN_USE_P0D 52 #define i18n_libfizmo_HACK_01__ROUTINE_STACK_UNDERFLOW_CHECK_DISABLED 53 #define i18n_libfizmo_P0D_BYTES_USED_FOR_UNDO 54 #define i18n_libfizmo_P0D_BYTES_USED_BY_TEXT_HISTORY 55 #define i18n_libfizmo_P0D_BYTES_USED_BY_BLOCK_BUFFER 56 #define i18n_libfizmo_PRELOADED_INPUT_NOT_AVAILIABLE_IN_INTERFACE_P0S 57 #define i18n_libfizmo_TIMED_INPUT_NOT_IMPLEMENTED_IN_INTERFACE_P0S 58 #define i18n_libfizmo_PLEASE_ENTER_SAVEGAME_FILENAME 59 #define i18n_libfizmo_ERROR_WRITING_SAVE_FILE 60 #define i18n_libfizmo_CANT_FIND_CHUNK_IFHD 61 #define i18n_libfizmo_ERROR_READING_SAVE_FILE 62 #define i18n_libfizmo_COULD_NOT_READ_RELEASE_NUMBER 63 #define i18n_libfizmo_COULD_NOT_READ_SERIAL_NUMBER 64 #define i18n_libfizmo_COULD_NOT_READ_CHECKSUM 65 #define i18n_libfizmo_RELEASE_NR_SERIAL_NR_OR_CHECKSUM_DOESNT_MATCH 66 #define i18n_libfizmo_COULD_NOT_READ_RESTORE_PC 67 #define i18n_libfizmo_CANT_READ_CHUNK_LENGTH 68 #define i18n_libfizmo_COULD_NOT_FIND_ORIGINAL_STORY_FILE_P0S 69 #define i18n_libfizmo_CANT_FIND_CMEM_OR_UMEM_CHUNK 70 #define i18n_libfizmo_CANT_FIND_CHUNK_STKS 71 #define i18n_libfizmo_INVALID_IFF_ACCESS_MODE_P0D 72 #define i18n_libfizmo_CAUGHT_SIGNAL_P0D_ABORTING_INTERPRETER 73 #define i18n_libfizmo_CANNOT_DIVIDE_BY_ZERO 74 #define i18n_libfizmo_OPCODE_JE_WITH_ONLY_1_OPERAND_IS_ILLEGAL 75 #define i18n_libfizmo_FUNCTION_CALL_TIME_RETURNED_NEG_1 76 #define i18n_libfizmo_UNKNOWN_CONFIGURATION_OPTION_P0S 77 #define i18n_libfizmo_INVALID_VALUE_P0S_FOR_PARAMETER_P1S 78 #define i18n_libfizmo_STORY_HAS_Z_VERSION_NUMBER_P0D 79 #define i18n_libfizmo_HISTORYOUTPUT_NO_LONGER_VALID 80 #define i18n_libfizmo_FIZMO_VERSION_P0S 81 #define i18n_libfizmo_SUPPLIED_BLORB_FILE_PROVIDES_NO_ZCOD_CHUNK 82 #define i18n_libfizmo_SUPPLIED_FILE_IS_NOT_A_VALID_Z_MACHINE_FILE 83 extern z_ucs libfizmo_module_name[]; extern z_ucs default_locale_name[]; #endif /* libfizmo_locales_h_INCLUDED */ libfizmo-0.7.15/src/test/0000755000175000017500000000000013153330674015340 5ustar chrenderchrenderlibfizmo-0.7.15/src/test/gntests.z50000644000175000017500000001600013153330674017304 0ustar chrenderchrender@970311B6.11 B=HBk.EB]ӰBH $).38=BGLQV[`ejoty~.," ?5e``F*#.R`Q`et+QX9 I@9 ) feb  %D :*b e]E|N!M` j*`H(]!Ud Re:JO@ceRiI4-( ^d%t.g;!Sg;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LRJeMNf) fVO #%|LRJeMNӀ1(*c -d\eby q4tL9]k*R`e=HsSBtr`9]k*LҨ"*]H]FE%Xf]RӺl" ĥV%VO%[4^libfizmo-0.7.15/src/test/advent.z50000644000175000017500000042500013153330674017102 0ustar chrenderchrenderbbH 5@$961209Bk@#6.21 `odv@@ @ @ :@ V@ v@@@@@ @ 2K{J@@@8@i@@@ @!@@#@"$7@"%F"&s"'"("@<@^@.}@-@0@/@2@13#11D@u@@@769@8:@8; 8P>q=@@?A@?@D@CE8@@CFW@CtH@GIGUM@L2DX@|T @S/cBaXWZY\[7^c@]`H_o@!@9@@U@uj@il@@kn @@m$C`(Pr 1S}@@  8 X@  @ @ !!%!N@@!r!@!@!!@!@@"""9"W"}""""##$@#>#X#s####$,$N$p$$$%%&%K%v@%%%@%@& &5&I&d&@&&&@&@'@'+'?'Y@@'t'@''@'( @((4(l(((((()')>)S)k@))))**.*F*`**@**+ + +=@+a@+@@+@+@+@+@,,D@@,a@,v,@@,,@--@-2-A0-h---.+.f..//R//00>@0`@00001131C1T@ 1h  1@  1@@ 1@22+@2Q2B=HBk.EB]ӰBJc%)@ie`qB"TNepĥie`qUBV(Vyabepĥie`qUBZW]a(d1ie`qU BO)O;aqXd1ie`qU BahaaNe%ie`qU BVCVaNe+%ie`qU BVVabe%ie`qU BZ] abe+%ie`qUB^k]a!NEӰie`qUB``L,.4ie`qUBMNPSYaɨie`qUB:x*ie`qUBMX`#%n`c!^*+=Hpn!mdljidc!]FED:kR*C5:kR8C5%E\x+7(C56EQC56BSjSS@BM ccQ"P-OJI"H-G+BRAY^WqQD SX"ccaRKxK\ac7ҧ-/k"DQ́]aKYT]\`?]]JZEY^,cd4Y^WN$.-+,cd;Q!``VUPR8W]oJIZ`KTJJR\:1L^cdxPIH+GBRAY^W5ĥcdRKS=S-*a(, 1edcd[WlVa(NE.ͅfdcdRQdJDQBblcdЁ]fTx T\,$ R.JeW qWXcd܁XWW$QM[[&aY cd^dDRT'TTZVKdg.edcd^dERQ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98BB _]'9x'_'_/tbɏbHcɏbb ^ T'_AEcBB _]+9/!Aeĕ^BB _]+98eBB _]+9xfT'_4)_/"-9N B@,+_BB@_]?B+=e%_x%_Q[ wtbut+_*_u'_t&_ b=tBBy_]xB/<2t*_+"E'_ AR8 B,BB_]/8*_ RAP "E;x; "Q;x; GA_]@ ; "E;x;[A_]@ ; BC bVTBB _]@ B/;T/4,T/4: % b S+_ /` H1_+=PB_+=PBJ/`&UaDzU -H#/&v#I ~Ob-4 H V 0QI\GOI\I\aH#Qy_]x<LQu BxCBBy_]x/<BBy_]x B+;x1I\K BxCBBy_]x /;xBBy_]xB+<'8HBCI#HÏHN]H -HQ! d2JF\^*x+:^jBI-5AX&_;&_>&_?- -3 '_ˊIC- n g)B 'E %_%_&_ &aH#' cԈ3LE/[Ō V :UALQ  i }))B#I } 'E LQ# Ï K] J $# Ï K] J Q VaQH/5 Ta #]-4 I\QI\LQ -H /&v IBC!l#4\/=HӀ/=I'_ˊIWJAJOaH# V J>'_ˊ5_+_'_UOyOzBC3l:lt\5@mW/`&T.MX] V WT c B XBB _]'9BB _]'98BB _]'9x/"BCBCûn.@;O T _ Z [ M N@_]?8 m UTOd n  XBXBX _]X/9XA ~BXBX _]X/98XAĕBXBX _]X/98XABXBX _]X/9xXAE BXBX _]X/9xXpAkBCײ df:l4Rp(XBXBX _]X/98XA*BXBX _]X/98XAGXBXBX _]X/98XABXBX _]X/9xXcUXBB _]B/9x3a))BIH BCe d;h) f3SS f*e 'S]Er_ [Jc%]A SYZG.V*tji O*UB /=  'EB -d FX w A^IAbE w T _ Z [ M N@_]?8 UT XBXBX _]X #8X ~UXBB _]B/9 BXBX _]X/9XiBC/ q:j4ASX 濈/; A  }/! UX*'kef  8Rԏ 'k } VAeAeFAf Ė^ ZB H P 'IA S[H-\O-]O[ A E TZ*_ ZBXBX _]X+8X BCU[f*`]Xj9) ` 'S]Er_ [Jc%] [,GW(;-W^>@UA McH!X` 'E Eόcr3 _ _ _ LL UT B CB B _]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sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*sSBtr`9]k*LҨ"*]H]FE%Xf]RӺl" ĥV%VO%[4^libfizmo-0.7.15/src/test/abent.z50000644000175000017500000036700013153330674016717 0ustar chrenderchrenderllQ>X8_J980419B{^ 6.15 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ^0123456789.,?"/-:()FAd (@0@ V@ z@ @ @ @@8@^@|@@Đ  3CJ^@t@@@@@#@ [@!@@#@"$@"%"&""'B"(f"@@@./@-V@0r@/@2@1311@'@@>@7[6r9@8:@8;8>%=B@a@?A@?@D@CE@ @CF@C7HF@GIZGiUM@LD-@UmT@Sc+JXnWZY\[2^\ @]`H_o@5@O@@q@j@il@@kn1@@mNk >d ( Z @!@!;!R!v!!@!"@"4@"i"""@ @"#@#9@#U#v@#@@####$$$B$]$$$$@$%%-%Y%%%%&&@&i&&&''-'[@'~''@'@(('(=(Z(@(((@) @ )#@)@)W)s@@)) @)* @*#*7@*H*`****++)+O+t+++ @+,,,7,d,,,,-@---\---@-@.@@.,@.D@.e@.@..@@.@./ @ @/C/q@//@//0/030L0011@1}11242q22@3@3; 3\ 3{33334@ 4  46@  4e@@ 4@44@451B=HBk.EB]ӰBJc%)@ieHB"TL]19 (pӤieHUB````j`&.!iieHUBcrg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(\1SH5XE]3jl`qSL hP!@d&N`H4 `*'c%!!1M(%re@]FaS$+:h]Ry%H]RyG"&c'tܥ(( m@f`TJeW`N>E*]H]FE%Xf""sSBtr`9]k*LҨ"*]H]FE%Xf]RӺl" ĥV%VO%_f_nH٨y"4eͅ"!FI"dW&ܥ).**y**1S*ĥE̷%F@EFIJ%eR̥RLEVWa MWaIc&cUVWce d@EfO%m;*rAqr̥HѨ-R*MZWV:\LҨKyE˨L Х` Х( Хp ХME_aE_O_c_h Х$ Х:e_SY4&\ Хq4 &\ :{yV:)4ҪEd Qeܥ]F#%_K]F#%_y2JFܥR:neĥqL SqL F%qL ̥qL e%X"W.e%X"E9 d Х.M%_ee( yORWe( %$ʓ(4 a_%_LҨa_%_L( M*TaE_LҨ9:x9*}*a:V&%Pĥ//E/e///VRtxڻ%c&%c4EEj]]d̥]detex̥texe =HzF$aE&E7ҥJd̥aWRW>%E ӅSWde]%f3J$J$J$J4]NE4Rji 败SF4;(4̥;(4ee .bEF॒teEADS--p1.c*̥&*4 .ʥJSjܥ.7pn%^N%dElӅ  dХmD4ӧE%:eaiJE-^*%cܥͅG%UO%TaE_:u%@mDܥ SܥL:e_*i:^e_aViSE7xWNp׬f]E_.%KQe*%USf:yyV*_]RӺl]UD( 9*R>EFE Sjܥ5NWĥ.F:ll4R*L RJeͅ4|*e_bg*p( ԥj_el1l*Ӓ$jnttХƥXlibfizmo-0.7.15/src/sound_interface/0000755000175000017500000000000013153330674017531 5ustar chrenderchrenderlibfizmo-0.7.15/src/sound_interface/sound_interface.h0000644000175000017500000000477213153330674023064 0ustar chrenderchrender /* sound_interface.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef sound_interface_h_INCLUDED #define sound_interface_h_INCLUDED #include "../tools/types.h" // volume: 1-8, 8 being loudest // repeats: 1-254, 255 means forever // routine: set "start_interrupt_routine" to (routine) when sound // finishes (00 for don't call anything). struct z_sound_interface { void (*init_sound)(); void (*close_sound)(); void (*prepare_sound)(int sound_nr, int volume, int repeats); void (*play_sound)(int sound_nr, int volume, int repeats, uint16_t routine); void (*stop_sound)(int sound_nr); void (*finish_sound)(int sound_nr); void (*keyboard_input_has_occurred)(); uint16_t (*get_next_sound_end_routine)(); char* (*get_interface_name)(); char* (*get_interface_version)(); int (*parse_config_parameter)(char *key, char *value); char* (*get_config_value)(char *key); char **(*get_config_option_names)(); }; #endif /* sound_interface_h_INCLUDED */ libfizmo-0.7.15/src/screen_interface/0000755000175000017500000000000013153330674017660 5ustar chrenderchrenderlibfizmo-0.7.15/src/screen_interface/ScreenInterface.cpp0000644000175000017500000001355513153330674023435 0ustar chrenderchrender /* ScreenInterface.cpp * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include "ScreenInterface.h" #include "Interpreter.h" ScreenInterface::~ScreenInterface() { } char *ScreenInterface::get_interface_name() { return NULL; } bool ScreenInterface::is_status_line_available() { return false; } bool ScreenInterface::is_split_screen_available() { return false; } bool ScreenInterface::is_variable_pitch_font_default() { return false; } bool ScreenInterface::is_color_available() { return false; } bool ScreenInterface::is_picture_displaying_available() { return false; } bool ScreenInterface::is_bold_face_available() { return false; } bool ScreenInterface::is_italic_available() { return false; } bool ScreenInterface::is_fixed_space_font_available() { return false; } bool ScreenInterface::is_timed_keyboard_available() { return false; } bool ScreenInterface::is_preloaded_input_available() { return false; } bool ScreenInterface::is_character_graphics_font_availiable() { return false; } bool ScreenInterface::is_picture_font_availiable() { return false; } uint8_t ScreenInterface::get_screen_height() { return 0; } uint8_t ScreenInterface::get_screen_width() { return 0; } uint8_t ScreenInterface::get_screen_width_in_units() { return 0; } uint8_t ScreenInterface::get_screen_height_in_units() { return 0; } uint8_t ScreenInterface::get_font_width_in_units() { return 0; } uint8_t ScreenInterface::get_font_height_in_units() { return 0; } z_colour ScreenInterface::get_default_foreground_colour() { return Z_COLOUR_BLACK; } z_colour ScreenInterface::get_default_background_colour() { return Z_COLOUR_WHITE; } uint8_t ScreenInterface::get_total_width_in_pixels_of_text_sent_to_output_stream_3() { return 0; } int ScreenInterface::parse_config_parameter(char *key, char *value) { return 1; } char *ScreenInterface::get_config_value(char *key) { return NULL; } char **ScreenInterface::get_config_option_names() { return NULL; } void ScreenInterface::link_interface_to_story(struct z_story *story) { } void ScreenInterface::reset_interface() { } int ScreenInterface::close_interface(z_ucs *error_message) { return 0; } void ScreenInterface::set_buffer_mode(uint8_t new_buffer_mode) { } void ScreenInterface::z_ucs_output(z_ucs *z_ucs_output) { while (*z_ucs_output != 0) { if ((*z_ucs_output & 0xffffff80) != 0) fputc('?', stdout); else fputc(*z_ucs_output & 0x7f, stdout); z_ucs_output++; } } int16_t ScreenInterface::read_line(zscii *dest, uint16_t maximum_length, uint16_t tenth_seconds, uint32_t verification_routine, uint8_t preloaded_input, int *tenth_seconds_elapsed, bool disable_command_history, bool return_on_escape) { int input; int current_length = 0; uint8_t input_size = 0; zscii input_zscii; if ((input = fgetc(stdin)) == EOF) { exit(-1); } while ((input != 10) && (input != 13)) { if (current_length < maximum_length) { input_zscii = Interpreter::unicode_char_to_zscii_input_char(input & 0xff); if ((input_zscii == 0xff) || (input_zscii == 27)) input_zscii = '?'; *(dest++) = input_zscii; input_size++; } if ((input = fgetc(stdin)) == EOF) exit(-1); } return input_size; } int ScreenInterface::read_char(uint16_t tenth_seconds, uint32_t verification_routine, int *tenth_seconds_elapsed) { return 0; } void ScreenInterface::show_status(z_ucs *room_description, int status_line_mode, int16_t parameter1, int16_t parameter2) { } void ScreenInterface::set_text_style(z_style text_style) { } void ScreenInterface::set_colour(z_colour foreground, z_colour background, int16_t window) { } void ScreenInterface::set_font(z_font font_type) { } void ScreenInterface::split_window(int16_t nof_lines) { } void ScreenInterface::set_window(int16_t window_number) { } void ScreenInterface::erase_window(int16_t window_number) { } void ScreenInterface::set_cursor(int16_t line, int16_t column, int16_t window) { } uint16_t ScreenInterface::get_cursor_row() { return 0; } uint16_t ScreenInterface::get_cursor_column() { return 0; } void ScreenInterface::erase_line_value(uint16_t start_position) { } void ScreenInterface::erase_line_pixels(uint16_t start_position) { } void ScreenInterface::output_interface_info() { } bool ScreenInterface::input_must_be_repeated_by_story() { return false; } libfizmo-0.7.15/src/screen_interface/screen_interface.h0000644000175000017500000001344413153330674023336 0ustar chrenderchrender /* screen_interface.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef screen_interface_h_INCLUDED #define screen_interface_h_INCLUDED #include #include #include "../tools/types.h" struct z_screen_interface { char* (*get_interface_name)(); bool (*is_status_line_available)(); bool (*is_split_screen_available)(); bool (*is_variable_pitch_font_default)(); bool (*is_colour_available)(); bool (*is_picture_displaying_available)(); bool (*is_bold_face_available)(); bool (*is_italic_available)(); bool (*is_fixed_space_font_available)(); bool (*is_timed_keyboard_input_available)(); bool (*is_preloaded_input_available)(); bool (*is_character_graphics_font_availiable)(); bool (*is_picture_font_availiable)(); uint16_t (*get_screen_height_in_lines)(); uint16_t (*get_screen_width_in_characters)(); uint16_t (*get_screen_width_in_units)(); uint16_t (*get_screen_height_in_units)(); uint8_t (*get_font_width_in_units)(); uint8_t (*get_font_height_in_units)(); z_colour (*get_default_foreground_colour)(); z_colour (*get_default_background_colour)(); uint8_t (*get_total_width_in_pixels_of_text_sent_to_output_stream_3)(); int (*parse_config_parameter)(char *key, char *value); char* (*get_config_value)(char *key); char** (*get_config_option_names)(); // This function is called from the interpreter once the story has been // read into memory and variables like version etc habe been initialized. // This allows the interface to check if the version is supported at all, // allocate the right number of windows, and do other version- and story- // dependent stuff. void (*link_interface_to_story)(struct z_story *story); // "reset_interface" Called in case of a restart. void (*reset_interface)(); // close_interface is called if either the game is quit by the "QUIT" // opcode or in case an error has occured. In case of a regular quit, // the "error_message" is null. int (*close_interface)(/*@null@*/ z_ucs *error_message); void (*set_buffer_mode)(uint8_t new_buffer_mode); void (*z_ucs_output)(z_ucs *z_ucs_output); // For version <= 4 games, only the first to parameters are used. For version // 5+ games, both "tenth_seconds" and "verification_routine" are set in // case input-timeout is active. This "read_line" routine must return the // final number of chars in the input or -1 in case timeout-input was // active and the verification_routine returned true. int16_t (*read_line)(zscii *dest, uint16_t maximum_length, uint16_t tenth_seconds, uint32_t verification_routine, uint8_t preloaded_input, int *tenth_seconds_elapsed, bool disable_command_history, bool return_on_escape); // Returns the input char in the uint8_t range and -1 for timed out input. int (*read_char)(uint16_t tenth_seconds, uint32_t verification_routine, int *tenth_seconds_elapsed); void (*show_status)(z_ucs *room_description, int status_line_mode, int16_t parameter1, int16_t parameter2); void (*set_text_style)(z_style text_style); void (*set_colour)(z_colour foreground, z_colour background, int16_t window); void (*set_font)(z_font font_type); void (*split_window)(int16_t nof_lines); void (*set_window)(int16_t window_number); void (*erase_window)(int16_t window_number); // Must allow moving of cursor in lower window to make print_table work. void (*set_cursor)(int16_t line, int16_t column, int16_t window); uint16_t (*get_cursor_row)(); uint16_t (*get_cursor_column)(); void (*erase_line_value)(uint16_t start_position); void (*erase_line_pixels)(uint16_t start_position); void (*output_interface_info)(); bool (*input_must_be_repeated_by_story)(); void (*game_was_restored_and_history_modified)(); // interface might want // to redraw the screen int (*prompt_for_filename)(char *filename_suggestion, z_file **result_file, char *directory, int filetype_or_mode, int fileaccess); // optional // UI-specific filename dialog. If not implemented, return -3. Return >=0 on // k, -1 on error or -2 in case user cancelled (ESC or similar). // interface custom procedures for autosave (at @read time) and restore int (*do_autosave)(); // optional int (*restore_autosave)(z_file *savefile); // optional }; #endif /* screen_interface_h_INCLUDED */ libfizmo-0.7.15/src/screen_interface/ScreenInterface.h0000644000175000017500000001072213153330674023073 0ustar chrenderchrender /* ScreenInterface.h * * This file is part of fizmo. * * Copyright (c) 2009-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ScreenInterface_h_INCLUDED #define ScreenInterface_h_INCLUDED #include "types.h" class ScreenInterface { public: virtual ~ScreenInterface(); virtual char *get_interface_name(); virtual bool is_status_line_available(); virtual bool is_split_screen_available(); virtual bool is_variable_pitch_font_default(); virtual bool is_color_available(); virtual bool is_picture_displaying_available(); virtual bool is_bold_face_available(); virtual bool is_italic_available(); virtual bool is_fixed_space_font_available(); virtual bool is_timed_keyboard_available(); virtual bool is_preloaded_input_available(); virtual bool is_character_graphics_font_availiable(); virtual bool is_picture_font_availiable(); virtual uint8_t get_screen_height(); virtual uint8_t get_screen_width(); virtual uint8_t get_screen_width_in_units(); virtual uint8_t get_screen_height_in_units(); virtual uint8_t get_font_width_in_units(); virtual uint8_t get_font_height_in_units(); virtual z_colour get_default_foreground_colour(); virtual z_colour get_default_background_colour(); virtual uint8_t get_total_width_in_pixels_of_text_sent_to_output_stream_3(); virtual int parse_config_parameter(char *key, char *value); virtual char *get_config_value(char *key); virtual char **get_config_option_names(); virtual void link_interface_to_story(struct z_story *story); virtual void reset_interface(); virtual int close_interface(z_ucs *error_message); virtual void set_buffer_mode(uint8_t new_buffer_mode); virtual void z_ucs_output(z_ucs *z_ucs_output); virtual int16_t read_line(zscii *dest, uint16_t maximum_length, uint16_t tenth_seconds, uint32_t verification_routine, uint8_t preloaded_input, int *tenth_seconds_elapsed, bool disable_command_history, bool return_on_escape); virtual int read_char(uint16_t tenth_seconds, uint32_t verification_routine, int *tenth_seconds_elapsed); virtual void show_status(z_ucs *room_description, int status_line_mode, int16_t parameter1, int16_t parameter2); virtual void set_text_style(z_style text_style); virtual void set_colour(z_colour foreground, z_colour background, int16_t window); virtual void set_font(z_font font_type); virtual void split_window(int16_t nof_lines); virtual void set_window(int16_t window_number); virtual void erase_window(int16_t window_number); virtual void set_cursor(int16_t line, int16_t column, int16_t window); virtual uint16_t get_cursor_row(); virtual uint16_t get_cursor_column(); virtual void erase_line_value(uint16_t start_position); virtual void erase_line_pixels(uint16_t start_position); virtual void output_interface_info(); virtual bool input_must_be_repeated_by_story(); }; #endif /* ScreenInterface_h_INCLUDED */ libfizmo-0.7.15/src/blorb_interface/0000755000175000017500000000000013153330674017501 5ustar chrenderchrenderlibfizmo-0.7.15/src/blorb_interface/blorb_interface.h0000644000175000017500000000403013153330674022767 0ustar chrenderchrender /* blorb_interface.h * * This file is part of fizmo. * * Copyright (c) 2011-2017 Christoph Ender. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef blorb_interface_h_INCLUDED #define blorb_interface_h_INCLUDED #include "../tools/types.h" struct z_blorb_interface { z_blorb_map* (*init_blorb_map)(z_file *blorb_file); long (*get_blorb_offset)(z_blorb_map *blorb_map, int usage, int resnum); int (*get_frontispiece_resource_number)(z_blorb_map *blorb_map); int (*free_blorb_map)(z_blorb_map *blorb_map); }; #endif /* blorb_interface_h_INCLUDED */ libfizmo-0.7.15/doc/0000755000175000017500000000000013153330674014337 5ustar chrenderchrenderlibfizmo-0.7.15/doc/readme.xml0000644000175000017500000000424313153330674016321 0ustar chrenderchrender

libfizmo aims to provide a Z-Machine interpreter core library in plain C. The goal is to have an interpreter library with as little dependencies as possible to allow for easy portability. In order to use it stand-alone, you have to invoke the “fizmo_start” function in “src/interpreter/fizmo.c” with a screen interface. Check fizmo-console for an example.

Currently the interpreter is in beta status, which means it seems to run all non-version-6 games quite well without any known bugs.

Dependencies:

  • libxml2 for parsing of .ifiction files (optional)

Please send bug reports (or other requests) to fizmo@spellbreaker.org.

libfizmo was written by Christoph Ender in 2005-2017.

For the latest version, see .

Currently fizmo is in beta status, meaning it might do unexpected things such as stop with an error message, crash or cleesh your machine into a frog. There is no warranty of any kind whatsoever and you're entirely on your own when running it.

This package includes software written by other authors:

  • The Mersenne Twister random number generator, available at . This is available via a BSD license, which is stored in the source file “libfizmo/src/interpreter/mt19937ar.c”.
  • British english hyphenation patterns as provided by the hyph-utf8 project at under a permissive license.
  • German hyphenation patterns, provided by the hyph-utf8 project at , distributed under the terms of the LaTeX Project Public License.
  • French hyphenation patterns as provided by the hyph-utf8 project at , distributed under the terms of the MIT License.
libfizmo-0.7.15/doc/create-mds.sh0000755000175000017500000000030013153330674016713 0ustar chrenderchrender#!/bin/bash ./tiny-xml-doc-tools/xml-to-md.sh -u -o .. readme.xml changelog.xml \ license.xml ./tiny-xml-doc-tools/xml-to-md.sh -o .. libfizmo-initialization.xml \ configfile-example.xml libfizmo-0.7.15/doc/create-txts.sh0000755000175000017500000000030213153330674017134 0ustar chrenderchrender#!/bin/bash ./tiny-xml-doc-tools/xml-to-txt.sh -u -o .. readme.xml changelog.xml \ license.xml ./tiny-xml-doc-tools/xml-to-txt.sh -o .. libfizmo-initialization.xml \ configfile-example.xml libfizmo-0.7.15/doc/license.xml0000644000175000017500000000320413153330674016502 0ustar chrenderchrender

Copyright (c) 2009-2017, Christoph Ender
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

libfizmo-0.7.15/doc/configfile-example.xml0000644000175000017500000000212413153330674020616 0ustar chrenderchrender # fizmo example configuration file. # This should go to ($HOME)/.config/fizmo/config # -- libfizmo options #locale = en_US #locale = de_DE #locale = fr_FR background-color = white foreground-color = black #background-color = blue #foreground-color = yellow #savegame-path = $(HOME)/.quetzal-savegames #transcript-filename = $(HOME)/.quetzal-savegames/transcript.txt #start-script-when-story-starts #sync-transcript save-text-history-paragraphs = 100 # All directories in the colon-separated "z-code-path" are searched for story # files: #z-code-path = /foo:/bar # Directories listed in the "z-code-root-path" are searched recursively. #z-code-root-path = /foo:/bar # -- libcellif options # Margins may provide for a better view, especially when used in terminal # windows. left-margin = 1 right-margin = 1 #disable-color #disable-hyphenation # -- fizmo-ncursesw options enable-xterm-title #bold-for-bright-foreground #blink-for-bright-background #dont-update-story-list #disable-x11-graphics #display-x11-inline-image libfizmo-0.7.15/doc/tiny-xml-doc-tools/0000755000175000017500000000000013153330676020023 5ustar chrenderchrenderlibfizmo-0.7.15/doc/tiny-xml-doc-tools/CHANGELOG.md0000644000175000017500000000102513153330676021632 0ustar chrenderchrender **Version 0.1.4 — July 19, 2017** - Added support for hyperlinks in changelogs. --- **Version 0.1.3 — August 25, 2016** - Fix suffix for conversion to text files. --- **Version 0.1.2 — August 23, 2016** - Fixed missing scripts. --- **Version 0.1.1 — August 23, 2016** - Renamed conversion shell scripts. --- **Version 0.1.0 — August 22, 2016** - Migrated fizmo documentation tools from separate modules to “tiny-xml-doc-tools” repository. Fixed missing quotations for < and >. libfizmo-0.7.15/doc/tiny-xml-doc-tools/changelog-ascii.xslt0000644000175000017500000002000513153330676023751 0ustar chrenderchrender Version -- , - January Febuary March April May June July August September October November December ( ) libfizmo-0.7.15/doc/tiny-xml-doc-tools/changelog-html.xslt0000644000175000017500000000670713153330676023642 0ustar chrenderchrender

Version

,
  • January Febuary March April May June July August September October November December \*
    libfizmo-0.7.15/doc/tiny-xml-doc-tools/LICENSE.md0000644000175000017500000000273113153330676021432 0ustar chrenderchrender Copyright (c) 2016-2017, Christoph Ender All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. libfizmo-0.7.15/doc/tiny-xml-doc-tools/ascii.xslt0000644000175000017500000006034513153330676022037 0ustar chrenderchrender