steghide-0.5.1/0000777000076400001440000000000007743177375007102 5steghide-0.5.1/m4/0000777000076400001440000000000007743177372007417 5steghide-0.5.1/m4/lib-link.m40000644000076400001440000005563307735006035011276 # lib-link.m4 serial 3 (gettext-0.11.3) dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, dnl hardcode_direct, hardcode_minus_L, dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec. AC_DEFUN([AC_LIB_RPATH], [ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH([lib$1-prefix], [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib$1-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */lib | */lib/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/lib"; then haveit= if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) steghide-0.5.1/m4/inttypes_h.m40000644000076400001440000000207307735006035011751 # inttypes_h.m4 serial 4 (gettext-0.11.4) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([jm_AC_HEADER_INTTYPES_H], [ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1;], jm_ac_cv_header_inttypes_h=yes, jm_ac_cv_header_inttypes_h=no)]) if test $jm_ac_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) steghide-0.5.1/m4/lcmessage.m40000644000076400001440000000261607735006035011531 # lcmessage.m4 serial 3 (gettext-0.11.3) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995. # Check whether LC_MESSAGES is available in . AC_DEFUN([AM_LC_MESSAGES], [ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi ]) steghide-0.5.1/m4/inttypes.m40000644000076400001440000000171707735006035011446 # inttypes.m4 serial 1 (gettext-0.11.4) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_INTTYPES_H if exists and doesn't clash with # . AC_DEFUN([gt_HEADER_INTTYPES_H], [ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, [ AC_TRY_COMPILE( [#include #include ], [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) ]) if test $gt_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, [Define if exists and doesn't clash with .]) fi ]) steghide-0.5.1/m4/lib-ld.m40000644000076400001440000000626007735006035010730 # lib-ld.m4 serial 1 (gettext-0.11) dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no fi]) with_gnu_ld=$acl_cv_prog_gnu_ld ]) dnl From libtool-1.4. Sets the variable LD. AC_DEFUN([AC_LIB_PROG_LD], [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) steghide-0.5.1/m4/inttypes-pri.m40000644000076400001440000000222707735006035012233 # inttypes-pri.m4 serial 1 (gettext-0.11.4) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. # Define PRI_MACROS_BROKEN if exists and defines the PRI* # macros to non-string values. This is the case on AIX 4.3.3. AC_DEFUN([gt_INTTYPES_PRI], [ AC_REQUIRE([gt_HEADER_INTTYPES_H]) if test $gt_cv_header_inttypes_h = yes; then AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], gt_cv_inttypes_pri_broken, [ AC_TRY_COMPILE([#include #ifdef PRId32 char *p = PRId32; #endif ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) ]) fi if test "$gt_cv_inttypes_pri_broken" = yes; then AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, [Define if exists and defines unusable PRI* macros.]) fi ]) steghide-0.5.1/m4/iconv.m40000644000076400001440000000665307735006035010711 # iconv.m4 serial AM4 (gettext-0.11.3) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) steghide-0.5.1/m4/gettext.m40000644000076400001440000005730107735006035011253 # gettext.m4 serial 17 (gettext-0.11.5) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2002. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define(gt_included_intl, ifelse([$1], [external], [no], [yes])) define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. dnl Add a version number to the cache macros. define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, [AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], gt_cv_func_gnugettext_libc=yes, gt_cv_func_gnugettext_libc=no)]) if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], gt_cv_func_gnugettext_libintl, [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias ();], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], gt_cv_func_gnugettext_libintl=yes, gt_cv_func_gnugettext_libintl=no) dnl Now see whether libintl exists and depends on libiconv. if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias ();], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" gt_cv_func_gnugettext_libintl=yes ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if test "$gt_cv_func_gnugettext_libc" = "yes" \ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ && test "$PACKAGE" != gettext; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. INTLOBJS="\$(GETTOBJS)" BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE(HAVE_GETTEXT, 1, [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE(HAVE_DCGETTEXT, 1, [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATOBJEXT) AC_SUBST(INTLOBJS) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST(DATADIRNAME) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST(GENCAT) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST(INTLLIBS) dnl Make all documented variables known to autoconf. AC_SUBST(LIBINTL) AC_SUBST(LTLIBINTL) AC_SUBST(POSUB) ]) dnl Checks for all prerequisites of the po subdirectory, dnl except for USE_NLS. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_MKINSTALLDIRS])dnl dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) dnl Search for GNU xgettext 0.11 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU msgfmt. if test "$GMSGFMT" != ":"; then dnl If it is no GNU msgfmt we define it as : so that the dnl Makefiles still can work. if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` AC_MSG_RESULT( [found $GMSGFMT program is not GNU msgfmt; ignore it]) GMSGFMT=":" fi fi dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is no GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po fi AC_OUTPUT_COMMANDS([ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' fi case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= GMOFILES= UPDATEPOFILES= DUMMYPOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it # from automake. eval 'ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Checks for all prerequisites of the intl subdirectory, dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. AC_DEFUN([AM_INTL_SUBDIR], [ AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_MKINSTALLDIRS])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([jm_GLIBC21])dnl AC_REQUIRE([gt_INTDIV0])dnl AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl AC_REQUIRE([gt_INTTYPES_PRI])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) AM_ICONV AM_LANGINFO_CODESET if test $ac_cv_header_locale_h = yes; then AM_LC_MESSAGES fi dnl intl/plural.c is generated from intl/plural.y. It requires bison, dnl because plural.y uses bison specific features. It requires at least dnl bison-1.26 because earlier versions generate a plural.c that doesn't dnl compile. dnl bison is only needed for the maintainer (who touches plural.y). But in dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put dnl the rule in general Makefile. Now, some people carelessly touch the dnl files or have a broken "make" program, hence the plural.c rule will dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not dnl present or too old. AC_CHECK_PROGS([INTLBISON], [bison]) if test -z "$INTLBISON"; then ac_verc_fail=yes else dnl Found it, now check the version. AC_MSG_CHECKING([version of bison]) changequote(<<,>>)dnl ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) changequote([,])dnl ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac AC_MSG_RESULT([$ac_prog_version]) fi if test $ac_verc_fail = yes; then INTLBISON=: fi ]) AC_DEFUN([AM_MKINSTALLDIRS], [ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but $(top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) steghide-0.5.1/m4/codeset.m40000644000076400001440000000157607735006035011220 # codeset.m4 serial AM1 (gettext-0.10.40) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET);], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE(HAVE_LANGINFO_CODESET, 1, [Define if you have and nl_langinfo(CODESET).]) fi ]) steghide-0.5.1/m4/Makefile.am0000644000076400001440000000037707735057735011377 EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 MAINTAINERCLEANFILES = Makefile.in steghide-0.5.1/m4/Makefile.in0000644000076400001440000001773007743177330011402 # Makefile.in generated by automake 1.7.2 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_INTLDIR_FALSE = @USE_INTLDIR_FALSE@ USE_INTLDIR_TRUE = @USE_INTLDIR_TRUE@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_cv_prog_doxygen = @ac_cv_prog_doxygen@ ac_cv_prog_perl = @ac_cv_prog_perl@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 MAINTAINERCLEANFILES = Makefile.in subdir = m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = DIST_SOURCES = DIST_COMMON = Makefile.am Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --foreign m4/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am info info-am install \ install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: steghide-0.5.1/m4/stdint_h.m40000644000076400001440000000204307735006035011374 # stdint_h.m4 serial 2 (gettext-0.11.4) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_STDINT_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([jm_AC_HEADER_STDINT_H], [ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1;], jm_ac_cv_header_stdint_h=yes, jm_ac_cv_header_stdint_h=no)]) if test $jm_ac_cv_header_stdint_h = yes; then AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) steghide-0.5.1/m4/progtest.m40000644000076400001440000000407407735006035011435 # progtest.m4 serial 2 (gettext-0.10.40) dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) steghide-0.5.1/m4/isc-posix.m40000644000076400001440000000213307735006035011476 # isc-posix.m4 serial 2 (gettext-0.11.2) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. # This test replaces the one in autoconf. # Currently this macro should have the same name as the autoconf macro # because gettext's gettext.m4 (distributed in the automake package) # still uses it. Otherwise, the use in gettext.m4 makes autoheader # give these diagnostics: # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX undefine([AC_ISC_POSIX]) AC_DEFUN([AC_ISC_POSIX], [ dnl This test replaces the obsolescent AC_ISC_POSIX kludge. AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) ] ) steghide-0.5.1/m4/intdiv0.m40000644000076400001440000000356507735006035011147 # intdiv0.m4 serial 1 (gettext-0.11.3) dnl Copyright (C) 2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([gt_INTDIV0], [ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], gt_cv_int_divbyzero_sigfpe, [ AC_TRY_RUN([ #include #include static void #ifdef __cplusplus sigfpe_handler (int sig) #else sigfpe_handler (sig) int sig; #endif { /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ exit (sig != SIGFPE); } int x = 1; int y = 0; int z; int nan; int main () { signal (SIGFPE, sigfpe_handler); /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) signal (SIGTRAP, sigfpe_handler); #endif /* Linux/SPARC yields signal SIGILL. */ #if defined (__sparc__) && defined (__linux__) signal (SIGILL, sigfpe_handler); #endif z = x / y; nan = y / y; exit (1); } ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, [ # Guess based on the CPU. case "$host_cpu" in alpha* | i[34567]86 | m68k | s390*) gt_cv_int_divbyzero_sigfpe="guessing yes";; *) gt_cv_int_divbyzero_sigfpe="guessing no";; esac ]) ]) case "$gt_cv_int_divbyzero_sigfpe" in *yes) value=1;; *) value=0;; esac AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, [Define if integer division by zero raises signal SIGFPE.]) ]) steghide-0.5.1/m4/ulonglong.m40000644000076400001440000000200007735006035011555 # ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], [ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], [unsigned long long ullmax = (unsigned long long) -1; return ull << i | ull >> i | ullmax / ull | ullmax % ull;], ac_cv_type_unsigned_long_long=yes, ac_cv_type_unsigned_long_long=no)]) if test $ac_cv_type_unsigned_long_long = yes; then AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, [Define if you have the unsigned long long type.]) fi ]) steghide-0.5.1/m4/lib-prefix.m40000644000076400001440000001175507735006035011633 # lib-prefix.m4 serial 1 (gettext-0.11) dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/lib"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) steghide-0.5.1/m4/uintmax_t.m40000644000076400001440000000211407735006035011567 # uintmax_t.m4 serial 6 (gettext-0.11) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. AC_PREREQ(2.13) # Define uintmax_t to `unsigned long' or `unsigned long long' # if does not exist. AC_DEFUN([jm_AC_TYPE_UINTMAX_T], [ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) AC_REQUIRE([jm_AC_HEADER_STDINT_H]) if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) test $ac_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, [Define to unsigned long or unsigned long long if and don't define.]) fi ]) steghide-0.5.1/m4/glibc21.m40000644000076400001440000000172707735006035011013 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. # Test for the GNU C Library, version 2.1 or newer. # From Bruno Haible. AC_DEFUN([jm_GLIBC21], [ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, ac_cv_gnu_library_2_1, [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif ], ac_cv_gnu_library_2_1=yes, ac_cv_gnu_library_2_1=no) ] ) AC_SUBST(GLIBC21) GLIBC21="$ac_cv_gnu_library_2_1" ] ) steghide-0.5.1/po/0000777000076400001440000000000007743177374007517 5steghide-0.5.1/po/Makevars0000644000076400001440000000205107735006444011113 # Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Stefan Hetzl # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = steghide-0.5.1/po/de.po0000644000076400001440000011126207743177373010365 # translation of de.po to Deutsch # german translation of steghide 0.5.1 messages # Copyright (C) 2002,2003 Stefan Hetzl # Stefan Hetzl , 2002,2003. # msgid "" msgstr "" "Project-Id-Version: de\n" "POT-Creation-Date: 2003-10-15 10:02+0200\n" "PO-Revision-Date: 2003-09-29 14:09+0200\n" "Last-Translator: Stefan Hetzl \n" "Language-Team: Deutsch\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.0.1\n" #: src/Arguments.cc:84 #, c-format msgid "unknown argument \"%s\"." msgstr "unbekanntes Argument \"%s\"." #: src/Arguments.cc:90 msgid "standard input cannot be used for cover data AND data to be embedded." msgstr "" "Die Standardeingabe kann nicht für Trägerdaten UND Klartextdaten verwendet " "werden." #: src/Arguments.cc:103 src/Arguments.cc:109 msgid "" "if standard input is used, the passphrase must be specified on the command " "line." msgstr "" "Wenn die Standardeingabe verwendet wird, muss das Passwort in der " "Kommandozeile angegeben werden." #: src/Arguments.cc:138 #, c-format msgid "you have to suppy a filename to the \"%s\" command." msgstr "Das Kommando \"%s\" benötigt einen Dateinamen." #: src/Arguments.cc:159 src/Arguments.cc:166 src/Arguments.cc:173 #: src/Arguments.cc:180 #, c-format msgid "you cannot use arguments with the \"%s\" command." msgstr "Mit dem Kommando \"%s\" können keine Argumente verwendet werden." #: src/Arguments.cc:195 #, c-format msgid "unknown command \"%s\"." msgstr "unbekanntes Kommando \"%s\"." #: src/Arguments.cc:205 src/Arguments.cc:236 src/Arguments.cc:267 #: src/Arguments.cc:351 src/Arguments.cc:396 src/Arguments.cc:440 #: src/Arguments.cc:542 src/Arguments.cc:570 #, c-format msgid "the argument \"%s\" can only be used with the \"%s\" command." msgstr "Das Argument \"%s\" kann nur mit dem Kommando \"%s\" verwendet werden." #: src/Arguments.cc:209 src/Arguments.cc:240 src/Arguments.cc:302 #, c-format msgid "the \"%s\" argument can be used only once." msgstr "Das Argument \"%s\" kann nur einmal verwendet werden." #: src/Arguments.cc:213 #, c-format msgid "the \"%s\" argument must be followed by the embed file name." msgstr "" "Nach dem Argument \"%s\" muss sich der Name der einzubettenden Datei " "befinden." #: src/Arguments.cc:244 #, c-format msgid "the \"%s\" argument must be followed by the extract file name." msgstr "" "Nach dem Argument \"%s\" muss sich ein Dateiname für die extrahierten Daten " "befinden." #: src/Arguments.cc:271 msgid "the cover file name argument can be used only once." msgstr "Das Trägerdatei-Argument kann nur einmal verwendet werden." #: src/Arguments.cc:275 #, c-format msgid "the \"%s\" argument must be followed by the cover file name." msgstr "Nach dem Argument \"%s\" muss sich der Name der Trägerdatei befinden." #: src/Arguments.cc:298 src/Arguments.cc:601 src/Arguments.cc:625 #: src/Arguments.cc:639 #, c-format msgid "" "the argument \"%s\" can only be used with the \"%s\" and \"%s\" commands." msgstr "" "Das Argument \"%s\" kann nur mit den Kommandos \"%s\" und \"%s\" verwendet " "werden." #: src/Arguments.cc:306 #, c-format msgid "the \"%s\" argument must be followed by the stego file name." msgstr "Nach dem Argument \"%s\" muss sich der Name der Stegodatei befinden." #: src/Arguments.cc:329 msgid "the passphrase argument can be used only once." msgstr "Das Argument \"Passwort\" kann nur einmal verwendet werden." #: src/Arguments.cc:333 #, c-format msgid "the \"%s\" argument must be followed by the passphrase." msgstr "Nach dem Argument \"%s\" muss sich ein Passwort befinden." #: src/Arguments.cc:355 msgid "the checksum argument can be used only once." msgstr "Das Prüfsumme-Argument kann nur einmal verwendet werden." #: src/Arguments.cc:373 src/Arguments.cc:418 #, c-format msgid "the argument \"%s\" can only be used with the \"embed\" command." msgstr "" "Das Argument \"%s\" kann nur mit dem \"embed\"-Kommando verwendet werden." #: src/Arguments.cc:377 src/Arguments.cc:400 msgid "the compression argument can be used only once." msgstr "Das Kompression-Argument kann nur einmal verwendet werden." #: src/Arguments.cc:381 #, c-format msgid "the \"%s\" argument must be followed by the compression level." msgstr "Nach dem Argument \"%s\" muss sich eine Kompressionsstufe befinden." #: src/Arguments.cc:387 #, c-format msgid "\"%s\" is not a valid compression level." msgstr "\"%s\" is keine gültige Kompressionsstufe." #: src/Arguments.cc:422 msgid "the file name embedding argument can be used only once." msgstr "" "Das Argument zur Einbettung des Dateinamens kann nur einmal verwendet werden." #: src/Arguments.cc:444 msgid "the encryption argument can be used only once." msgstr "Das Verschlüsselung-Argument kann nur einmal verwendet werden." #: src/Arguments.cc:448 src/Arguments.cc:453 #, c-format msgid "the \"%s\" argument must be followed by encryption parameters." msgstr "" "Nach dem Argument \"%s\" müssen sich Verschlüsselungsparameter befinden." #: src/Arguments.cc:485 src/Arguments.cc:494 #, c-format msgid "\"%s\" is neither an algorithm nor a mode supported by libmcrypt." msgstr "" "\"%s\" ist weder ein Algorithmus noch ein Modus der von libmcrypt " "unterstützt wird." #: src/Arguments.cc:499 #, c-format msgid "" "\"%s\" and \"%s\" are both libmcrypt algorithms. please specify only one." msgstr "" "Sowohl \"%s\" als auch \"%s\" sind libmcrypt-Algorithmen. Bitte nur einen " "angeben." #: src/Arguments.cc:502 #, c-format msgid "\"%s\" and \"%s\" are both libmcrypt modes. please specify only one." msgstr "" "Sowohl \"%s\" als auch \"%s\" sind libmcrypt-Modi. Bitte nur einen angeben." #: src/Arguments.cc:519 #, c-format msgid "the encryption algorithm \"%s\" can not be used with the mode \"%s\"." msgstr "" "Der Verschlüsselungsalgorithmus \"%s\" kann nicht mit dem Modus \"%s\" " "verwendet werden." #: src/Arguments.cc:525 msgid "steghide has been compiled without support for encryption." msgstr "Steghide wurde ohne Unterstützung für Verschlüsselung kompiliert." #: src/Arguments.cc:546 msgid "the radius argument can be used only once." msgstr "Das Argument \"Radius\" kann nur einmal verwendet werden." #: src/Arguments.cc:550 #, c-format msgid "the \"%s\" argument must be followed by the neighbourhood radius." msgstr "Nach dem Argument \"%s\" muss sich der Nachbarschaftsradius befinden." #: src/Arguments.cc:574 msgid "the goal argument can be used only once." msgstr "Das Ziel-Argument kann nur einmal verwendet werden." #: src/Arguments.cc:578 src/Arguments.cc:584 #, c-format msgid "the \"%s\" argument must be followed by a number between 0 and 100." msgstr "Nach dem Argument \"%s\" muss sich eine Zahl von 0 bis 100 befinden." #: src/Arguments.cc:605 msgid "the force argument can be used only once." msgstr "Das Überschreiben-Argument kann nur einmal verwendet werden." #: src/Arguments.cc:629 src/Arguments.cc:643 src/Arguments.cc:701 #, c-format msgid "" "the \"%s\" argument cannot be used here because the verbosity has already " "been set." msgstr "" "Das Argument \"%s\" kann hier nicht verwendet werden, da die Genauigkeit der " "Ausgabe bereits festgelegt wurde." #: src/Arguments.cc:659 src/Arguments.cc:669 src/Arguments.cc:679 #: src/Arguments.cc:697 msgid "you cannot use more than one debug command at a time." msgstr "Sie können nicht mehr als ein debug-Kommando auf einmal verwenden." #: src/Arguments.cc:711 msgid "the debug level argument can be used only once." msgstr "Das debug level-Argument kann nur einmal verwendet werden." #: src/Arguments.cc:715 #, c-format msgid "the \"%s\" argument must be followed by the debug level." msgstr "Nach dem Argument \"%s\" muss sich der debug level befinden." #: src/Arguments.cc:741 msgid "unknown terminal. the passphrase you type now will be visible." msgstr "" "Unbekanntes Terminal. Das Passwort das Sie jetzt eingeben wird sichtbar sein." #: src/Arguments.cc:745 msgid "Enter passphrase: " msgstr "Passwort eingeben: " #: src/Arguments.cc:758 msgid "Re-Enter passphrase: " msgstr "Passwort wiederholen: " #: src/Arguments.cc:770 msgid "the passphrases do not match." msgstr "Die Passworte stimmen nicht überein." #: src/AssertionFailed.cc:28 msgid "" "This means that you have found a bug. Please let me (shetzl@chello.at)\n" "know this if you have a way to reproduce the error.\n" "Steghide has to exit now. Sorry.\n" msgstr "" "Das bedeutet dass Sie einen Fehler gefunden haben. Wenn Sie diesen Fehler\n" "reproduzieren können, lassen Sie es mich (shetzl@chello.at) bitte wissen.\n" "Steghide wird jetzt beendet.\n" #: src/AssertionFailed.h:30 #, c-format msgid "assertion failed in %s at line number %d." msgstr "Zusicherung fehlgeschlagen in %s in Zeile %d." #: src/AuFile.cc:94 #, c-format msgid "the au file on standard input uses the unkown encoding %d." msgstr "" "Die au-Datei von der Standardeingabe verwendet die unbekannte Kodierung %d." #: src/AuFile.cc:97 #, c-format msgid "the au file \"%s\" uses the unknown encoding %d." msgstr "Die au-Datei \"%s\" verwendet die unbekannte Kodierung %d." #: src/AuFile.cc:107 #, c-format msgid "an error occured while reading the au headers from the file \"%s\"." msgstr "" "Beim Lesen der au-Header aus der Datei \"%s\" ist ein Fehler aufgetreten." #: src/AuFile.cc:113 #, c-format msgid "premature end of file \"%s\" while reading au headers." msgstr "Die au-Header aus der Datei \"%s\" sind unvollständig." #: src/AuFile.cc:119 msgid "an error occured while reading the au headers from standard input." msgstr "" "Beim Lesen der au-Header von der Standardeingabe ist ein Fehler aufgetreten." #: src/AuFile.cc:125 msgid "premature end of data from standard input while reading au headers." msgstr "Die au-Header von der Standardeingabe sind unvollständig." #: src/AuFile.cc:165 #, c-format msgid "an error occured while writing the au headers to the file \"%s\"." msgstr "" "Beim Schreiben der au-Header in die Datei \"%s\" ist ein Fehler aufgetreten." #: src/AuFile.cc:171 msgid "an error occured while writing the au headers to standard output." msgstr "" "Beim Schreiben der au-Header auf die Standardausgabe ist ein Fehler " "aufgetreten." #: src/AuFile.cc:188 msgid ", mu-law encoding" msgstr ", mu-law-Kodierung" #: src/AuFile.cc:193 msgid ", PCM encoding" msgstr ", PCM-Kodierung" #: src/AuFile.cc:196 src/BmpFile.cc:87 src/JpegFile.cc:61 src/WavFile.cc:81 msgid "format" msgstr "Format" #: src/AudioData.h:94 src/WavFile.cc:249 #, c-format msgid "an error occured while reading the audio data from the file \"%s\"." msgstr "" "Beim Lesen der Audiodaten aus der Datei \"%s\" ist ein Fehler aufgetreten." #: src/AudioData.h:100 src/WavFile.cc:253 #, c-format msgid "premature end of file \"%s\" while reading audio data." msgstr "Die Audiodaten aus der Datei \"%s\" sind unvollständig." #: src/AudioData.h:106 src/WavFile.cc:257 msgid "an error occured while reading the audio data from standard input." msgstr "" "Beim Lesen der Audiodaten von der Standardeingabe ist ein Fehler aufgetreten." #: src/AudioData.h:112 src/WavFile.cc:261 msgid "premature end of data from standard input while reading audio data." msgstr "Die Audiodaten von der Standardeingabe sind unvollständig." #: src/AudioData.h:134 src/WavFile.cc:302 #, c-format msgid "an error occured while writing the audio data to the file \"%s\"." msgstr "" "Beim Schreiben der Audiodaten in die Datei \"%s\" ist ein Fehler aufgetreten." #: src/AudioData.h:140 src/WavFile.cc:306 msgid "an error occured while writing the audio data to standard output." msgstr "" "Beim Schreiben der Audiodaten auf die Standardausgabe ist ein Fehler " "aufgetreten." #: src/BinaryIO.cc:67 #, c-format msgid "the file \"%s\" does already exist. overwrite ?" msgstr "Die Datei \"%s\" existiert bereits. Überschreiben ?" #: src/BinaryIO.cc:70 #, c-format msgid "did not write to file \"%s\"." msgstr "Datei \"%s\" wurde nicht geschrieben." #: src/BinaryIO.cc:113 #, c-format msgid "could not open the file \"%s\"." msgstr "Die Datei \"%s\" konnte nicht geöffnet werden." #: src/BinaryIO.cc:137 #, c-format msgid "could not close the file \"%s\"." msgstr "Die Datei \"%s\" konnte nicht geschlossen werden." #: src/BitString.cc:299 src/BitString.cc:347 src/MCryptPP.cc:322 #: src/MHashKeyGen.cc:115 msgid "could not allocate memory." msgstr "Es konnte nicht genügend Speicher alloziiert werden." #: src/BitString.cc:303 #, c-format msgid "error %d while calling zlib's compress2." msgstr "" "Während dem Aufruf von compress2 aus zlib ist der Fehler %d aufgetreten." #: src/BitString.cc:351 msgid "can not uncompress data. compressed data is corrupted." msgstr "" "Die Daten können nicht dekomprimiert werden, da die komprimierten Daten " "fehlerhaft sind." #: src/BitString.cc:355 #, c-format msgid "error %d while calling zlib's uncompress." msgstr "" "Während dem Aufruf von uncompress aus zlib ist der Fehler %d aufgetreten." #: src/BmpFile.cc:80 msgid "Windows 3.x bitmap" msgstr "Windows 3.x bitmap" #: src/BmpFile.cc:84 msgid "OS/2 1.x bitmap" msgstr "OS/2 1.x bitmap" #: src/BmpFile.cc:428 #, c-format msgid "" "the bmp data from standard input has a format that is not supported (biSize: " "%lu)." msgstr "" "Die bmp-Daten von der Standardeingabe haben ein Format das nicht unterstützt " "wird (biSize: %lu)." #: src/BmpFile.cc:431 #, c-format msgid "the bmp file \"%s\" has a format that is not supported (biSize: %lu)." msgstr "" "Die bmp-Datei \"%s\" hat ein Format das nicht unterstützt wird (biSize: %lu)." #: src/BmpFile.cc:439 #, c-format msgid "an error occured while reading the bmp headers from the file \"%s\"." msgstr "" "Beim Lesen der bmp-Header aus der Datei \"%s\" ist ein Fehler aufgetreten." #: src/BmpFile.cc:443 #, c-format msgid "premature end of file \"%s\" while reading bmp headers." msgstr "Die bmp-Header aus der Datei \"%s\" sind unvollständig." #: src/BmpFile.cc:447 msgid "an error occured while reading the bmp headers from standard input." msgstr "" "Beim Lesen der bmp-Header von der Standardeingabe ist ein Fehler aufgetreten." #: src/BmpFile.cc:451 msgid "premature end of data from standard input while reading bmp headers." msgstr "Die bmp-Header von der Standardeingabe sind unvollständig." #: src/BmpFile.cc:492 #, c-format msgid "" "the bmp data from standard input has a format that is not supported " "(biBitCount: %d)." msgstr "" "Die bmp-Daten von der Standardeingabe haben ein Format das nicht unterstützt " "wird (biBitCount: %d)." #: src/BmpFile.cc:495 #, c-format msgid "" "the bmp file \"%s\" has a format that is not supported (biBitCount: %d)." msgstr "" "Die bmp-Datei \"%s\" hat ein Format, das nicht unterstützt wird (biBitCount: " "%d)." #: src/BmpFile.cc:502 msgid "" "the bitmap data from standard input is compressed which is not supported." msgstr "" "Die Bilddaten von der Standardeingabe sind komprimiert, was nicht " "unterstützt wird." #: src/BmpFile.cc:505 #, c-format msgid "the bitmap data in \"%s\" is compressed which is not supported." msgstr "Die Bilddaten in \"%s\" sind komprimiert, was nicht unterstützt wird." #: src/BmpFile.cc:521 src/BmpFile.cc:610 msgid "using a black/white bitmap as cover is very insecure!" msgstr "" "eine schwarz/weiß bmp-Datei als Trägerdatei zu verwenden ist sehr unsicher!" #: src/BmpFile.cc:529 src/BmpFile.cc:618 msgid "using a 16-color bitmap as cover is very insecure!" msgstr "" "eine bmp-Datei mit 16 Farben als Trägerdatei zu verwenden ist sehr unsicher!" #: src/BmpFile.cc:552 msgid "maybe corrupted windows bmp data (Reserved in RGBQUAD is non-zero)." msgstr "" "möglicherweise beschädigte Windows-bmp Daten (Reserved in RGBQUAD ist nicht " "null)." #: src/BmpFile.cc:595 #, c-format msgid "" "the bmp data from standard input has a format that is not supported " "(bcBitCount: %d)." msgstr "" "Die bmp-Daten von der Standardeingabe haben ein Format das nicht unterstützt " "wird (bcBitCount: %d)." #: src/BmpFile.cc:598 #, c-format msgid "" "the bmp file \"%s\" has a format that is not supported (bcBitCount: %d)." msgstr "" "Die bmp-Datei \"%s\" hat ein Format das nicht unterstützt wird (bcBitCount: %" "d)." #: src/BmpFile.cc:669 #, c-format msgid "an error occured while writing the bmp headers to the file \"%s\"." msgstr "" "Beim Schreiben der bmp-Header in die Datei \"%s\" ist ein Fehler aufgetreten." #: src/BmpFile.cc:673 msgid "an error occured while writing the bmp headers to standard output." msgstr "" "Beim Schreiben der bmp-Header auf die Standardausgabe ist ein Fehler " "aufgetreten." #: src/BmpFile.cc:776 #, c-format msgid "maybe corrupted bmp data (padding byte at 0x%lx set to non-zero)." msgstr "" "möglicherweise beschädigte bmp Daten (Paddingbyte an Position 0x%lx ist " "nicht Null)." #: src/BmpFile.cc:790 #, c-format msgid "an error occured while reading the bmp data from the file \"%s\"." msgstr "" "Beim Lesen der Bilddaten aus der Datei \"%s\" ist ein Fehler aufgetreten." #: src/BmpFile.cc:794 #, c-format msgid "premature end of file \"%s\" while reading bmp data." msgstr "Die Bilddaten aus der Datei \"%s\" sind unvollständig." #: src/BmpFile.cc:798 msgid "an error occured while reading the bmp data from standard input." msgstr "" "Beim Lesen der Bilddaten von der Standardeingabe ist ein Fehler aufgetreten." #: src/BmpFile.cc:802 msgid "premature end of bmp data from standard input." msgstr "Die bmp-Daten von der Standardeingabe sind unvollständig." #: src/BmpFile.cc:840 #, c-format msgid "an error occured while writing the bitmap data to the file \"%s\"." msgstr "" "Beim Schreiben der Bilddaten in die Datei \"%s\" ist ein Fehler aufgetreten." #: src/BmpFile.cc:844 msgid "an error occured while writing the bitmap data to standard output." msgstr "" "Beim Schreiben der Bilddaten auf die Standardausgabe ist ein Fehler " "aufgetreten." #: src/CvrStgFile.cc:212 msgid "" "can not read input file. steghide has been compiled without support for jpeg " "files." msgstr "" "Eingabedatei konnte nicht gelesen werden. Steghide wurd ohne Unterstützung " "für jpeg-Dateien kompiliert." #: src/EmbData.cc:91 msgid "could not extract any data with that passphrase!" msgstr "Mit diesem Passwort konnten keine Daten extrahiert werden!" #: src/EmbData.cc:107 #, c-format msgid "" "attempting to read an embedding of version %d but steghide %s only supports " "embeddings of version %d." msgstr "" "versuche Einbettung der version %d zu lesen, aber steghide %s unterstützt " "nur Einbettungen der version %d." #: src/EmbData.cc:137 msgid "" "The embedded data is encrypted but steghide has been compiled without " "encryption\n" "support. To be able to read the embedded data, you have to install " "libmcrypt\n" "(http://mcrypt.sourceforge.net/) and recompile steghide." msgstr "" "Die eingebetteten Daten sind verschlüsselt aber steghide wurde ohne\n" "Unterstützung für Verschlüsselung kompiliert. Um die eingebetteten Daten zu\n" "lesen müssen Sie libmcrypt (http://mcrypt.sourceforge.net/) installieren " "und\n" "steghide erneut kompilieren." #: src/EmbData.cc:226 msgid "the embedded data has an invalid length." msgstr "Die eingebetteten Daten haben eine ungültige Länge." #: src/Embedder.cc:48 msgid "reading secret data from standard input..." msgstr "Lese geheime Daten von der Standardeingabe..." #: src/Embedder.cc:51 #, c-format msgid "reading secret file \"%s\"..." msgstr "Lese geheime Datei \"%s\"..." #: src/Embedder.cc:63 src/Extractor.cc:46 src/ProgressOutput.cc:71 #: src/Session.cc:88 msgid " done" msgstr " fertig" #: src/Embedder.cc:84 msgid "reading cover file from standard input..." msgstr "Lese Trägerdatei von der Standardeingabe..." #: src/Embedder.cc:87 #, c-format msgid "reading cover file \"%s\"..." msgstr "Lese Trägerdatei \"%s\"..." #: src/Embedder.cc:98 msgid "the cover file is too short to embed the data." msgstr "Die Trägerdatei ist zu kurz, um die Daten einzubetten." #: src/Embedder.cc:104 msgid "creating the graph..." msgstr "Erzeuge den Graphen..." #: src/Embedder.cc:148 src/Embedder.cc:154 msgid "standard input" msgstr "Standardeingabe" #: src/Embedder.cc:160 #, c-format msgid "embedding %s in %s..." msgstr "Bette %s in %s ein..." #: src/Embedder.cc:189 msgid "writing stego file to standard output... " msgstr "Schreibe Stegodatei auf die Standardausgabe... " #: src/Embedder.cc:194 #, c-format msgid "writing stego file \"%s\"... " msgstr "Schreibe Stegodatei \"%s\"... " #: src/Embedder.cc:204 msgid "done" msgstr "fertig" #: src/Embedder.cc:217 #, c-format msgid "executing %s..." msgstr "Führe %s aus..." #: src/Extractor.cc:36 msgid "reading stego file from standard input..." msgstr "Lese Stegodatei von der Standardeingabe..." #: src/Extractor.cc:39 #, c-format msgid "reading stego file \"%s\"..." msgstr "Lese Stegodatei \"%s\"..." #: src/Extractor.cc:52 msgid "extracting data..." msgstr "Extrahiere Daten..." #: src/Extractor.cc:62 msgid "" "the stego data from standard input is too short to contain the embedded data." msgstr "" "Die Stegodaten von der Standardeingabe sind zu kurz, um die Klartextdaten zu " "enthalten." #: src/Extractor.cc:65 #, c-format msgid "the stego file \"%s\" is too short to contain the embedded data." msgstr "Die Stegodatei \"%s\" ist zu kurz, um die Klartextdaten zu enthalten." #: src/Extractor.cc:82 msgid "checking crc32 checksum..." msgstr "CRC32 Prüfsummentest..." #: src/Extractor.cc:86 msgid " ok" msgstr " ok" #: src/Extractor.cc:90 msgid " FAILED!" msgstr " FEHLGESCHLAGEN!" #: src/Extractor.cc:93 msgid "crc32 checksum failed! extracted data is probably corrupted." msgstr "" "CRC32 Prüfsummentest fehlgeschlagen! Die extrahierten Daten sind " "wahrscheinlich fehlerhaft." #: src/Graph.cc:253 #, c-format msgid " %lu sample values, %lu vertices, %lu edges" msgstr " %lu Samplewerte, %lu Knoten, %lu Kanten" #: src/JpegFile.cc:73 msgid "can not use standard input as source for jpeg files with libjpeg." msgstr "" "Die Standardeingabe kann nicht zum Lesen von jpeg-Dateien mit libjpeg " "verwendet werden." #: src/MCryptPP.cc:64 src/MCryptPP.cc:249 #, c-format msgid "could not open libmcrypt module \"%s\",\"%s\"." msgstr "Das libmcrypt Modul \"%s\",\"%s\" konnte nicht geöffnet werden." #: src/MCryptPP.cc:119 msgid "" "could not initialize libmcrypt encryption. see above error messages if any." msgstr "" "Die Verschlüsselung aus libmcrypt konnte nicht initialisiert werden. Siehe " "obige Meldungen (falls vorhanden)." #: src/MCryptPP.cc:132 msgid "could not encrypt data." msgstr "Die Daten konnten nicht verschlüsselt werden." #: src/MCryptPP.cc:154 msgid "could not finish libmcrypt encryption." msgstr "Die libmcrypt-Verschlüsselung konnte nicht beendet werden." #: src/MCryptPP.cc:185 msgid "" "could not initialize libmcrypt decryption. see above error messages if any." msgstr "" "Die Entschlüsselung aus libmcrypt konnte nicht initialisiert werden. Siehe " "obige Meldungen (falls vorhanden)." #: src/MCryptPP.cc:198 msgid "could not decrypt data." msgstr "Die Daten konnten nicht entschlüsselt werden." #: src/MCryptPP.cc:209 msgid "could not finish libmcrypt decryption." msgstr "Die libmcrypt-Entschlüsselung konnte nicht beendet werden." #: src/MHashKeyGen.cc:61 msgid "could not generate key using libmhash." msgstr "Schlüssel konnte unter Verwendung von libmhash nicht erzeugt werden." #: src/MHashPP.cc:45 #, c-format msgid "could not initialize libmhash %s algorithm." msgstr "Der Algorithmus %s aus libmhash konnte nicht initialisiert werden." #: src/ProgressOutput.cc:79 msgid " done\n" msgstr " fertig\n" #: src/RandomSource.cc:38 msgid "" "could not open /dev/urandom, using standard library random numbers instead." msgstr "" "/dev/urandom konnte nicht geöffnet werden, stattdessen werden die " "Zufallszahlen der Standardbibliothek verwendet." #: src/RandomSource.cc:53 msgid "could not close random input file." msgstr "Die Datei zum Lesen von Zufallsdaten konnte nicht geschlossen werden." #: src/Session.cc:64 msgid "" "please specify a file name for the extracted data (there is no name embedded " "in the stego file)." msgstr "" "Bitte geben Sie einen Dateinamen für die extrahierten Daten an (es ist " "keiner in der Stegodatei eingebettet)." #: src/Session.cc:71 msgid "writing extracted data to standard output..." msgstr "Schreibe extrahierte Daten auf die Standardausgabe..." #: src/Session.cc:75 #, c-format msgid "writing extracted data to \"%s\"..." msgstr "Schreibe extrahierte Daten nach \"%s\"..." #: src/Session.cc:94 #, c-format msgid "wrote extracted data to \"%s\"." msgstr "Extrahierte Daten wurden nach \"%s\" geschrieben." #: src/Session.cc:138 msgid "data from standard input:\n" msgstr "Daten von der Standardeingabe:\n" #: src/Session.cc:145 msgid "capacity" msgstr "Kapazität" #: src/Session.cc:152 msgid "Try to get information about embedded data ?" msgstr "Soll versucht werden, Information über eingebettete Daten anzuzeigen ?" #: src/Session.cc:171 msgid " embedded data:\n" msgstr " eingebettete Daten:\n" #: src/Session.cc:174 #, c-format msgid " embedded file \"%s\":\n" msgstr " Eingebettete Datei \"%s\":\n" #: src/Session.cc:177 #, c-format msgid " size: %s\n" msgstr " Größe: %s\n" #: src/Session.cc:180 src/Session.cc:186 msgid "no" msgstr "nein" #: src/Session.cc:185 #, c-format msgid " encrypted: %s\n" msgstr " verschlüsselt: %s\n" #: src/Session.cc:186 #, c-format msgid " compressed: %s\n" msgstr " komprimiert: %s\n" #: src/Session.cc:186 msgid "yes" msgstr "ja" #: src/Session.cc:191 msgid "could not extract any data with that passphrase!\n" msgstr "Mit diesem Passwort konnten keine Daten extrahiert werden!\n" #: src/Session.cc:214 msgid "" "encryption algorithms:\n" ": ...\n" msgstr "" "Verschlüsselungsalgorithmen:\n" ": ...\n" #: src/Session.cc:231 msgid "" "steghide has been compiled without support for encryption.\n" "If you want to encrypt your data before embedding it, use an external " "encryption\n" "program or install libmcrypt (http://mcrypt.sourceforge.net/) and recompile " "steghide.\n" msgstr "" "Steghide wurde ohne Unterstützung für Verschlüsselung kompiliert.\n" "Wenn Sie die Daten vor dem Einbetten verschlüsseln wollen, verwenden Sie " "ein\n" "externes Verschlüsselungsprogramm oder installieren Sie libmcrypt\n" "(http://mcrypt.sourceforge.net/) und kompilieren Sie steghide erneut.\n" #: src/Session.cc:245 msgid "" "\n" "the first argument must be one of the following:\n" " embed, --embed embed data\n" " extract, --extract extract data\n" " info, --info display information about a cover- or stego-file\n" " info display information about \n" " encinfo, --encinfo display a list of supported encryption algorithms\n" " version, --version display version information\n" " license, --license display steghide's license\n" " help, --help display this usage information\n" "\n" "embedding options:\n" " -ef, --embedfile select file to be embedded\n" " -ef embed the file \n" " -cf, --coverfile select cover-file\n" " -cf embed into the file \n" " -p, --passphrase specify passphrase\n" " -p use to embed data\n" " -sf, --stegofile select stego file\n" " -sf write result to instead of cover-file\n" " -e, --encryption select encryption parameters\n" " -e []|[] specify an encryption algorithm and/or mode\n" " -e none do not encrypt data before embedding\n" " -z, --compress compress data before embedding (default)\n" " -z using level (1 best speed...9 best " "compression)\n" " -Z, --dontcompress do not compress data before embedding\n" " -K, --nochecksum do not embed crc32 checksum of embedded data\n" " -N, --dontembedname do not embed the name of the original file\n" " -f, --force overwrite existing files\n" " -q, --quiet suppress information messages\n" " -v, --verbose display detailed information\n" "\n" "extracting options:\n" " -sf, --stegofile select stego file\n" " -sf extract data from \n" " -p, --passphrase specify passphrase\n" " -p use to extract data\n" " -xf, --extractfile select file name for extracted data\n" " -xf write the extracted data to \n" " -f, --force overwrite existing files\n" " -q, --quiet suppress information messages\n" " -v, --verbose display detailed information\n" "\n" "options for the info command:\n" " -p, --passphrase specify passphrase\n" " -p use to get info about embedded data\n" "\n" "To embed emb.txt in cvr.jpg: steghide embed -cf cvr.jpg -ef emb.txt\n" "To extract embedded data from stg.jpg: steghide extract -sf stg.jpg\n" msgstr "" "\n" "Das erste Argument muss eines der folgenden sein:\n" " embed, --embed Daten einbetten\n" " extract, --extract Daten extrahieren\n" " info, --info Information über Cover- oder Stegodatei anzeigen\n" " info Information über anzeigen\n" " encinfo, --encinfo Liste verfügbarer Verschlüsselungsalgorithmen " "anzeigen\n" " version, --version Versionsnummer anzeigen\n" " license, --license Lizenz von steghide anzeigen\n" " help, --help diese Gebrauchsanweisung anzeigen\n" "\n" "Optionen zur Einbettung:\n" " -ef, --embedfile Datei die eingebettet werden soll auswählen\n" " -ef die Datei einbetten\n" " -cf, -coverfile Trägerdatei auswählen\n" " -cf in die Datei einbetten\n" " -p, --passphrase Passwort angeben\n" " -p als Passwort verwenden\n" " -sf, --stegofile Stegodatei auswählen\n" " -sf Ergebnis in statt in Trägerdatei " "schreiben\n" " -e, --encryption Verschlüsselungsparamter auswählen\n" " -e []|[] Verschlüsselungsalgorithmus und/oder -modus " "auswählen\n" " -e none Daten vor Einbettung nicht verschlüsseln\n" " -z, --compress Daten vor Einbettung komprimieren (Standard)\n" " -z verwende Stufe (1 schnell...9 gute " "Kompression)\n" " -Z, --dontcompress Daten vor Einbettung nicht komprimieren\n" " -K, --nochecksum Keine CRC32 Prüfsumme der eingebetteten Daten " "einbetten\n" " -N, --dontembedname den Namen der eingebetten Datei nicht einbetten\n" " -f, --force Existierende Dateien überschreiben\n" " -q, --quiet Unkritische Nachrichten nicht anzeigen\n" " -v, --verbose Detaillierte Informationen anzeigen\n" "\n" "Optionen zur Extraktion:\n" "-sf, --stegofile Stegodatei auswählen\n" " -sf als Stegodatei verwenden\n" " -p, --passphrase Passwort angeben\n" " -p als Passwort verwenden\n" " -xf, --extractfile Dateinamen für extrahierte Daten auswählen\n" " -xf extrahierte Daten nach schreiben\n" " -f, --force Existierende Dateien überschreiben\n" " -q, --quiet Unkritische Nachrichten nicht anzeigen\n" " -v, --verbose Detaillierte Informationen anzeigen\n" "\n" "Optionen für das info-Kommando:\n" "-p, --passphrase Passwort angeben\n" " -p als Passwort verwenden\n" "\n" "Um emb.txt in cvr.jpg einzubetten: steghide embed -cf cvr.jpg -ef emb.txt\n" "Um eingebettete Daten aus stg.jpg zu extrahieren: steghide extract -sf stg." "jpg\n" #: src/SteghideError.cc:27 msgid "error, exiting. (no error message defined)." msgstr "Fehler, Programmende. (keine Fehlermeldung definiert)." #: src/Terminal.cc:31 src/Terminal.cc:39 src/Terminal.cc:53 msgid "could not get terminal attributes." msgstr "Die Attribute des Terminals konnten nicht gelesen werden." #: src/Terminal.cc:45 src/Terminal.cc:61 src/Terminal.cc:68 msgid "could not set terminal attributes." msgstr "Die Attribute des Terminals konnten nicht gesetzt werden." #: src/WavFile.cc:346 #, c-format msgid "an error occured while reading the wav headers from the file \"%s\"." msgstr "" "Beim Lesen der wav-Header aus der Datei \"%s\" ist ein Fehler aufgetreten." #: src/WavFile.cc:352 #, c-format msgid "premature end of file \"%s\" while reading wav headers." msgstr "Die wav-Header aus der Datei \"%s\" sind unvollständig." #: src/WavFile.cc:358 msgid "an error occured while reading the wav headers from standard input." msgstr "" "Beim Lesen der wav-Header von der Standardeingabe ist ein Fehler aufgetreten." #: src/WavFile.cc:364 msgid "premature end of data from standard input while reading wav headers." msgstr "Die wav-Header von der Standardeingabe sind unvollständig." #: src/WavFile.cc:394 #, c-format msgid "an error occured while writing the wav headers to the file \"%s\"." msgstr "" "Beim Schreiben der wav-Header in die Datei \"%s\" ist ein Fehler aufgetreten." #: src/WavFile.cc:400 msgid "an error occured while writing the wav headers to standard output." msgstr "" "Beim Schreiben der wav-Header auf die Standardausgabe ist ein Fehler " "aufgetreten." #: src/WavFormatChunk.cc:31 #, c-format msgid "" "the wav file from standard input has a format that is not supported " "(FormatTag: 0x%X)." msgstr "" "Die wav-Datei von der Standardeingabe hat ein Format, das nicht unterstützt " "wird (FormatTag: 0x%X)." #: src/WavFormatChunk.cc:34 #, c-format msgid "" "the wav file \"%s\" has a format that is not supported (FormatTag: 0x%X)." msgstr "" "Die wav-Datei \"%s\" hat ein Format, das nicht unterstützt wird (FormatTag: " "0x%X)." #: src/WavFormatChunk.cc:49 msgid "" "the wav file from standard input does not have pcm format (header too long)." msgstr "" "Die wav-Datei von der Standardeingabe hat nicht das PCM-Format (header ist " "zu lang)." #: src/WavFormatChunk.cc:52 #, c-format msgid "the wav file \"%s\" does not have pcm format (header too long)." msgstr "Die wav-Datei \"%s\" hat nicht das PCM-Format (header ist zu lang)." #: src/WavFormatChunk.cc:57 msgid "the wav file from standard input is corrupted." msgstr "Die wav-Datei von der Standardeingabe ist ungültig." #: src/WavFormatChunk.cc:60 #, c-format msgid "the wav file \"%s\" is corrupted." msgstr "Die wav-Datei \"%s\" ist ungültig." #: src/error.cc:45 msgid "type \"steghide --help\" for help." msgstr "Geben Sie \"steghide --help\" ein, um Hilfe zu erhalten." #: src/error.cc:56 msgid "premature end of data from standard input." msgstr "Die Daten von der Standardeingabe sind unvollständig." #: src/error.cc:60 #, c-format msgid "premature end of file \"%s\"." msgstr "Die Datei \"%s\" ist unvollständig." #: src/error.cc:66 msgid "an error occured while reading data from standard input." msgstr "Beim Lesen von der Standardeingabe ist ein Fehler aufgetreten." #: src/error.cc:70 #, c-format msgid "an error occured while reading data from the file \"%s\"." msgstr "Beim Lesen aus der Datei \"%s\" ist ein Fehler aufgetreten." #: src/error.cc:93 msgid "an error occured while writing data to standard output." msgstr "Beim Schreiben auf die Standardausgabe ist ein Fehler aufgetreten." #: src/error.cc:97 #, c-format msgid "an error occured while writing data to the file \"%s\"." msgstr "Beim Schreiben in die Datei \"%s\" ist ein Fehler aufgetreten." #: src/error.cc:119 msgid "the file format of the data from standard input is not supported." msgstr "" "Das Dateiformat der Daten von der Standardeingabe wird nicht unterstützt." #: src/error.cc:122 #, c-format msgid "the file format of the file \"%s\" is not supported." msgstr "Das Dateiformat der Datei \"%s\" wird nicht unterstützt." #: src/error.cc:141 msgid "" "This feature is not (yet) available. Please let me (shetzl@chello.at) know\n" "that you want to use this functionality to increase the chance that this " "will\n" "be implemented in the near future. Steghide has to exit now. Sorry.\n" msgstr "" "Diese Funktion ist (noch) nicht vorhanden. Bitte lassen Sie es mich " "(shetzl@chello.at)\n" "wissen, dass sie diese Funktion verwenden wollten, um die Chancen zu " "erhöhen, dass sie\n" "bald programmiert wird. Steghide wird jetzt beendet\n" #: src/error.cc:161 msgid "" "Other possible reasons for this error are that the passphrase is wrong\n" "or that there is no embedded data.\n" msgstr "" "Andere mögliche Gründe für diesen Fehler sind dass das Passwort falsch ist\n" "oder dass keine Daten eingebettet sind.\n" #: src/msg.cc:35 msgid "__no_message_defined__" msgstr "__keine_Meldung_definiert__" #: src/msg.cc:135 src/msg.cc:153 msgid "warning:" msgstr "Warnung:" # the [y]es character (see also the [n]o character) #: src/msg.cc:162 src/msg.cc:169 src/msg.cc:176 msgid "y" msgstr "j" # the [n]o character (see also the [y]es character) #: src/msg.cc:163 src/msg.cc:170 src/msg.cc:177 msgid "n" msgstr "n" #: src/msg.cc:188 msgid "unknown terminal. you might need to press after answering." msgstr "" "Unbekanntes Terminal. Vielleicht müssen Sie zur Bestätigung der Antwort auf " " drücken." #~ msgid "the file \"%s\" does already exist." #~ msgstr "Die Datei \"%s\" existiert bereits." steghide-0.5.1/po/es.po0000644000076400001440000010655507743177372010414 # Translation of steghide.pot to spanish # Copyright (C) 2003 Stefan Hetzl # This file is distributed under the same license as the steghide package. # ALBERTO A. SCHIANO , 2003. msgid "" msgstr "" "Project-Id-Version: es\n" "POT-Creation-Date: 2003-10-15 10:02+0200\n" "PO-Revision-Date: 2003-10-05 16:28-0300\n" "Last-Translator: Alberto A. Schiano \n" "Language-Team: spanish\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: src/Arguments.cc:84 #, c-format msgid "unknown argument \"%s\"." msgstr "argumento desconocido \"%s\"." #: src/Arguments.cc:90 msgid "standard input cannot be used for cover data AND data to be embedded." msgstr "" "no puede usar entrada estandar para datos d/portada Y datos d/adjuntar." #: src/Arguments.cc:103 src/Arguments.cc:109 msgid "" "if standard input is used, the passphrase must be specified on the command " "line." msgstr "" "si se usa la entrada estandar, debe declararse el salvoconducto en la línea " "de comando." #: src/Arguments.cc:138 #, c-format msgid "you have to suppy a filename to the \"%s\" command." msgstr "hay que agregarle un nombre de archivo al comando \"%s\"." #: src/Arguments.cc:159 src/Arguments.cc:166 src/Arguments.cc:173 #: src/Arguments.cc:180 #, c-format msgid "you cannot use arguments with the \"%s\" command." msgstr "no podemos usar argumentos con el comando \"%s\"." #: src/Arguments.cc:195 #, c-format msgid "unknown command \"%s\"." msgstr "comando desconocido \"%s\"." #: src/Arguments.cc:205 src/Arguments.cc:236 src/Arguments.cc:267 #: src/Arguments.cc:351 src/Arguments.cc:396 src/Arguments.cc:440 #: src/Arguments.cc:542 src/Arguments.cc:570 #, c-format msgid "the argument \"%s\" can only be used with the \"%s\" command." msgstr "el argumento \"%s\" puede solo usarse con el comando \"%s\"." #: src/Arguments.cc:209 src/Arguments.cc:240 src/Arguments.cc:302 #, c-format msgid "the \"%s\" argument can be used only once." msgstr "solo puede usarse 1 vez el argumento \"%s\"" #: src/Arguments.cc:213 #, c-format msgid "the \"%s\" argument must be followed by the embed file name." msgstr "el argumento \"%s\" debe terminar con el nombre de archivo adjunto." #: src/Arguments.cc:244 #, c-format msgid "the \"%s\" argument must be followed by the extract file name." msgstr "" "el argumento \"%s\" debe terminar con el nombre de archivo de extracción." #: src/Arguments.cc:271 msgid "the cover file name argument can be used only once." msgstr "el argumento de nombre de archivo de portada puede usarse solo 1 vez." #: src/Arguments.cc:275 #, c-format msgid "the \"%s\" argument must be followed by the cover file name." msgstr "el argumento \"%s\" debe terminar con un nombre de archivo de portada." #: src/Arguments.cc:298 src/Arguments.cc:601 src/Arguments.cc:625 #: src/Arguments.cc:639 #, c-format msgid "" "the argument \"%s\" can only be used with the \"%s\" and \"%s\" commands." msgstr "" "el argumento \"%s\" solo puede usarse con los comandos \"%s\" y \"%s\"." #: src/Arguments.cc:306 #, c-format msgid "the \"%s\" argument must be followed by the stego file name." msgstr "el argumento \"%s\" debe terminar con un nombre de archivo stego." #: src/Arguments.cc:329 msgid "the passphrase argument can be used only once." msgstr "solo puede usarse una vez el argumento del salvoconducto." #: src/Arguments.cc:333 #, c-format msgid "the \"%s\" argument must be followed by the passphrase." msgstr "el argumento \"%s\" debe terminar con el salvoconducto." #: src/Arguments.cc:355 msgid "the checksum argument can be used only once." msgstr "el argumento checksum puede usarse solo 1 vez." #: src/Arguments.cc:373 src/Arguments.cc:418 #, c-format msgid "the argument \"%s\" can only be used with the \"embed\" command." msgstr "argumento \"%s\" puede solo usarse c/comando \"embed\"(n.t.adjuntar)" #: src/Arguments.cc:377 src/Arguments.cc:400 msgid "the compression argument can be used only once." msgstr "solo puede usar una vez el argumento de compresión." #: src/Arguments.cc:381 #, c-format msgid "the \"%s\" argument must be followed by the compression level." msgstr "el argumento \"%s\" debe terminar con el nivel de compresión." #: src/Arguments.cc:387 #, c-format msgid "\"%s\" is not a valid compression level." msgstr "\"%s\" no es un nivel de compresión válido." #: src/Arguments.cc:422 msgid "the file name embedding argument can be used only once." msgstr "solo puede mencionar 1 vez el arg.adjuntar nombre del archivo." #: src/Arguments.cc:444 msgid "the encryption argument can be used only once." msgstr "solo puede usar el argumento de encriptado una vez." #: src/Arguments.cc:448 src/Arguments.cc:453 #, c-format msgid "the \"%s\" argument must be followed by encryption parameters." msgstr "el argumento \"%s\" debe terminar con parámetros de encriptado." #: src/Arguments.cc:485 src/Arguments.cc:494 #, c-format msgid "\"%s\" is neither an algorithm nor a mode supported by libmcrypt." msgstr "" "\"%s\" no es ni un algoritmo ni una modalidad reconocida por libmcrypt." #: src/Arguments.cc:499 #, c-format msgid "" "\"%s\" and \"%s\" are both libmcrypt algorithms. please specify only one." msgstr "" "\"%s\" y \"%s\" son dos algoritmos de libmcrypt. por favor, elija solo uno." #: src/Arguments.cc:502 #, c-format msgid "\"%s\" and \"%s\" are both libmcrypt modes. please specify only one." msgstr "" "\"%s\" y \"%s\" son dos modalidades de libmcrypt. por favor, elija solo una." #: src/Arguments.cc:519 #, c-format msgid "the encryption algorithm \"%s\" can not be used with the mode \"%s\"." msgstr "" "el algoritmo de encriptado \"%s\" no puede usarse con la modalidad \"%s\"." #: src/Arguments.cc:525 msgid "steghide has been compiled without support for encryption." msgstr "steghide se compiló sin reconocimiento de encriptados." #: src/Arguments.cc:546 msgid "the radius argument can be used only once." msgstr "el argumento radio solo puede usarse una vez." #: src/Arguments.cc:550 #, c-format msgid "the \"%s\" argument must be followed by the neighbourhood radius." msgstr "el argumento \"%s\" debe terminar con el radio del vecindario." #: src/Arguments.cc:574 msgid "the goal argument can be used only once." msgstr "el argumento de objetivo solo puede usarse una vez." #: src/Arguments.cc:578 src/Arguments.cc:584 #, c-format msgid "the \"%s\" argument must be followed by a number between 0 and 100." msgstr "el argumento \"%s\" debe terminar con un número entre 0 y 100." #: src/Arguments.cc:605 msgid "the force argument can be used only once." msgstr "el argumento de forzado solo puede usarse una vez." #: src/Arguments.cc:629 src/Arguments.cc:643 src/Arguments.cc:701 #, c-format msgid "" "the \"%s\" argument cannot be used here because the verbosity has already " "been set." msgstr "" "el argumento \"%s\" no puede usarse aquí porque ya se configuró la " "verbosidad." #: src/Arguments.cc:659 src/Arguments.cc:669 src/Arguments.cc:679 #: src/Arguments.cc:697 msgid "you cannot use more than one debug command at a time." msgstr "no podemos usar más de un comando de depuración a la vez." #: src/Arguments.cc:711 msgid "the debug level argument can be used only once." msgstr "el argumento del nivel de depuración puede solo usarse una vez." #: src/Arguments.cc:715 #, c-format msgid "the \"%s\" argument must be followed by the debug level." msgstr "el argumento \"%s\" debe terminar con el nivel de depuración." #: src/Arguments.cc:741 msgid "unknown terminal. the passphrase you type now will be visible." msgstr "terminal desconocida. el salvoconducto que anote quedará expuesto." #: src/Arguments.cc:745 msgid "Enter passphrase: " msgstr "Anotar salvoconducto: " #: src/Arguments.cc:758 msgid "Re-Enter passphrase: " msgstr "Re-ingresar salvoconducto: " #: src/Arguments.cc:770 msgid "the passphrases do not match." msgstr "los salvoconductos no concuerdan." #: src/AssertionFailed.cc:28 msgid "" "This means that you have found a bug. Please let me (shetzl@chello.at)\n" "know this if you have a way to reproduce the error.\n" "Steghide has to exit now. Sorry.\n" msgstr "" "Esto significa que hemos hallado un fallo. Por favor, avíseme (shetzl@chello." "at)\n" "si conoce alguna forma de volver a producir este error.\n" "Steghide debe terminar ahora. Lo siento.\n" #: src/AssertionFailed.h:30 #, c-format msgid "assertion failed in %s at line number %d." msgstr "falló la aserción en %s y línea nro. %d." #: src/AuFile.cc:94 #, c-format msgid "the au file on standard input uses the unkown encoding %d." msgstr "el archivo au de la entrada estandar usa el código desconocido %d." #: src/AuFile.cc:97 #, c-format msgid "the au file \"%s\" uses the unknown encoding %d." msgstr "el archivo \"%s\" usa el código desconocido %d." #: src/AuFile.cc:107 #, c-format msgid "an error occured while reading the au headers from the file \"%s\"." msgstr "ocurrió un error mientras leía la cabecera au desde el archivo \"%s\"." #: src/AuFile.cc:113 #, c-format msgid "premature end of file \"%s\" while reading au headers." msgstr "final prematuro de archivo \"%s\" mientras leía cabecera au. " #: src/AuFile.cc:119 msgid "an error occured while reading the au headers from standard input." msgstr "" "ocurrió un error mientras leía la cabecera au desde la entrada estandar." #: src/AuFile.cc:125 msgid "premature end of data from standard input while reading au headers." msgstr "" "final prematuro de datos desde la entrada estandar mientras leía cabecera au." #: src/AuFile.cc:165 #, c-format msgid "an error occured while writing the au headers to the file \"%s\"." msgstr "ocurrió un error mientras grababa la cabecera au en el archivo \"%s\"." #: src/AuFile.cc:171 msgid "an error occured while writing the au headers to standard output." msgstr "" "ocurrió un error mientras escribia la cabecera au en la salida estandar." #: src/AuFile.cc:188 msgid ", mu-law encoding" msgstr ", codificación mu-law" #: src/AuFile.cc:193 msgid ", PCM encoding" msgstr ", codificación PCM" #: src/AuFile.cc:196 src/BmpFile.cc:87 src/JpegFile.cc:61 src/WavFile.cc:81 msgid "format" msgstr "formato" #: src/AudioData.h:94 src/WavFile.cc:249 #, c-format msgid "an error occured while reading the audio data from the file \"%s\"." msgstr "ocurrió un error mientras leía los datos de audio del archivo \"%s\"." #: src/AudioData.h:100 src/WavFile.cc:253 #, c-format msgid "premature end of file \"%s\" while reading audio data." msgstr "final prematuro del archivo \"%s\" mientras leía datos de audio." #: src/AudioData.h:106 src/WavFile.cc:257 msgid "an error occured while reading the audio data from standard input." msgstr "" "ocurrió un error mientras leía los datos de audio desde la entrada estandar. " #: src/AudioData.h:112 src/WavFile.cc:261 msgid "premature end of data from standard input while reading audio data." msgstr "" "final prematuro de datos desde entrada estandar mientras leía datos de audio." #: src/AudioData.h:134 src/WavFile.cc:302 #, c-format msgid "an error occured while writing the audio data to the file \"%s\"." msgstr "" "ocurrió un error mientras grababa los datos de audio en el archivo \"%s\"." #: src/AudioData.h:140 src/WavFile.cc:306 msgid "an error occured while writing the audio data to standard output." msgstr "" "ocurrió un error mientras escribia los datos de audio en la salida estandar." #: src/BinaryIO.cc:67 #, c-format msgid "the file \"%s\" does already exist. overwrite ?" msgstr "ya existe el archivo \"%s\". ¿lo sobreescribo?" #: src/BinaryIO.cc:70 #, c-format msgid "did not write to file \"%s\"." msgstr "no grabé en el archivo \"%s\"." #: src/BinaryIO.cc:113 #, c-format msgid "could not open the file \"%s\"." msgstr "no pude abrir el archivo \"%s\"." #: src/BinaryIO.cc:137 #, c-format msgid "could not close the file \"%s\"." msgstr "no pude cerrar el archivo \"%s\"." #: src/BitString.cc:299 src/BitString.cc:347 src/MCryptPP.cc:322 #: src/MHashKeyGen.cc:115 msgid "could not allocate memory." msgstr "no pude encontrar memoria." #: src/BitString.cc:303 #, c-format msgid "error %d while calling zlib's compress2." msgstr "error %d mientras solicitaba compress2 a zlib." #: src/BitString.cc:351 msgid "can not uncompress data. compressed data is corrupted." msgstr "no puedo descompactar datos. datos compactados inservibles." #: src/BitString.cc:355 #, c-format msgid "error %d while calling zlib's uncompress." msgstr "error %d mientras solicitaba a zlib que descompactara." #: src/BmpFile.cc:80 msgid "Windows 3.x bitmap" msgstr "mapa de bit Windows 3.x" #: src/BmpFile.cc:84 msgid "OS/2 1.x bitmap" msgstr "mapa de bit OS/2 1.x" #: src/BmpFile.cc:428 #, c-format msgid "" "the bmp data from standard input has a format that is not supported (biSize: " "%lu)." msgstr "" "los datos bmp de la entrada estandar tienen un formato no reconocido " "(biSize: %lu)." #: src/BmpFile.cc:431 #, c-format msgid "the bmp file \"%s\" has a format that is not supported (biSize: %lu)." msgstr "el archivo bmp \"%s\" tiene un formato no reconocido (biSize: %lu)." #: src/BmpFile.cc:439 #, c-format msgid "an error occured while reading the bmp headers from the file \"%s\"." msgstr "ocurrió un error mientras leía la cabecera bmp del archivo \"%s\"." #: src/BmpFile.cc:443 #, c-format msgid "premature end of file \"%s\" while reading bmp headers." msgstr "final prematuro d/archivo \"%s\" mientras leía la cabecera bmp." #: src/BmpFile.cc:447 msgid "an error occured while reading the bmp headers from standard input." msgstr "ocurrió un error mientras leía cabecera bmp de la entrada estandar." #: src/BmpFile.cc:451 msgid "premature end of data from standard input while reading bmp headers." msgstr "" "final prematuro de datos de la entrada estandar mientras leía cabecera bmp." #: src/BmpFile.cc:492 #, c-format msgid "" "the bmp data from standard input has a format that is not supported " "(biBitCount: %d)." msgstr "" "el archivo bmp de la entrada estandar tiene un formato que no reconozco" "(biBitCount: %d)." #: src/BmpFile.cc:495 #, c-format msgid "" "the bmp file \"%s\" has a format that is not supported (biBitCount: %d)." msgstr "" "el archivo bmp \"%s\" tiene un formato que no reconozco (biBitCount: %d)." #: src/BmpFile.cc:502 msgid "" "the bitmap data from standard input is compressed which is not supported." msgstr "" "datos d/mapa d/bit d/entrada estandar están comprimidos y no puedo " "reconocerlos." #: src/BmpFile.cc:505 #, c-format msgid "the bitmap data in \"%s\" is compressed which is not supported." msgstr "" "los datos d/mapa d/bit \"%s\" están comprimidos y no puedo reconocerlos." #: src/BmpFile.cc:521 src/BmpFile.cc:610 msgid "using a black/white bitmap as cover is very insecure!" msgstr "¡es muy inseguro usar un mapa de bits blanco/negro como portada!" #: src/BmpFile.cc:529 src/BmpFile.cc:618 msgid "using a 16-color bitmap as cover is very insecure!" msgstr "¡es muy inseguro usar un mapa de bits de 16 colores como portada!" #: src/BmpFile.cc:552 msgid "maybe corrupted windows bmp data (Reserved in RGBQUAD is non-zero)." msgstr "" "pueden ser datos bmp de ventana inservibles (Reservado en RGBQUAD no es " "cero)." #: src/BmpFile.cc:595 #, c-format msgid "" "the bmp data from standard input has a format that is not supported " "(bcBitCount: %d)." msgstr "" "los datos bmp de la entrada estandar tienen un formato no reconocido " "(bcBitCount: %d)." #: src/BmpFile.cc:598 #, c-format msgid "" "the bmp file \"%s\" has a format that is not supported (bcBitCount: %d)." msgstr "" "el archivo bmp \"%s\" tiene un formato no reconocido (bcBitCount: %d)." #: src/BmpFile.cc:669 #, c-format msgid "an error occured while writing the bmp headers to the file \"%s\"." msgstr "ocurrió un error mientras escribia cabecera bmp en archivo \"%s\"." #: src/BmpFile.cc:673 msgid "an error occured while writing the bmp headers to standard output." msgstr "" "ocurrió un error mientras escribia la cabecera bmp en la salida estandar." #: src/BmpFile.cc:776 #, c-format msgid "maybe corrupted bmp data (padding byte at 0x%lx set to non-zero)." msgstr "datos bmp pueden ser inservibles (byte d/relleno 0x%lx no vale cero)." #: src/BmpFile.cc:790 #, c-format msgid "an error occured while reading the bmp data from the file \"%s\"." msgstr "ocurrió un error mientras leía datos bmp del archivo \"%s\"." #: src/BmpFile.cc:794 #, c-format msgid "premature end of file \"%s\" while reading bmp data." msgstr "final prematuro de archivo \"%s\" mientras leía datos bmp." #: src/BmpFile.cc:798 msgid "an error occured while reading the bmp data from standard input." msgstr "ocurrió un error mientras leía datos bmp desde entrada estandar." #: src/BmpFile.cc:802 msgid "premature end of bmp data from standard input." msgstr "final prematuro d/datos bmp desde entrada estandar." #: src/BmpFile.cc:840 #, c-format msgid "an error occured while writing the bitmap data to the file \"%s\"." msgstr "" "ocurrió un error mientras grababa datos d/mapa d/bits e/archivo \"%s\"." #: src/BmpFile.cc:844 msgid "an error occured while writing the bitmap data to standard output." msgstr "" "ocurrió un error mientras escribia datos d/mapa d/bits e/salida estandar." #: src/CvrStgFile.cc:212 msgid "" "can not read input file. steghide has been compiled without support for jpeg " "files." msgstr "" "no puedo leer archivos d/datos. steghide se compiló sin reconocimiento d/" "archivos jpeg." #: src/EmbData.cc:91 msgid "could not extract any data with that passphrase!" msgstr "¡no pude extraer ningún dato con ese salvoconducto!" #: src/EmbData.cc:107 #, c-format msgid "" "attempting to read an embedding of version %d but steghide %s only supports " "embeddings of version %d." msgstr "" "intentando leer un adjunto de versión %d aunque steghide %s solo reconoce " "adjuntos de versión %d." #: src/EmbData.cc:137 msgid "" "The embedded data is encrypted but steghide has been compiled without " "encryption\n" "support. To be able to read the embedded data, you have to install " "libmcrypt\n" "(http://mcrypt.sourceforge.net/) and recompile steghide." msgstr "" "Los datos adjuntos están encriptados pero steghide se ha compilado sin " "capacidad de\n" "encriptado. Para poder leer los datos adjuntos, tendremos que instalar " "libmcrypt\n" "(http://mcrypt.sourceforge.net/) y recompilar steghide." #: src/EmbData.cc:226 msgid "the embedded data has an invalid length." msgstr "los datos adjuntos tienen una longitud inválida." #: src/Embedder.cc:48 msgid "reading secret data from standard input..." msgstr "leyendo los datos secretos desde la entrada estandar..." #: src/Embedder.cc:51 #, c-format msgid "reading secret file \"%s\"..." msgstr "leyendo archivo secreto \"%s\"..." #: src/Embedder.cc:63 src/Extractor.cc:46 src/ProgressOutput.cc:71 #: src/Session.cc:88 msgid " done" msgstr " hecho" #: src/Embedder.cc:84 msgid "reading cover file from standard input..." msgstr "leyendo archivo d/portada desde l/entrada estandar..." #: src/Embedder.cc:87 #, c-format msgid "reading cover file \"%s\"..." msgstr "leyendo archivo d/portada \"%s\"..." #: src/Embedder.cc:98 msgid "the cover file is too short to embed the data." msgstr "archivo d/portada muy corto para adjuntarle datos." #: src/Embedder.cc:104 msgid "creating the graph..." msgstr "creando el gráfico..." #: src/Embedder.cc:148 src/Embedder.cc:154 msgid "standard input" msgstr "entrada estandar" #: src/Embedder.cc:160 #, c-format msgid "embedding %s in %s..." msgstr "adjuntando %s en %s..." #: src/Embedder.cc:189 msgid "writing stego file to standard output... " msgstr "escribiendo archivo stego en salida estandar..." #: src/Embedder.cc:194 #, c-format msgid "writing stego file \"%s\"... " msgstr "grabando archivo stego \"%s\"... " #: src/Embedder.cc:204 msgid "done" msgstr "hecho" #: src/Embedder.cc:217 #, c-format msgid "executing %s..." msgstr "ejecutando %s..." #: src/Extractor.cc:36 msgid "reading stego file from standard input..." msgstr "leyendo archivo stego d/entrada estandar..." #: src/Extractor.cc:39 #, c-format msgid "reading stego file \"%s\"..." msgstr "leyendo archivo stego \"%s\"..." #: src/Extractor.cc:52 msgid "extracting data..." msgstr "extrayendo datos..." #: src/Extractor.cc:62 msgid "" "the stego data from standard input is too short to contain the embedded data." msgstr "" "muy pocos datos stego en la entrada estandar como para tener datos adjuntos." #: src/Extractor.cc:65 #, c-format msgid "the stego file \"%s\" is too short to contain the embedded data." msgstr "el archivo stego \"%s\" es muy chico para tener datos adjuntos." #: src/Extractor.cc:82 msgid "checking crc32 checksum..." msgstr "revisando checksum crc32..." #: src/Extractor.cc:86 msgid " ok" msgstr " ok" #: src/Extractor.cc:90 msgid " FAILED!" msgstr " ¡FALLÓ!" #: src/Extractor.cc:93 msgid "crc32 checksum failed! extracted data is probably corrupted." msgstr "¡falló la checksum crc32! datos extraídos probablemente inservibles." #: src/Graph.cc:253 #, c-format msgid " %lu sample values, %lu vertices, %lu edges" msgstr " %lu valores d/muestra, %lu vértices, %lu bordes" #: src/JpegFile.cc:73 msgid "can not use standard input as source for jpeg files with libjpeg." msgstr "" "no puedo usar entrada estandar como origen d/archivos jpeg con libjpeg." #: src/MCryptPP.cc:64 src/MCryptPP.cc:249 #, c-format msgid "could not open libmcrypt module \"%s\",\"%s\"." msgstr "no pude abrir el módulo libmcrypt \"%s\",\"%s\"." #: src/MCryptPP.cc:119 msgid "" "could not initialize libmcrypt encryption. see above error messages if any." msgstr "" "no pude inicializar el encriptado libmcrypt. ver arriba si hay algún mensaje " "de error." #: src/MCryptPP.cc:132 msgid "could not encrypt data." msgstr "no pude encriptar los datos" #: src/MCryptPP.cc:154 msgid "could not finish libmcrypt encryption." msgstr "no pude terminar el encriptado libmcrypt." #: src/MCryptPP.cc:185 msgid "" "could not initialize libmcrypt decryption. see above error messages if any." msgstr "" "no pude inicializar desencriptado libmcrypt. ver arriba si hay algún mensaje " "d/error." #: src/MCryptPP.cc:198 msgid "could not decrypt data." msgstr "no pude desencriptar los datos" #: src/MCryptPP.cc:209 msgid "could not finish libmcrypt decryption." msgstr "no pude terminar el encriptado libmcrypt" #: src/MHashKeyGen.cc:61 msgid "could not generate key using libmhash." msgstr "no pude generar una clave usando libmhash" #: src/MHashPP.cc:45 #, c-format msgid "could not initialize libmhash %s algorithm." msgstr "no pude inicializar el algoritmo libmhash %s" #: src/ProgressOutput.cc:79 msgid " done\n" msgstr " hecho\n" #: src/RandomSource.cc:38 msgid "" "could not open /dev/urandom, using standard library random numbers instead." msgstr "" "no pude abrir /dev/urandom. voy a usar librería estandar de nros.aleatorios." #: src/RandomSource.cc:53 msgid "could not close random input file." msgstr "no pude cerrar el archivo aleatorio de entrada." #: src/Session.cc:64 msgid "" "please specify a file name for the extracted data (there is no name embedded " "in the stego file)." msgstr "" "por favor, escriba un nombre d/archivo para l/datos extraídos (no hay ningún " "nombre adjunto en el archivo stego)." #: src/Session.cc:71 msgid "writing extracted data to standard output..." msgstr "enviando los datos extraídos a la salida estandar" #: src/Session.cc:75 #, c-format msgid "writing extracted data to \"%s\"..." msgstr "grabando l/datos extraídos e/\"%s\"..." #: src/Session.cc:94 #, c-format msgid "wrote extracted data to \"%s\"." msgstr "anotó los datos extraídos e/\"%s\"." #: src/Session.cc:138 msgid "data from standard input:\n" msgstr "datos desde entrada estandar:\n" #: src/Session.cc:145 msgid "capacity" msgstr "capacidad" #: src/Session.cc:152 msgid "Try to get information about embedded data ?" msgstr "¿Intenta informarse sobre los datos adjuntos?" #: src/Session.cc:171 msgid " embedded data:\n" msgstr " datos adjuntos:\n" #: src/Session.cc:174 #, c-format msgid " embedded file \"%s\":\n" msgstr " archivo adjunto \"%s\":\n" #: src/Session.cc:177 #, c-format msgid " size: %s\n" msgstr " tamaño: %s\n" #: src/Session.cc:180 src/Session.cc:186 msgid "no" msgstr "no" #: src/Session.cc:185 #, c-format msgid " encrypted: %s\n" msgstr " encriptado: %s\n" #: src/Session.cc:186 #, c-format msgid " compressed: %s\n" msgstr " compactado: %s\n" #: src/Session.cc:186 msgid "yes" msgstr "si" #: src/Session.cc:191 msgid "could not extract any data with that passphrase!\n" msgstr "¡no pude extraer ningún dato con ese salvoconducto!\n" #: src/Session.cc:214 msgid "" "encryption algorithms:\n" ": ...\n" msgstr "" "algoritmos d/encriptado:\n" ": ...\n" #: src/Session.cc:231 msgid "" "steghide has been compiled without support for encryption.\n" "If you want to encrypt your data before embedding it, use an external " "encryption\n" "program or install libmcrypt (http://mcrypt.sourceforge.net/) and recompile " "steghide.\n" msgstr "" "steghide se ha compilado sin reconocimiento de encriptado.\n" "Si quisiéramos encriptar nuestros datos antes d/adjuntarlos,usar 1 programa " "de encriptado\n" "externo o instalar libmcrypt (http://mcrypt.sourceforge.net/) y recompilar " "steghide.\n" #: src/Session.cc:245 msgid "" "\n" "the first argument must be one of the following:\n" " embed, --embed embed data\n" " extract, --extract extract data\n" " info, --info display information about a cover- or stego-file\n" " info display information about \n" " encinfo, --encinfo display a list of supported encryption algorithms\n" " version, --version display version information\n" " license, --license display steghide's license\n" " help, --help display this usage information\n" "\n" "embedding options:\n" " -ef, --embedfile select file to be embedded\n" " -ef embed the file \n" " -cf, --coverfile select cover-file\n" " -cf embed into the file \n" " -p, --passphrase specify passphrase\n" " -p use to embed data\n" " -sf, --stegofile select stego file\n" " -sf write result to instead of cover-file\n" " -e, --encryption select encryption parameters\n" " -e []|[] specify an encryption algorithm and/or mode\n" " -e none do not encrypt data before embedding\n" " -z, --compress compress data before embedding (default)\n" " -z using level (1 best speed...9 best " "compression)\n" " -Z, --dontcompress do not compress data before embedding\n" " -K, --nochecksum do not embed crc32 checksum of embedded data\n" " -N, --dontembedname do not embed the name of the original file\n" " -f, --force overwrite existing files\n" " -q, --quiet suppress information messages\n" " -v, --verbose display detailed information\n" "\n" "extracting options:\n" " -sf, --stegofile select stego file\n" " -sf extract data from \n" " -p, --passphrase specify passphrase\n" " -p use to extract data\n" " -xf, --extractfile select file name for extracted data\n" " -xf write the extracted data to \n" " -f, --force overwrite existing files\n" " -q, --quiet suppress information messages\n" " -v, --verbose display detailed information\n" "\n" "options for the info command:\n" " -p, --passphrase specify passphrase\n" " -p use to get info about embedded data\n" "\n" "To embed emb.txt in cvr.jpg: steghide embed -cf cvr.jpg -ef emb.txt\n" "To extract embedded data from stg.jpg: steghide extract -sf stg.jpg\n" msgstr "" "\n" "el primer argumento debe ser uno de los siguientes:\n" " embed, --embed adjuntar datos\n" " extract, --extract extraer datos\n" " info, --info mostrar información sobre un archivo de portada o " "stego \n" " info mostrar información sobre \n" " encinfo, --encinfo mostrar una lista de algoritmos de encriptado " "reconocidos\n" " version, --version mostrar información de la versión\n" " license, --license ver la licencia de steghide\n" " help, --help ver esta información para su uso\n" "\n" "opciones de los adjuntos:\n" " -ef, --embedfile elegir archivo para adjuntar\n" " -ef adjuntar el archivo \n" " -cf, --coverfile elegir archivo de portada\n" " -cf adjuntar en el archivo \n" " -p, --passphrase declarar salvoconducto\n" " -p usar para adjuntar datos\n" " -sf, --stegofile elegir archivo stego\n" " -sf escribir resultado en en vez de en " "archivo de portada\n" " -e, --encryption elegir parámetros de encriptado\n" " -e []|[] declarar un algoritmo y/o modalidad de encriptado\n" " -e none no encriptar datos antes del adjunto\n" " -z, --compress comprimir datos antes del adjunto (omisión)\n" " -z usando nivel (1 más rápido...9 mejor " "compresión)\n" " -Z, --dontcompress no comprimir datos antes del adjunto\n" " -K, --nochecksum no adjuntar el checksum crc32 de los adjuntos\n" " -N, --dontembedname no adjuntar el nombre del archivo original\n" " -f, --force sobreescribir archivos existentes\n" " -q, --quiet evitar los mensajes informativos\n" " -v, --verbose ver información detallada\n" "\n" "opciones de extracción:\n" " -sf, --stegofile elegir archivo stego\n" " -sf extraer datos de \n" " -p, --passphrase declarar salvoconducto\n" " -p usar para extaer datos\n" " -xf, --extractfile elegir nombre archivo para los datos extraídos\n" " -xf grabar datos extraídos en \n" " -f, --force sobreescribir archivos existentes\n" " -q, --quiet evitar los mensajes informativos\n" " -v, --verbose ver información detallada\n" "\n" "opciones del comando info:\n" " -p, --passphrase declarar salvoconducto\n" " -p usar para obtener información sobre " "datos adjuntos\n" "\n" "Adjuntar adj.txt en cvr.jpg: steghide embed -cf cvr.jpg -ef adj.txt\n" "Extraer datos adjuntos desde stg.jpg: steghide extract -sf stg.jpg\n" #: src/SteghideError.cc:27 msgid "error, exiting. (no error message defined)." msgstr "error, saliendo. (no se definió mensaje error)" #: src/Terminal.cc:31 src/Terminal.cc:39 src/Terminal.cc:53 msgid "could not get terminal attributes." msgstr "no pude obtener atributos del terminal." #: src/Terminal.cc:45 src/Terminal.cc:61 src/Terminal.cc:68 msgid "could not set terminal attributes." msgstr "no pude configurar atributos del terminal." #: src/WavFile.cc:346 #, c-format msgid "an error occured while reading the wav headers from the file \"%s\"." msgstr "" "ocurrió un error mientras leia las cabeceras wav desde el archivo \"%s\"." #: src/WavFile.cc:352 #, c-format msgid "premature end of file \"%s\" while reading wav headers." msgstr "final prematuro de archivo \"%s\" mientras leia las cabeceras wav." #: src/WavFile.cc:358 msgid "an error occured while reading the wav headers from standard input." msgstr "" "ocurrió un error mientras leia las cabeceras wav desde la entrada estandar." #: src/WavFile.cc:364 msgid "premature end of data from standard input while reading wav headers." msgstr "" "final de datos prematuro desde la entrada estandar mientras leia cabeceras " "wav." #: src/WavFile.cc:394 #, c-format msgid "an error occured while writing the wav headers to the file \"%s\"." msgstr "" "ocurrió un error mientras se escribian las cabeceras wav en el archivo \"%s" "\"." #: src/WavFile.cc:400 msgid "an error occured while writing the wav headers to standard output." msgstr "" "ocurrió un error mientras se escribian las cabeceras wav en la salida " "estandar" #: src/WavFormatChunk.cc:31 #, c-format msgid "" "the wav file from standard input has a format that is not supported " "(FormatTag: 0x%X)." msgstr "" "el archivo wav de la entrada estandar tiene un formato no reconocido " "(EtiquetaFormato: 0x%X)." #: src/WavFormatChunk.cc:34 #, c-format msgid "" "the wav file \"%s\" has a format that is not supported (FormatTag: 0x%X)." msgstr "" "el archivo wav \"%s\" tiene un formato no reconocido (EtiquetaFormato: 0x%X)." #: src/WavFormatChunk.cc:49 msgid "" "the wav file from standard input does not have pcm format (header too long)." msgstr "" "archivo wav de entrada estandar carece de formato pcm (cabecera muy larga)." #: src/WavFormatChunk.cc:52 #, c-format msgid "the wav file \"%s\" does not have pcm format (header too long)." msgstr "archivo wav \"%s\" carece de formato pcm (cabecera muy larga)" #: src/WavFormatChunk.cc:57 msgid "the wav file from standard input is corrupted." msgstr "el archivo wav de la entrada estandar está estropeado." #: src/WavFormatChunk.cc:60 #, c-format msgid "the wav file \"%s\" is corrupted." msgstr "el archivo wav \"%s\" está estropeado." #: src/error.cc:45 msgid "type \"steghide --help\" for help." msgstr "escriba \"steghide --help\" para la ayuda." #: src/error.cc:56 msgid "premature end of data from standard input." msgstr "final prematuro de los datos de la entrada estandar." #: src/error.cc:60 #, c-format msgid "premature end of file \"%s\"." msgstr "final prematuro del archivo \"%s\"." #: src/error.cc:66 msgid "an error occured while reading data from standard input." msgstr "ocurrió un error mientras leia información desde entrada estandar." #: src/error.cc:70 #, c-format msgid "an error occured while reading data from the file \"%s\"." msgstr "ocurrió un error mientras leia información desde archivo \"%s\"." #: src/error.cc:93 msgid "an error occured while writing data to standard output." msgstr "ocurrió un error mientras escribia información en entrada estandar." #: src/error.cc:97 #, c-format msgid "an error occured while writing data to the file \"%s\"." msgstr "ocurrió un error mientras escribia información en archivo \"%s\"." #: src/error.cc:119 msgid "the file format of the data from standard input is not supported." msgstr "no existe el formato de archivo para datos de entrada estandar." #: src/error.cc:122 #, c-format msgid "the file format of the file \"%s\" is not supported." msgstr "el formato del archivo \"%s\" no es reconocido." #: src/error.cc:141 msgid "" "This feature is not (yet) available. Please let me (shetzl@chello.at) know\n" "that you want to use this functionality to increase the chance that this " "will\n" "be implemented in the near future. Steghide has to exit now. Sorry.\n" msgstr "" "Utilidad (aún) no disponible. Por favor, avisarme (shetzl@chello.at)\n" "si le interesa usar esta utilidad, para aumentar las probabilidades de que " "pueda \n" "implementarse dentro de poco tiempo. Steghide debe terminar. Lo siento.\n" #: src/error.cc:161 msgid "" "Other possible reasons for this error are that the passphrase is wrong\n" "or that there is no embedded data.\n" msgstr "" "Otras posibles causas para este error son que el salvoconducto sea " "incorrecto\n" "o que no tenga ningún dato adjunto.\n" #: src/msg.cc:35 msgid "__no_message_defined__" msgstr "__no_declaró_mensaje__" #: src/msg.cc:135 src/msg.cc:153 msgid "warning:" msgstr "aviso:" #: src/msg.cc:162 src/msg.cc:169 src/msg.cc:176 msgid "y" msgstr "s" #: src/msg.cc:163 src/msg.cc:170 src/msg.cc:177 msgid "n" msgstr "n" #: src/msg.cc:188 msgid "unknown terminal. you might need to press after answering." msgstr "" "terminal desconocida. podría tener que pulsar después d/responder." steghide-0.5.1/po/fr.po0000644000076400001440000014126307743177373010410 # translation of fr.po to Deutsch # translation of steghide.pot to french # Copyright (C) 2003 Stefan Hetzl. # Cedric Gross , 2003. # Stefan Hetzl , 2003 # msgid "" msgstr "" "Project-Id-Version: fr\n" "POT-Creation-Date: 2003-10-15 10:02+0200\n" "PO-Revision-Date: 2003-09-29 14:09+0200\n" "Last-Translator: Stefan Hetzl \n" "Language-Team: Deutsch\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.0.1\n" #: src/Arguments.cc:84 #, c-format msgid "unknown argument \"%s\"." msgstr "paramètre \"%s\" inconnu." #: src/Arguments.cc:90 msgid "standard input cannot be used for cover data AND data to be embedded." msgstr "" "l'entrée standard ne peut pas être utilisée à la fois pour les données à " "cacher ET les données de couverture." #: src/Arguments.cc:103 src/Arguments.cc:109 msgid "" "if standard input is used, the passphrase must be specified on the command " "line." msgstr "" "si l'entrée standard est utilisée, la passphrase doit être donnée en ligne " "de commande." #: src/Arguments.cc:138 #, c-format msgid "you have to suppy a filename to the \"%s\" command." msgstr "vous devez fournir un nom de fichier à la commande \"%s\"." #: src/Arguments.cc:159 src/Arguments.cc:166 src/Arguments.cc:173 #: src/Arguments.cc:180 #, c-format msgid "you cannot use arguments with the \"%s\" command." msgstr "vous ne pouvez pas utiliser d'arguments avec la commande \"%s\"." #: src/Arguments.cc:195 #, c-format msgid "unknown command \"%s\"." msgstr "commande \"%s\" inconnue." #: src/Arguments.cc:205 src/Arguments.cc:236 src/Arguments.cc:267 #: src/Arguments.cc:351 src/Arguments.cc:396 src/Arguments.cc:440 #: src/Arguments.cc:542 src/Arguments.cc:570 #, c-format msgid "the argument \"%s\" can only be used with the \"%s\" command." msgstr "le paramètre \"%s\" ne peut être utilisé qu'avec la commandes \"%s\"." #: src/Arguments.cc:209 src/Arguments.cc:240 src/Arguments.cc:302 #, c-format msgid "the \"%s\" argument can be used only once." msgstr "le paramètre \"%s\" ne peut utilisé qu'une fois." #: src/Arguments.cc:213 #, c-format msgid "the \"%s\" argument must be followed by the embed file name." msgstr "l'argument \"%s\" doit être suivi du nom du fichier stégo." #: src/Arguments.cc:244 #, c-format msgid "the \"%s\" argument must be followed by the extract file name." msgstr "" "le paramètre \"%s\" doit être suivi par le nom de fichier d'extraction." #: src/Arguments.cc:271 msgid "the cover file name argument can be used only once." msgstr "" "le paramètre du nom de fichier de couverture ne peut être utilisé qu'une " "seule fois." #: src/Arguments.cc:275 #, c-format msgid "the \"%s\" argument must be followed by the cover file name." msgstr "l'argument \"%s\" doit être suivi du nom du fichier-couverture." #: src/Arguments.cc:298 src/Arguments.cc:601 src/Arguments.cc:625 #: src/Arguments.cc:639 #, c-format msgid "" "the argument \"%s\" can only be used with the \"%s\" and \"%s\" commands." msgstr "" "le paramètre \"%s\" ne peut être utilisé qu'avec les commandes \"%s\" and \"%" "s\"." #: src/Arguments.cc:306 #, c-format msgid "the \"%s\" argument must be followed by the stego file name." msgstr "l'argument \"%s\" doit être suivi du nom du fichier stégo." #: src/Arguments.cc:329 msgid "the passphrase argument can be used only once." msgstr "l'argument passphrase peut être utilisé seulement une fois." #: src/Arguments.cc:333 #, c-format msgid "the \"%s\" argument must be followed by the passphrase." msgstr "l'argument \"%s\" doit être suivi de la passphrase." #: src/Arguments.cc:355 msgid "the checksum argument can be used only once." msgstr "le paramètre checksum ne peut être utilisé qu'une seule fois." #: src/Arguments.cc:373 src/Arguments.cc:418 #, c-format msgid "the argument \"%s\" can only be used with the \"embed\" command." msgstr "" "l'argument \"%s\" peut seulement être utilisé avec la commande \"embed\". " #: src/Arguments.cc:377 src/Arguments.cc:400 msgid "the compression argument can be used only once." msgstr "le paramètre compression ne peut être utilisé qu'une seule fois." #: src/Arguments.cc:381 #, c-format msgid "the \"%s\" argument must be followed by the compression level." msgstr "le paramètre \"%s\" doit être suivi par le taux de compression." #: src/Arguments.cc:387 #, c-format msgid "\"%s\" is not a valid compression level." msgstr "\"%s\" n'est pas un taux de compression valable." #: src/Arguments.cc:422 msgid "the file name embedding argument can be used only once." msgstr "le nom de fichier à cacher ne peut être utilisé qu'une seule fois." #: src/Arguments.cc:444 msgid "the encryption argument can be used only once." msgstr "l'argument encryption peut être utilisé une fois seulement." #: src/Arguments.cc:448 src/Arguments.cc:453 #, c-format msgid "the \"%s\" argument must be followed by encryption parameters." msgstr "le paramètre \"%s\" doit être suivi par les paramètres de cryptage." #: src/Arguments.cc:485 src/Arguments.cc:494 #, c-format msgid "\"%s\" is neither an algorithm nor a mode supported by libmcrypt." msgstr "\"%s\" n'est ni un algorithme ni un mode supporté par libmcrypt." #: src/Arguments.cc:499 #, c-format msgid "" "\"%s\" and \"%s\" are both libmcrypt algorithms. please specify only one." msgstr "" "\"%s\" et \"%s\" sont deux algorithmes libmcrypt. Merci d'en préciser qu'un " "seul." #: src/Arguments.cc:502 #, c-format msgid "\"%s\" and \"%s\" are both libmcrypt modes. please specify only one." msgstr "" "\"%s\" et \"%s\" sont deux modes libmcrypt. Merci d'en préciser qu'un seul." #: src/Arguments.cc:519 #, c-format msgid "the encryption algorithm \"%s\" can not be used with the mode \"%s\"." msgstr "L'algorithme \"%s\" ne peut pas être utilisé avec le mode \"%s\"." #: src/Arguments.cc:525 msgid "steghide has been compiled without support for encryption." msgstr "steghide a été compilé sans la fonction de cryptage." #: src/Arguments.cc:546 msgid "the radius argument can be used only once." msgstr "le paramètre de perimètre ne peut être utilisé qu'une seule fois." #: src/Arguments.cc:550 #, c-format msgid "the \"%s\" argument must be followed by the neighbourhood radius." msgstr "le paramètre \"%s\" doit être suivi par le perimètre de voisinage." #: src/Arguments.cc:574 msgid "the goal argument can be used only once." msgstr "le paramètre goal ne peut être utilisé qu'une seule fois." #: src/Arguments.cc:578 src/Arguments.cc:584 #, c-format msgid "the \"%s\" argument must be followed by a number between 0 and 100." msgstr "le paramètre \"%s\" doit être suivi par un chiffre entre 0 et 100." #: src/Arguments.cc:605 msgid "the force argument can be used only once." msgstr "l'argument force peut seulement être utilisé une fois." #: src/Arguments.cc:629 src/Arguments.cc:643 src/Arguments.cc:701 #, c-format msgid "" "the \"%s\" argument cannot be used here because the verbosity has already " "been set." msgstr "" "l'argument \"%s\" ne peut pas être utilisé ici car le mode verbeux a déjà " "été choisi." #: src/Arguments.cc:659 src/Arguments.cc:669 src/Arguments.cc:679 #: src/Arguments.cc:697 msgid "you cannot use more than one debug command at a time." msgstr "" "vous ne pouvez pas utiliser plus d'un arguments de debuggage à la fois." #: src/Arguments.cc:711 msgid "the debug level argument can be used only once." msgstr "" "le paramètre de niveau de debuggage ne peut être utilisé qu'une seule fois." #: src/Arguments.cc:715 #, c-format msgid "the \"%s\" argument must be followed by the debug level." msgstr "l'argument \"%s\" doit être suivi du niveau de debuggage." #: src/Arguments.cc:741 msgid "unknown terminal. the passphrase you type now will be visible." msgstr "" "terminal inconnue. La passphrase que vous saisissez va maintenant être " "visible." #: src/Arguments.cc:745 msgid "Enter passphrase: " msgstr "Entrez la passphrase: " #: src/Arguments.cc:758 msgid "Re-Enter passphrase: " msgstr "Entrez à nouveau la passphrase: " #: src/Arguments.cc:770 msgid "the passphrases do not match." msgstr "les passphrases ne correspondent pas." #: src/AssertionFailed.cc:28 msgid "" "This means that you have found a bug. Please let me (shetzl@chello.at)\n" "know this if you have a way to reproduce the error.\n" "Steghide has to exit now. Sorry.\n" msgstr "" "Ceci signifie que vous avez trouvé un bug. Merci de me le signaler " "(shetzl@chello.at)\n" "si vous un moyen de le reproduire.\n" "Steghide est terminé. Désolé.\n" #: src/AssertionFailed.h:30 #, c-format msgid "assertion failed in %s at line number %d." msgstr "Une assertion erronée a été trouvée dans %s à la ligne numero %d." #: src/AuFile.cc:94 #, c-format msgid "the au file on standard input uses the unkown encoding %d." msgstr "" "le fichier wav à partir de l'entrée standard utilise l'encodage %d inconnu." #: src/AuFile.cc:97 #, c-format msgid "the au file \"%s\" uses the unknown encoding %d." msgstr "le fichier au \"%s\" utilise l'encodage %d inconnu." #: src/AuFile.cc:107 #, c-format msgid "an error occured while reading the au headers from the file \"%s\"." msgstr "" "une erreur a eu lieu lors de la lecture de l'entête au à partir du fichier " "\"%s\"." #: src/AuFile.cc:113 #, c-format msgid "premature end of file \"%s\" while reading au headers." msgstr "fin innattendue du fichier \"%s\" lors de la lecture des entetes au." #: src/AuFile.cc:119 msgid "an error occured while reading the au headers from standard input." msgstr "" "une erreur a eu lieu lors de la lecture de l'entete au à partir de l'entrée " "standard." #: src/AuFile.cc:125 msgid "premature end of data from standard input while reading au headers." msgstr "" "fin prématurée des données lors de la lecture des entetes au à partir de " "l'entrée standard." #: src/AuFile.cc:165 #, c-format msgid "an error occured while writing the au headers to the file \"%s\"." msgstr "" "une erreur a eu lieu lors de l'écriture de l'entête au vers le fichier \"%s" "\"." #: src/AuFile.cc:171 msgid "an error occured while writing the au headers to standard output." msgstr "" "une erreur a eu lieu lors de l'écriture de l'entête au vers la sortie " "standard." #: src/AuFile.cc:188 msgid ", mu-law encoding" msgstr ", encodage mu-law" #: src/AuFile.cc:193 msgid ", PCM encoding" msgstr ", encodage PCM" #: src/AuFile.cc:196 src/BmpFile.cc:87 src/JpegFile.cc:61 src/WavFile.cc:81 msgid "format" msgstr "format" #: src/AudioData.h:94 src/WavFile.cc:249 #, c-format msgid "an error occured while reading the audio data from the file \"%s\"." msgstr "" "une erreur a eu lieu lors de la lecture des données audio à partir du " "fichier \"%s\"." #: src/AudioData.h:100 src/WavFile.cc:253 #, c-format msgid "premature end of file \"%s\" while reading audio data." msgstr "" "fin innattendue du fichier \"%s\" lors de la lecture des données audio." #: src/AudioData.h:106 src/WavFile.cc:257 msgid "an error occured while reading the audio data from standard input." msgstr "" "une erreur a eu lieu lors de la lecture des données audio à partir de " "l'entrée standard." #: src/AudioData.h:112 src/WavFile.cc:261 msgid "premature end of data from standard input while reading audio data." msgstr "" "fin prématurée des données lors de la lecture des données audio à partir de " "l'entrée standard." #: src/AudioData.h:134 src/WavFile.cc:302 #, c-format msgid "an error occured while writing the audio data to the file \"%s\"." msgstr "" "une erreur a eu lieu lors de l'écriture des données audio vers le fichier \"%" "s\"." #: src/AudioData.h:140 src/WavFile.cc:306 msgid "an error occured while writing the audio data to standard output." msgstr "" "une erreur a eu lieu lors de l'écriture des données audio vers la sortie " "standard." #: src/BinaryIO.cc:67 #, c-format msgid "the file \"%s\" does already exist. overwrite ?" msgstr "le fichier \"%s\" existe déjà. l'écraser ?" #: src/BinaryIO.cc:70 #, c-format msgid "did not write to file \"%s\"." msgstr "n'a pas écrit vers le fichier \"%s\"." #: src/BinaryIO.cc:113 #, c-format msgid "could not open the file \"%s\"." msgstr "n'a pas pu ouvrir le fichier \"%s\"." #: src/BinaryIO.cc:137 #, c-format msgid "could not close the file \"%s\"." msgstr "Impossible de fermer le fichier \"%s\"." #: src/BitString.cc:299 src/BitString.cc:347 src/MCryptPP.cc:322 #: src/MHashKeyGen.cc:115 msgid "could not allocate memory." msgstr "Allocation de mémoire impossible" #: src/BitString.cc:303 #, c-format msgid "error %d while calling zlib's compress2." msgstr "erreur %d lors de l'appel zlib compress2." #: src/BitString.cc:351 msgid "can not uncompress data. compressed data is corrupted." msgstr "Impossible de décompresser les données. Données endommagées." #: src/BitString.cc:355 #, c-format msgid "error %d while calling zlib's uncompress." msgstr "erreur %d lors de l'appel zlib uncompress" #: src/BmpFile.cc:80 msgid "Windows 3.x bitmap" msgstr "Windows 3.x bitmap" #: src/BmpFile.cc:84 msgid "OS/2 1.x bitmap" msgstr "OS/2 1.x bitmap" #: src/BmpFile.cc:428 #, c-format msgid "" "the bmp data from standard input has a format that is not supported (biSize: " "%lu)." msgstr "" "les données bmp à partir de l'entrée standard sont dans un format non " "supporté (biSize: %lu)." #: src/BmpFile.cc:431 #, c-format msgid "the bmp file \"%s\" has a format that is not supported (biSize: %lu)." msgstr "le fichier \"%s\" a un format qui n'est pas supporté (biSize: %lu)." #: src/BmpFile.cc:439 #, c-format msgid "an error occured while reading the bmp headers from the file \"%s\"." msgstr "" "une erreur a eu lieu lors de la lecture de l'entête bmp du fichier \"%s\"." #: src/BmpFile.cc:443 #, c-format msgid "premature end of file \"%s\" while reading bmp headers." msgstr "fin innattendue du fichier \"%s\" lors de la lecture des entetes bmp." #: src/BmpFile.cc:447 msgid "an error occured while reading the bmp headers from standard input." msgstr "" "une erreur a eu lieu lors de la lecture de l'entête bmp à partir de l'entrée " "standard." #: src/BmpFile.cc:451 msgid "premature end of data from standard input while reading bmp headers." msgstr "" "fin prématurée des données lors de la lecture des entetes bmp à partir de " "l'entrée standard." #: src/BmpFile.cc:492 #, c-format msgid "" "the bmp data from standard input has a format that is not supported " "(biBitCount: %d)." msgstr "" "les données bmp à partir de l'entrée standard sont dans un format non " "supporté.(biBitCount: %d)." #: src/BmpFile.cc:495 #, c-format msgid "" "the bmp file \"%s\" has a format that is not supported (biBitCount: %d)." msgstr "le fichier \"%s\" a un format qui n'est pas supporté (biBitCount: %d)." #: src/BmpFile.cc:502 msgid "" "the bitmap data from standard input is compressed which is not supported." msgstr "" "les données bitmap à partir de l'entrée standard sont compréssées. ceci " "n'est pas supporté." #: src/BmpFile.cc:505 #, c-format msgid "the bitmap data in \"%s\" is compressed which is not supported." msgstr "" "les données bitmap dans \"%s\" sont compréssées de manière non supportée." #: src/BmpFile.cc:521 src/BmpFile.cc:610 msgid "using a black/white bitmap as cover is very insecure!" msgstr "" "l'utilisation d'un bitmap en noir et blanc comme couverture est très peu " "sûr !" #: src/BmpFile.cc:529 src/BmpFile.cc:618 msgid "using a 16-color bitmap as cover is very insecure!" msgstr "" "l'utilisation d'un bitmap en 16-couleurs comme fichier couverture et très " "peu sûr !" #: src/BmpFile.cc:552 msgid "maybe corrupted windows bmp data (Reserved in RGBQUAD is non-zero)." msgstr "" "possibilité de corruption bmp (reservation dans RGBQUAD n'est pas égale à " "zéro)." #: src/BmpFile.cc:595 #, c-format msgid "" "the bmp data from standard input has a format that is not supported " "(bcBitCount: %d)." msgstr "" "les données bmp à partir de l'entrée standard sont dans un format non " "supporté.(bcBitCount: %d)." #: src/BmpFile.cc:598 #, c-format msgid "" "the bmp file \"%s\" has a format that is not supported (bcBitCount: %d)." msgstr "le fichier \"%s\" a un format qui n'est pas supporté (bcBitCount: %d)." #: src/BmpFile.cc:669 #, c-format msgid "an error occured while writing the bmp headers to the file \"%s\"." msgstr "" "une erreur a eu lieu lors de l'écriture de l'entête bmp vers le fichier \"%s" "\"." #: src/BmpFile.cc:673 msgid "an error occured while writing the bmp headers to standard output." msgstr "" "une erreur a eu lieu lors de l'écriture de l'entête bmp vers la sortie " "standard." #: src/BmpFile.cc:776 #, c-format msgid "maybe corrupted bmp data (padding byte at 0x%lx set to non-zero)." msgstr "" "possibilité de corruption bmp (octet de remplissage différent de zéro à " "l'adresse 0x%lx)." #: src/BmpFile.cc:790 #, c-format msgid "an error occured while reading the bmp data from the file \"%s\"." msgstr "" "une erreur a eu lieu lors de la lecture des données bitmap du fichier \"%s\"." #: src/BmpFile.cc:794 #, c-format msgid "premature end of file \"%s\" while reading bmp data." msgstr "fin innattendue du fichier \"%s\" lors de la lecture des données bmp." #: src/BmpFile.cc:798 msgid "an error occured while reading the bmp data from standard input." msgstr "" "une erreur a eu lieu lors de la lecture des données bitmap à partir de " "l'entrée standard." #: src/BmpFile.cc:802 msgid "premature end of bmp data from standard input." msgstr "fin innatendue des données bmp à partir de l'entrée standard." #: src/BmpFile.cc:840 #, c-format msgid "an error occured while writing the bitmap data to the file \"%s\"." msgstr "" "une erreur a eu lieu lors de l'écriture des données bitmap vers le fichier " "\"%s\"." #: src/BmpFile.cc:844 msgid "an error occured while writing the bitmap data to standard output." msgstr "" "une erreur a eu lieu lors de l'écriture des données bitmap vers la sortie " "standard." #: src/CvrStgFile.cc:212 msgid "" "can not read input file. steghide has been compiled without support for jpeg " "files." msgstr "" "Impossible de lire le fichier entrant. steghide a été compilé sans le " "support jpeg." #: src/EmbData.cc:91 msgid "could not extract any data with that passphrase!" msgstr "impossible d'extraire des données avec cette passphrase!" #: src/EmbData.cc:107 #, c-format msgid "" "attempting to read an embedding of version %d but steghide %s only supports " "embeddings of version %d." msgstr "" "Essaie de lecture d'une inclusion de version %d mais steghide %s supporte " "seulement la version %d." #: src/EmbData.cc:137 msgid "" "The embedded data is encrypted but steghide has been compiled without " "encryption\n" "support. To be able to read the embedded data, you have to install " "libmcrypt\n" "(http://mcrypt.sourceforge.net/) and recompile steghide." msgstr "" "Les données attachées sont cryptées mais steghide a été compilé sans la " "fonctionnalité de cryptage.\n" "Poue être en mesure de lire les données incorporées, vous devez installer " "libmcrypt\n" "(http://mcrypt.sourceforge.net/) et recompiler steghide." #: src/EmbData.cc:226 msgid "the embedded data has an invalid length." msgstr "La longueur des données incorporées est incorrecte." #: src/Embedder.cc:48 msgid "reading secret data from standard input..." msgstr "lecture des données à cacher à partir de l'entrée standard." #: src/Embedder.cc:51 #, c-format msgid "reading secret file \"%s\"..." msgstr "lecture du fichier à cacher \"%s\"." #: src/Embedder.cc:63 src/Extractor.cc:46 src/ProgressOutput.cc:71 #: src/Session.cc:88 msgid " done" msgstr " terminé." #: src/Embedder.cc:84 msgid "reading cover file from standard input..." msgstr "lecture du fichier-couverture à partir de l'entrée standard." #: src/Embedder.cc:87 #, c-format msgid "reading cover file \"%s\"..." msgstr "lecture du fichier-couverture \"%s\"." #: src/Embedder.cc:98 msgid "the cover file is too short to embed the data." msgstr "le fichier-couverture est trop petit pour cacher les données." #: src/Embedder.cc:104 msgid "creating the graph..." msgstr "creation du graphique..." #: src/Embedder.cc:148 src/Embedder.cc:154 msgid "standard input" msgstr "entrée standard" #: src/Embedder.cc:160 #, c-format msgid "embedding %s in %s..." msgstr "camouflage des données de %s dans %s." #: src/Embedder.cc:189 msgid "writing stego file to standard output... " msgstr "écriture du fichier stégo vers la sortie standard." #: src/Embedder.cc:194 #, c-format msgid "writing stego file \"%s\"... " msgstr "écriture du fichier stégo \"%s\"... " #: src/Embedder.cc:204 msgid "done" msgstr "terminé." #: src/Embedder.cc:217 #, c-format msgid "executing %s..." msgstr "execution %s..." #: src/Extractor.cc:36 msgid "reading stego file from standard input..." msgstr "lecture du fichier stégo à partir de l'entrée standard." #: src/Extractor.cc:39 #, c-format msgid "reading stego file \"%s\"..." msgstr "lecture du fichier stégo \"%s\"." #: src/Extractor.cc:52 msgid "extracting data..." msgstr "extraction des données cachées." #: src/Extractor.cc:62 msgid "" "the stego data from standard input is too short to contain the embedded data." msgstr "" "les données stégo de l'entrée standard sont trop petites pour contenir les " "données." #: src/Extractor.cc:65 #, c-format msgid "the stego file \"%s\" is too short to contain the embedded data." msgstr "le fichier stégo \"%s\" est trop petit pour contenir les données." #: src/Extractor.cc:82 msgid "checking crc32 checksum..." msgstr "verification de la somme de contrôle crc32..." #: src/Extractor.cc:86 msgid " ok" msgstr " ok" #: src/Extractor.cc:90 msgid " FAILED!" msgstr " ECHEC!" #: src/Extractor.cc:93 msgid "crc32 checksum failed! extracted data is probably corrupted." msgstr "" "le checksum crc32 a échoué! les données extraites sont probablement " "corrompues." #: src/Graph.cc:253 #, c-format msgid " %lu sample values, %lu vertices, %lu edges" msgstr " %lu echantillons, %lu sommets, %lu bords" #: src/JpegFile.cc:73 msgid "can not use standard input as source for jpeg files with libjpeg." msgstr "" "Impossible d'utilisé l'entrée standard comme source des fichiers jpeg avec " "libjpeg." #: src/MCryptPP.cc:64 src/MCryptPP.cc:249 #, c-format msgid "could not open libmcrypt module \"%s\",\"%s\"." msgstr "n'a pas pu ouvrir le module libmcrypt \"%s\",\"%s\"." #: src/MCryptPP.cc:119 msgid "" "could not initialize libmcrypt encryption. see above error messages if any." msgstr "" "n'a pas pu initialiser le chiffrement libmcrypt. voir au dessus les messages " "d'erreur, s'il y en a." #: src/MCryptPP.cc:132 msgid "could not encrypt data." msgstr "Cryptage impossible." #: src/MCryptPP.cc:154 msgid "could not finish libmcrypt encryption." msgstr "Impossible de terminer le cryptage libmcrypt." #: src/MCryptPP.cc:185 msgid "" "could not initialize libmcrypt decryption. see above error messages if any." msgstr "" "n'a pas pu initialiser le déchiffrement libmcrypt. voir au dessus les " "messages d'erreur, s'il y en a." #: src/MCryptPP.cc:198 msgid "could not decrypt data." msgstr "Decryptage impossible." #: src/MCryptPP.cc:209 msgid "could not finish libmcrypt decryption." msgstr "Impossible de terminer le decryptage libmcrypt." #: src/MHashKeyGen.cc:61 msgid "could not generate key using libmhash." msgstr "Impossible de générer une clé en utilisant libmhash." #: src/MHashPP.cc:45 #, c-format msgid "could not initialize libmhash %s algorithm." msgstr "impossible d'initialiser l'algorithme libmhash %s." #: src/ProgressOutput.cc:79 msgid " done\n" msgstr " terminé.\n" #: src/RandomSource.cc:38 msgid "" "could not open /dev/urandom, using standard library random numbers instead." msgstr "" "Impossible d'ouvrir /dev/urandom, utilisation de la librairie standard des " "nombres aléatoires à la place." #: src/RandomSource.cc:53 msgid "could not close random input file." msgstr "Impossible de fermer le fichier entrant \"%s\"." #: src/Session.cc:64 msgid "" "please specify a file name for the extracted data (there is no name embedded " "in the stego file)." msgstr "" "choisissez svp un nom pour le fichier d'extraction (il n'y en a aucun " "spécifié dans le fichier stégo)." #: src/Session.cc:71 msgid "writing extracted data to standard output..." msgstr "écriture des données extraites sur la sortie standard." #: src/Session.cc:75 #, c-format msgid "writing extracted data to \"%s\"..." msgstr "écriture des données extraites dans \"%s\"..." #: src/Session.cc:94 #, c-format msgid "wrote extracted data to \"%s\"." msgstr "écriture des données extraites dans \"%s\"." #: src/Session.cc:138 msgid "data from standard input:\n" msgstr "Données obtenues à partir de l'entrée standard:\n" #: src/Session.cc:145 msgid "capacity" msgstr "capacité" #: src/Session.cc:152 msgid "Try to get information about embedded data ?" msgstr "Essayer d'obtenir des informations à propos des données incorporées ?" #: src/Session.cc:171 msgid " embedded data:\n" msgstr " données attachées:\n" #: src/Session.cc:174 #, c-format msgid " embedded file \"%s\":\n" msgstr " fichier à inclure \"%s\":\n" #: src/Session.cc:177 #, c-format msgid " size: %s\n" msgstr " taille: %s\n" #: src/Session.cc:180 src/Session.cc:186 msgid "no" msgstr "non" #: src/Session.cc:185 #, c-format msgid " encrypted: %s\n" msgstr " cryptage: %s\n" #: src/Session.cc:186 #, c-format msgid " compressed: %s\n" msgstr " compression: %s\n" #: src/Session.cc:186 msgid "yes" msgstr "oui" #: src/Session.cc:191 msgid "could not extract any data with that passphrase!\n" msgstr "impossible d'extraire des données avec cette passphrase!\n" #: src/Session.cc:214 msgid "" "encryption algorithms:\n" ": ...\n" msgstr "" "algorithme de cryptage :\n" ": ...\n" #: src/Session.cc:231 msgid "" "steghide has been compiled without support for encryption.\n" "If you want to encrypt your data before embedding it, use an external " "encryption\n" "program or install libmcrypt (http://mcrypt.sourceforge.net/) and recompile " "steghide.\n" msgstr "" "steghide a été compilé sans la fonction de cryptage.Si vous souhaitez crypté " "vos données avant de les incorporer, utilisez un programme externe de " "cryptage\n" "ou installez libmcrypt (http://mcrypt.sourceforge.net/) et recompilez " "steghide.\n" #: src/Session.cc:245 msgid "" "\n" "the first argument must be one of the following:\n" " embed, --embed embed data\n" " extract, --extract extract data\n" " info, --info display information about a cover- or stego-file\n" " info display information about \n" " encinfo, --encinfo display a list of supported encryption algorithms\n" " version, --version display version information\n" " license, --license display steghide's license\n" " help, --help display this usage information\n" "\n" "embedding options:\n" " -ef, --embedfile select file to be embedded\n" " -ef embed the file \n" " -cf, --coverfile select cover-file\n" " -cf embed into the file \n" " -p, --passphrase specify passphrase\n" " -p use to embed data\n" " -sf, --stegofile select stego file\n" " -sf write result to instead of cover-file\n" " -e, --encryption select encryption parameters\n" " -e []|[] specify an encryption algorithm and/or mode\n" " -e none do not encrypt data before embedding\n" " -z, --compress compress data before embedding (default)\n" " -z using level (1 best speed...9 best " "compression)\n" " -Z, --dontcompress do not compress data before embedding\n" " -K, --nochecksum do not embed crc32 checksum of embedded data\n" " -N, --dontembedname do not embed the name of the original file\n" " -f, --force overwrite existing files\n" " -q, --quiet suppress information messages\n" " -v, --verbose display detailed information\n" "\n" "extracting options:\n" " -sf, --stegofile select stego file\n" " -sf extract data from \n" " -p, --passphrase specify passphrase\n" " -p use to extract data\n" " -xf, --extractfile select file name for extracted data\n" " -xf write the extracted data to \n" " -f, --force overwrite existing files\n" " -q, --quiet suppress information messages\n" " -v, --verbose display detailed information\n" "\n" "options for the info command:\n" " -p, --passphrase specify passphrase\n" " -p use to get info about embedded data\n" "\n" "To embed emb.txt in cvr.jpg: steghide embed -cf cvr.jpg -ef emb.txt\n" "To extract embedded data from stg.jpg: steghide extract -sf stg.jpg\n" msgstr "" "\n" "le premier argument doit être un des suivants:\n" " embed, --embed cacher des données\n" " extract, --extract extrait les données cachées à partir de données " "stégo.\n" " info, --info affiche les informations sur un fichier de " "couverture\n" " info affiche les informations sur le fichier \n" " encinfo, --encinfo affiche une liste des algorithmes de cryptage " "gerés\n" " version, --version affiche les informations sur la version du " "programme.\n" " license, --license affiche la license de steghide.\n" " help, --help affiche ce message d'aide.\n" "\n" "options pour le camouflage de données uniquement:\n" " -ef, --embedfile selectionne le fichier de données\n" " -ef utilise comme fichier de données.\n" " -cf, --coverfile sélectionne le fichier-couverture\n" " -cf utilise comme fichier couverture\n" " -p, --passphrase spécifie la passphrase\n" " -p utilise comme passphrase\n" " -sf, --stegofile sélectionne le fichier stégo\n" " -sf utilise comme fichier stégo au lieu du " "fichier de couverture\n" " -e, --encryption selectionne les paramètres de cryptage\n" " -e []|[] precise l'algorithme de cryptage et/ou le mode\n" " -e none ne chiffre pas les données avant de les cacher\n" " -z, --compress compresse les données avant inclusion (par défaut)\n" " -z en utilisant le niveau (1 Meilleur vitesse...9 " "Meilleur compression)\n" " -Z, --dontcompress Ne pas compresser les données avant inclusion\n" " -K, --nochecksum n'encapsule pas le checksum crc32 des données\n" " -N, --notembedplainname n'encapsule pas le nom du fichier de données.\n" " -f, --force écrase les fichiers existants\n" " -q, --quiet supprime les messages d'information\n" " -v, --verbose affiche des informations détaillées\n" "\n" "options l'extraction:\n" " -sf, --stegofile sélectionne le fichier stégo\n" " -sf extrait les données du fichier \n" " -p, --passphrase spécifie la passphrase\n" " -p utilise comme passphrase\n" " -xf, --extractfile sélectionne le fichier pour les données extraites\n" " -xf utilise pour ecrire les données " "extraites\n" " -f, --force écrase les fichiers existants\n" " -q, --quiet supprime les messages d'information\n" " -v, --verbose affiche des informations détaillées\n" "\n" "options les informations:\n" " -p, --passphrase spécifie la passphrase\n" " -p utilise comme passphrase\n" "\n" "Pour inclure emb.txt dans cvr.jpg : steghide embed -cf cvr.jpg -ef emb.txt\n" "Pour extrait les données de stg.jpg: steghide extract -sf stg.jpg\n" #: src/SteghideError.cc:27 msgid "error, exiting. (no error message defined)." msgstr "erreur, fin du programme. (pas de message d'erreur spécifié)" #: src/Terminal.cc:31 src/Terminal.cc:39 src/Terminal.cc:53 msgid "could not get terminal attributes." msgstr "impossible de determiner les propriétés du terminal." #: src/Terminal.cc:45 src/Terminal.cc:61 src/Terminal.cc:68 msgid "could not set terminal attributes." msgstr "n'a pas pu fixer les propriétés du terminal." #: src/WavFile.cc:346 #, c-format msgid "an error occured while reading the wav headers from the file \"%s\"." msgstr "" "une erreur a eu lieu lors de la lecture de l'entête wav à partir du fichier " "\"%s\"." #: src/WavFile.cc:352 #, c-format msgid "premature end of file \"%s\" while reading wav headers." msgstr "fin innatendue du fichier \"%s\" lors de la lecture des entetes wav." #: src/WavFile.cc:358 msgid "an error occured while reading the wav headers from standard input." msgstr "" "une erreur a eu lieu lors de la lecture de l'entete wav à partir de l'entrée " "standard." #: src/WavFile.cc:364 msgid "premature end of data from standard input while reading wav headers." msgstr "" "fin prématurée des données lors de la lecture des entetes wav à partir de " "l'entrée standard." #: src/WavFile.cc:394 #, c-format msgid "an error occured while writing the wav headers to the file \"%s\"." msgstr "" "une erreur a eu lieu lors de l'écriture de l'entête wav vers le fichier \"%s" "\"." #: src/WavFile.cc:400 msgid "an error occured while writing the wav headers to standard output." msgstr "" "une erreur a eu lieu lors de l'écriture de l'entête wav vers la sortie " "standard." #: src/WavFormatChunk.cc:31 #, c-format msgid "" "the wav file from standard input has a format that is not supported " "(FormatTag: 0x%X)." msgstr "" "le fichier wav de l'entrée standard est dans un format non supporté (Tag de " "format: 0x%X)." #: src/WavFormatChunk.cc:34 #, c-format msgid "" "the wav file \"%s\" has a format that is not supported (FormatTag: 0x%X)." msgstr "" "le fichier wav \"%s\" est dans un format non supporté (Tag de format: 0x%X)." #: src/WavFormatChunk.cc:49 msgid "" "the wav file from standard input does not have pcm format (header too long)." msgstr "" "le fichier wav de l'entrée standard n'a pas de format pcm (en-tête trop " "longue)." #: src/WavFormatChunk.cc:52 #, c-format msgid "the wav file \"%s\" does not have pcm format (header too long)." msgstr "le fichier wav \"%s\" n'a pas de format pcm (en-tête trop longue)." #: src/WavFormatChunk.cc:57 msgid "the wav file from standard input is corrupted." msgstr "le fichier wav à partir de l'entrée standard est corrompu." #: src/WavFormatChunk.cc:60 #, c-format msgid "the wav file \"%s\" is corrupted." msgstr "le fichier wav \"%s\" est endommagé." #: src/error.cc:45 msgid "type \"steghide --help\" for help." msgstr "tapez \"steghide --help\" pour l'aide." #: src/error.cc:56 msgid "premature end of data from standard input." msgstr "fin prématurée des données à partir de l'entrée standard." #: src/error.cc:60 #, c-format msgid "premature end of file \"%s\"." msgstr "fin innattendue du fichier \"%s\"." #: src/error.cc:66 msgid "an error occured while reading data from standard input." msgstr "" "une erreur a eu lieu lors de la lecture des données à partir de l'entrée " "standard." #: src/error.cc:70 #, c-format msgid "an error occured while reading data from the file \"%s\"." msgstr "" "une erreur a eu lieu lors de la lecture des données à partir du fichier \"%s" "\"." #: src/error.cc:93 msgid "an error occured while writing data to standard output." msgstr "" "une erreur a eu lieu lors de l'écriture des données vers la sortie standard." #: src/error.cc:97 #, c-format msgid "an error occured while writing data to the file \"%s\"." msgstr "" "une erreur a eu lieu lors de l'écriture des données vers le fichier \"%s\"." #: src/error.cc:119 msgid "the file format of the data from standard input is not supported." msgstr "" "le format de données du fichier à partir de l'entrée standard n'est pas " "supporté." #: src/error.cc:122 #, c-format msgid "the file format of the file \"%s\" is not supported." msgstr "le format du fichier \"%s\" n'est pas supporté." #: src/error.cc:141 msgid "" "This feature is not (yet) available. Please let me (shetzl@chello.at) know\n" "that you want to use this functionality to increase the chance that this " "will\n" "be implemented in the near future. Steghide has to exit now. Sorry.\n" msgstr "" "Cette fonction n'est pas (encore) disponible. Merci de me dire " "(shetzl@chello.at) \n" "vous souhaitez cette fonction pour augmenter les chances qu'elle soit " "implemantée\n" "dans un futur proche. Steghide est terminé. Désolé.\n" #: src/error.cc:161 msgid "" "Other possible reasons for this error are that the passphrase is wrong\n" "or that there is no embedded data.\n" msgstr "" "L'une des raisons de cette erreur est que la passphrase est fausse\n" "ou qu'il n'y a pas de données attachées.\n" #: src/msg.cc:35 msgid "__no_message_defined__" msgstr "__aucun_message_spécifié__" #: src/msg.cc:135 src/msg.cc:153 msgid "warning:" msgstr "attention: " #: src/msg.cc:162 src/msg.cc:169 src/msg.cc:176 msgid "y" msgstr "o" #: src/msg.cc:163 src/msg.cc:170 src/msg.cc:177 msgid "n" msgstr "n" #: src/msg.cc:188 msgid "unknown terminal. you might need to press after answering." msgstr "terminal inconnu. Vous devez appuyer sur après la réponse." #~ msgid "the \"%s\" argument must be followed by a number between 0 and %d." #~ msgstr "le paramètre \"%s\" doit être suivi par un chiffre entre 0 et %d." #, fuzzy #~ msgid "" #~ "the \"%s\" argument must be followed by the number of times the " #~ "construction heuristic should be run." #~ msgstr "" #~ "le paramètre \"%s\" doit être suivi par le nombre de fois que la " #~ "construction heuristicdoit être effectuée." #, fuzzy #~ msgid "the \"%s\" argument must be followed by the priority queue range." #~ msgstr "le paramètre \"%s\" doit être suivi par ...?" #~ msgid "the algorithm argument can be used only once." #~ msgstr "le paramètre algorithme ne peut être utilisé qu'une fois." #~ msgid "the file \"%s\" does already exist." #~ msgstr "le fichier \"%s\" existe déjà." #~ msgid "the number construction heuristic argument can be used only once." #~ msgstr "" #~ "le nombre de construction heuristic ne peut être utilisé qu'une seule " #~ "fois." #, fuzzy #~ msgid "the priority queue range argument can be used only once." #~ msgstr "" #~ "le paramètre de fourchette de priorité de file ne peut être utilisé " #~ "qu'une seule fois." #, fuzzy #~ msgid "the embed file name argument can be used only once." #~ msgstr "" #~ "le nom du fichier stégo peut être utilisé en argument seulement une fois. " #~ "tapez \"%s --help\"pour l'aide." #, fuzzy #~ msgid "the extract file name argument can be used only once." #~ msgstr "" #~ "le nom du fichier-couverture peut seulement être utilisé une fois en " #~ "argument. tapez pour l'aide." #, fuzzy #~ msgid "the \"%s\" argument must be followed by the plain file name." #~ msgstr "" #~ "l'argument \"%s\" doit être suivi du nom du fichier de données. tapez \"%" #~ "s --help\" pour l'aide." #, fuzzy #~ msgid "the stego file name argument can be used only once." #~ msgstr "" #~ "le nom du fichier stégo peut être utilisé en argument seulement une fois. " #~ "tapez \"%s --help\"pour l'aide." #, fuzzy #~ msgid "the only argument for the \"capacity\" command is a filename." #~ msgstr "" #~ "l'argument \"%s\" ne peut pas être utilisé ici car le mode verbeux a déjà " #~ "été choisi." #, fuzzy #~ msgid "you cannot use arguments with the \"encinfo\" command." #~ msgstr "" #~ "vous ne pouvez pas utilisez d'arguments avec la commande \"version\"." #, fuzzy #~ msgid "you cannot use arguments with the \"version\" command." #~ msgstr "" #~ "vous ne pouvez pas utilisez d'arguments avec la commande \"version\"." #, fuzzy #~ msgid "argument \"%s\" can only be used with the \"extract\" command." #~ msgstr "" #~ "l'argument \"%s\" peut seulement être utilisé avec la commande \"embed\". " #~ "tapez \"%s --help\" pour l'aide." #, fuzzy #~ msgid "the argument \"%s\" can not be used with the \"extract\" command." #~ msgstr "" #~ "l'argument \"%s\" peut seulement être utilisé avec la commande \"embed\". " #~ "tapez \"%s --help\" pour l'aide." #, fuzzy #~ msgid "the \"%s\" argument can not be used with the \"capacity\" command." #~ msgstr "" #~ "l'argument \"%s\" ne peut pas être utilisé ici car le mode verbeux a déjà " #~ "été choisi." #, fuzzy #~ msgid "the \"%s\" argument cannot be used with the \"capacity\" command." #~ msgstr "" #~ "l'argument \"%s\" ne peut pas être utilisé ici car le mode verbeux a déjà " #~ "été choisi." #, fuzzy #~ msgid "argument \"%s\" can only be used with the \"embed\" command." #~ msgstr "" #~ "l'argument \"%s\" peut seulement être utilisé avec la commande \"embed\". " #~ "tapez \"%s --help\" pour l'aide." #~ msgid "corrupt jpeg file on standard input:" #~ msgstr "fichier jpeg corrompu à partir de l'entrée standard." #~ msgid "corrupt jpeg file \"%s\":" #~ msgstr "fichier jpeg \"%s\" corrompu." #, fuzzy #~ msgid "" #~ "the embedded data is compressed. this is not implemented in this version " #~ "(file corruption ?)." #~ msgstr "" #~ "les données cachées sont compréssées. ceci n'est pas encore implémenté " #~ "(fichier corrompu ?)." #, fuzzy #~ msgid "the maximum length for the embedded file's name is %d characters." #~ msgstr "la longueur maximale du fichier de données est de %d caractères." #~ msgid "entropy coded data interrupted by marker 0x%x." #~ msgstr "données codées aléatoirement intérompues par le marqueur 0x%x." #~ msgid "could not find start of marker (0xff)." #~ msgstr "n'a pas pu trouver le début de la marque (0xff)." #~ msgid "huffman table has destination specifier %u (0-3 is allowed)." #~ msgstr "" #~ "la table huffman a comme spécificateur de destination %u (valeurs 0-3 " #~ "permises)." #~ msgid "" #~ "the jpeg file on standard input uses progressive DCT mode which is not " #~ "supported in this version." #~ msgstr "" #~ "le fichier jpeg à partir de l'entrée standard utilise le mode DCT " #~ "progressif qui n'est pas supporté dans cette version." #~ msgid "" #~ "the jpeg file \"%s\" uses progressive DCT mode which is not supported in " #~ "this version." #~ msgstr "" #~ "le fichier jpeg \"%s\" utilise le mode progressif DCT qui n'est pas " #~ "supporté dans cette version." #~ msgid "" #~ "encountered unknown marker code 0x%x in jpeg file on standard input while " #~ "reading frame." #~ msgstr "" #~ "a recontré un code marqueur 0x%x inconnu dans le fichier jpeg à partir de " #~ "l'entrée standard, lors de la lecture frame." #~ msgid "" #~ "encountered unknown marker code 0x%x in jpeg file \"%s\" while reading " #~ "frame." #~ msgstr "" #~ "a rencontré un un code marqueur 0x%x inconnu dans le fichier jpeg \"%s\" " #~ "lors de la lecture frame." #~ msgid "the version of the jpeg file on standard input is not supported." #~ msgstr "" #~ "la version du fichier jpeg à partir de l'entrée standard n'est pas " #~ "supportée." #~ msgid "the version of the jpeg file \"%s\" is not supported." #~ msgstr "la version du fichier jpeg \"%s\" n'est pas supporté." #~ msgid "" #~ "encountered unknown marker code 0x%x in jpeg file on standard input while " #~ "reading scan." #~ msgstr "" #~ "a rencontré un code marqueur 0x%x inconnu dans le fichier jpeg à partir " #~ "de l'entrée standard, lors de la lecture scan." #~ msgid "" #~ "encountered unknown marker code 0x%x in jpeg file \"%s\" while reading " #~ "scan." #~ msgstr "" #~ "a rencontré un code marqueur 0x%x inconnu dans le fichier jpeg \"%s\" " #~ "lors de la lecture scan." #~ msgid "an error occured while reading the file \"%s\"." #~ msgstr "une erreur a eu lieu lors de la lecture du fichier \"%s\"." #~ msgid "an error occured while reading the plain data from standard input." #~ msgstr "" #~ "une erreur a eu lieu lors de la lecture des données à cacher à partir de " #~ "l'entrée standard." #~ msgid "an error occured while writing the plain data to standard output." #~ msgstr "" #~ "une erreur a eu lieu lors de l'écriture des données cachées vers la " #~ "sortie standard." #~ msgid "an error occured while writing to the file \"%s\"." #~ msgstr "une erreur a eu lieu lors de l'écriture vers le fichier \"%s\"." #~ msgid "could not create plain file \"%s\"." #~ msgstr "n'a pas pu créer le fichier de données cachées \"%s\"." #~ msgid "could not decrypt plain data. failed at block number %ul" #~ msgstr "" #~ "n'a pas pu déchiffrer les données cachées. a échoué au bloc numéro %ul" #~ msgid "could not encrypt plain data. failed at block number %lu" #~ msgstr "" #~ "n'a pas pu chiffrer les données à cacher. a échoué au bloc numéro %lu" #~ msgid "could not find the format chunk in the wav file \"%s\"." #~ msgstr "" #~ "n'a pas pu trouver les informations nécéssaires dans le fichier wav \"%s\"" #~ msgid "could not find the format chunk in the wav file from standard input." #~ msgstr "" #~ "n'a pas pu trouver les informations nécéssaires pour le fichier wav à " #~ "partir de l'entrée standard." #~ msgid "could not finish decryption of stego header." #~ msgstr "n'a pas pu finir le déchiffrement de l'entête stégo." #~ msgid "could not finish encryption of stego header." #~ msgstr "n'a pas pu le chiffrement de l'entête stégo." #~ msgid "could not initialize libmhash CRC32 algorithm." #~ msgstr "n'a pas pu initialiser l'algorithme libmhash CRC32." #~ msgid "could not open file \"%s\"." #~ msgstr "n'a pas pu ouvrir le fichier \"%s\"." #~ msgid "could not reallocate memory." #~ msgstr "n'a pas pu ré-allouer la mémoire." #~ msgid "decrypting plain data." #~ msgstr "déchiffrement des données cachées." #~ msgid "embedding stego header." #~ msgstr "camouflage de l'entête stégo." #~ msgid "encrypting plain data." #~ msgstr "chiffrement des données à cacher." #~ msgid "extracting stego header." #~ msgstr "extraction de l'entête stégo." #~ msgid "reading plain file \"%s\"." #~ msgstr "lecture du fichier de données \"%s\"." #~ msgid "reading plain file from standard input." #~ msgstr "lecture du fichier de données à partir de l'entrée standard?" #~ msgid "setting interval length to %d." #~ msgstr "longueur de l'intervalle fixée à %d." #~ msgid "setting maximum interval length to %d." #~ msgstr "longueur maximale de l'intervalle fixée à %d." #~ msgid "the argument \"%s\" is incomplete. type \"%s --help\" for help." #~ msgstr "l'argument \"%s\" est incomplet. tapez \"%s --help\" pour l'aide." #~ msgid "" #~ "the bits/sample rate of the wav file \"%s\" is not a multiple of eight." #~ msgstr "" #~ "le nombre de bits du fichier wav \"%s\" n'est pas un multiple de huit." #~ msgid "" #~ "the bits/sample rate of the wav file from standard input is not a " #~ "multiple of eight." #~ msgstr "" #~ "le nombre de bits du fichier wav à partir de l'entrée standard n'est pas " #~ "un multiple de huit." #~ msgid "" #~ "the compatibility argument can be used only once. type \"%s --help\" for " #~ "help." #~ msgstr "" #~ "l'argument compatibility peut être utilisé une fois seulement. tapez \"%s " #~ "--help\" pour l'aide." #~ msgid "" #~ "the cover file is too short to embed the plain data. try a smaller " #~ "interval length." #~ msgstr "" #~ "le fichier-couverture est trop petit pour cacher les données. essayez un " #~ "intervalle plus court." #~ msgid "" #~ "the cover file is too short to embed the stego header. use another cover " #~ "file." #~ msgstr "" #~ "le fichier-couverture est trop petit pour cacher l'entête stégo. utilisez " #~ "un autre fichier-couverture." #~ msgid "" #~ "the distribution method saved in the stego header is unknown (file " #~ "corruption ?)." #~ msgstr "" #~ "la méthode de distribution présente dans l'entête stégo est inconnue " #~ "(fichier corrompu?)." #~ msgid "the interval length for the cnsti method must be smaller than %d." #~ msgstr "" #~ "la longueur d'intervalle pour la méthode cnsti doit être plus petite que %" #~ "d." #~ msgid "" #~ "the mask saved in the stego header is not the default (1). This is no " #~ "longer supported (file corruption ?)." #~ msgstr "" #~ "le masque spécifié dans l'entête stégo n'est pas celui par défaut (1). " #~ "Ceci n'est plus supporté (fichier corrompu ?)." #~ msgid "the mask saved in the stego header is zero (file corruption ?)." #~ msgstr "" #~ "le masque spécifié dans l'entête stégo est zéro (fichier corrompu ?)." #~ msgid "" #~ "the maximum interval length for the prndi method must be smaller than %d." #~ msgstr "" #~ "la longueur maximale d'intervalle pour la méthode prndi doit être plus " #~ "petite que %d." #~ msgid "the maximum length of the passphrase is %d characters." #~ msgstr "la longueur maximale de la passphrase est de %d caractères." #~ msgid "" #~ "the stego file is too short to contain the stego header (file " #~ "corruption ?)." #~ msgstr "" #~ "le fichier stégo est trop petit pour contenir l'entête stégo (fichier " #~ "corrompu ?)." #~ msgid "" #~ "the stego header encryption argument can be used only once. type \"%s --" #~ "help\" for help." #~ msgstr "" #~ "l'argument stego header encryption peut seulement être utilisé une fois " #~ "seulement. tapez \"%s --help\" pour l'aide." #~ msgid "unknown distribution method \"%s\". type \"%s --help\" for help." #~ msgstr "" #~ "méthode de distribution \"%s\" inconnues. tapez \"%s --help\" pour l'aide." #~ msgid "writing plain file to \"%s\"." #~ msgstr "écriture du fichier de données vers \"%s\"." #~ msgid "writing plain file to standard output." #~ msgstr "écriture du fichier de données vers la sortie standard." steghide-0.5.1/po/LINGUAS0000644000076400001440000000005107741743023010440 # Set of available languages es de fr ro steghide-0.5.1/po/ro.po0000644000076400001440000011261007743177373010413 # romanian translation of steghide 0.5.1 messages # Copyright (C) 2003 Stefan Hetzl # This file is distributed under the same license as the steghide package. # msgid "" msgstr "" "Project-Id-Version: steghide 0.5.1\n" "POT-Creation-Date: 2003-10-15 10:02+0200\n" "PO-Revision-Date: 2003-10-11 09:31+2\n" "Last-Translator: TRIMBITAS SORIN \n" "Language-Team: ROMANIAN \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: src/Arguments.cc:84 #, c-format msgid "unknown argument \"%s\"." msgstr "argument necunoscut \"%s\"." #: src/Arguments.cc:90 msgid "standard input cannot be used for cover data AND data to be embedded." msgstr "" "intrarea standard nu poate fi folosita pentru a ascunde date SI de a " "incorpora date." #: src/Arguments.cc:103 src/Arguments.cc:109 msgid "" "if standard input is used, the passphrase must be specified on the command " "line." msgstr "" "daca se foloseste intrarea standard, parola trebuie introdusa la linia " "decomanda." #: src/Arguments.cc:138 #, c-format msgid "you have to suppy a filename to the \"%s\" command." msgstr "trebuie sa precizati un nume de fisier acestei comenzi \"%s\"." #: src/Arguments.cc:159 src/Arguments.cc:166 src/Arguments.cc:173 #: src/Arguments.cc:180 #, c-format msgid "you cannot use arguments with the \"%s\" command." msgstr "nu puteti folosi argumente pentru comanda \"%s\" ." #: src/Arguments.cc:195 #, c-format msgid "unknown command \"%s\"." msgstr "comanda necunoscuta \"%s\"." #: src/Arguments.cc:205 src/Arguments.cc:236 src/Arguments.cc:267 #: src/Arguments.cc:351 src/Arguments.cc:396 src/Arguments.cc:440 #: src/Arguments.cc:542 src/Arguments.cc:570 #, c-format msgid "the argument \"%s\" can only be used with the \"%s\" command." msgstr "argumentul \"%s\" poate fi folosit doar cu comanda \"%s\"." #: src/Arguments.cc:209 src/Arguments.cc:240 src/Arguments.cc:302 #, c-format msgid "the \"%s\" argument can be used only once." msgstr "argumentul \"%s\" poate fi folosit o singura data." #: src/Arguments.cc:213 #, c-format msgid "the \"%s\" argument must be followed by the embed file name." msgstr "" "argumentul \"%s\" trebuie sa fie urmat de numele fisierului de incorporat." #: src/Arguments.cc:244 #, c-format msgid "the \"%s\" argument must be followed by the extract file name." msgstr "argumentul \"%s\" trebuie sa fie urmat de numele fiserului de extras." #: src/Arguments.cc:271 msgid "the cover file name argument can be used only once." msgstr "" "argumentul pentru specificarea numelui fisierului de acoperire poate fi " "folosit o singura data." #: src/Arguments.cc:275 #, c-format msgid "the \"%s\" argument must be followed by the cover file name." msgstr "" "argumentul \"%s\" trebuie sa fie urmat de numele fisierului de acoperire." #: src/Arguments.cc:298 src/Arguments.cc:601 src/Arguments.cc:625 #: src/Arguments.cc:639 #, c-format msgid "" "the argument \"%s\" can only be used with the \"%s\" and \"%s\" commands." msgstr "" "argumentul \"%s\" poate fi folosit doar cu comanda \"%s\" si cu comanda \"%s" "\"." #: src/Arguments.cc:306 #, c-format msgid "the \"%s\" argument must be followed by the stego file name." msgstr "argumentul \"%s\" trebuie sa fie urmat de numele fisierului stego." #: src/Arguments.cc:329 msgid "the passphrase argument can be used only once." msgstr "" "argumentul pentru specificarea parolei poate fi folosit o singura data." #: src/Arguments.cc:333 #, c-format msgid "the \"%s\" argument must be followed by the passphrase." msgstr "argumentul \"%s\" trebuie sa fie urmat de parola." #: src/Arguments.cc:355 msgid "the checksum argument can be used only once." msgstr "argumentul checksum poate fi folosit o singura data." #: src/Arguments.cc:373 src/Arguments.cc:418 #, c-format msgid "the argument \"%s\" can only be used with the \"embed\" command." msgstr "argumentul \"%s\" poate fi folosit doar cu comanda \"embed\"." #: src/Arguments.cc:377 src/Arguments.cc:400 msgid "the compression argument can be used only once." msgstr "argumentul pentru compresie poate fi folosit o singura data." #: src/Arguments.cc:381 #, c-format msgid "the \"%s\" argument must be followed by the compression level." msgstr "argumentul \"%s\" trebuie sa fie urmat de parametrii de compresie." #: src/Arguments.cc:387 #, c-format msgid "\"%s\" is not a valid compression level." msgstr "\"%s\" nu este un nivel de compresie valid." #: src/Arguments.cc:422 msgid "the file name embedding argument can be used only once." msgstr "" "argumentul pentru specificarea numelui fisierului de incorporat poate fi " "folosit o singura data." #: src/Arguments.cc:444 msgid "the encryption argument can be used only once." msgstr "argumentul de encriptie poate fi folosit o singura data." #: src/Arguments.cc:448 src/Arguments.cc:453 #, c-format msgid "the \"%s\" argument must be followed by encryption parameters." msgstr "argumentul \"%s\" trebuie sa fie urmat de parametrii de encriptie." #: src/Arguments.cc:485 src/Arguments.cc:494 #, c-format msgid "\"%s\" is neither an algorithm nor a mode supported by libmcrypt." msgstr "\"%s\" nu este un algoritm sau un mod suportat de libmcrypt." #: src/Arguments.cc:499 #, c-format msgid "" "\"%s\" and \"%s\" are both libmcrypt algorithms. please specify only one." msgstr "" "\"%s\" si \"%s\" sunt tot algoritmi libmcrypt. va rog sa specificati unul " "singur." #: src/Arguments.cc:502 #, c-format msgid "\"%s\" and \"%s\" are both libmcrypt modes. please specify only one." msgstr "" "\"%s\" si \"%s\" sunt tot moduri libmcrypt. va rog sa specificati unul " "singur." #: src/Arguments.cc:519 #, c-format msgid "the encryption algorithm \"%s\" can not be used with the mode \"%s\"." msgstr "algoritmul de encriptie \"%s\" nu poate fi folosit cu modul \"%s\"." #: src/Arguments.cc:525 msgid "steghide has been compiled without support for encryption." msgstr "steghide a fost compilat fara suport pentru encriptie." #: src/Arguments.cc:546 msgid "the radius argument can be used only once." msgstr "argumentul raza poate fi folosit o singura data." #: src/Arguments.cc:550 #, c-format msgid "the \"%s\" argument must be followed by the neighbourhood radius." msgstr "" "argumentul \"%s\" trebuie sa fie urmat de raza vecinatatii(neighbourhood " "radius)." #: src/Arguments.cc:574 msgid "the goal argument can be used only once." msgstr "argumentul goal poate fi folosit o singura data." #: src/Arguments.cc:578 src/Arguments.cc:584 #, c-format msgid "the \"%s\" argument must be followed by a number between 0 and 100." msgstr "" "argumentul \"%s\" trebuie sa fie urmat de un numar cuprins intre 0 si 100." #: src/Arguments.cc:605 msgid "the force argument can be used only once." msgstr "argumentul force poate fi folosit o singura data." #: src/Arguments.cc:629 src/Arguments.cc:643 src/Arguments.cc:701 #, c-format msgid "" "the \"%s\" argument cannot be used here because the verbosity has already " "been set." msgstr "" "argumentul \"%s\" nu poate fi folosit aici pentru ca a fost deja setat." #: src/Arguments.cc:659 src/Arguments.cc:669 src/Arguments.cc:679 #: src/Arguments.cc:697 msgid "you cannot use more than one debug command at a time." msgstr "nu puteti folosi mai mult de o comanda de debug in acelasi timp." #: src/Arguments.cc:711 msgid "the debug level argument can be used only once." msgstr "" "argumentul pentru specificarea nivelului de debug poate fi folosit o singura " "data." #: src/Arguments.cc:715 #, c-format msgid "the \"%s\" argument must be followed by the debug level." msgstr "argumentul \"%s\" trebuie sa fie urmat de nivelul de debug." #: src/Arguments.cc:741 msgid "unknown terminal. the passphrase you type now will be visible." msgstr "terminal necunoscut. parola pe care o veti introduce va fi vizibila." #: src/Arguments.cc:745 msgid "Enter passphrase: " msgstr "Introduceti parola: " #: src/Arguments.cc:758 msgid "Re-Enter passphrase: " msgstr "Reintroduceti parola: " #: src/Arguments.cc:770 msgid "the passphrases do not match." msgstr "Parolele nu se potrivesc." #: src/AssertionFailed.cc:28 msgid "" "This means that you have found a bug. Please let me (shetzl@chello.at)\n" "know this if you have a way to reproduce the error.\n" "Steghide has to exit now. Sorry.\n" msgstr "" "Acest lucru inseamna ca ati gasit un bug. Va rog sa-mi scrieti la " "shetzl@chello.at\n" "daca stiti cum sa reproduceti conditiile in care s-a generat eroarea.\n" "Steghide trebuie sa se inchida acum. Imi pare rau.\n" #: src/AssertionFailed.h:30 #, c-format msgid "assertion failed in %s at line number %d." msgstr "declaratii nereusite in %s la linia %d." #: src/AuFile.cc:94 #, c-format msgid "the au file on standard input uses the unkown encoding %d." msgstr "fisierul au de la intrarea standard foloseste un codec necunoscut %d." #: src/AuFile.cc:97 #, c-format msgid "the au file \"%s\" uses the unknown encoding %d." msgstr "fisierul au \"%s\" foloseste un codec necunoscut %d." #: src/AuFile.cc:107 #, c-format msgid "an error occured while reading the au headers from the file \"%s\"." msgstr "" "o eroare a fost generata in timp ce se citeau header-ele au din \"%s\"." #: src/AuFile.cc:113 #, c-format msgid "premature end of file \"%s\" while reading au headers." msgstr "terminare prematura a \"%s\" in timpul citirii header-elor au." #: src/AuFile.cc:119 msgid "an error occured while reading the au headers from standard input." msgstr "" "o eroare a fost generata in timp ce se citeau header-ele au de la intrarea " "standard." #: src/AuFile.cc:125 msgid "premature end of data from standard input while reading au headers." msgstr "" "terminare prematura a datelor de la intrarea standard in timpul citirii " "header-elor au." #: src/AuFile.cc:165 #, c-format msgid "an error occured while writing the au headers to the file \"%s\"." msgstr "" "o eroare a fost generata in timp ce se scria header-ul au in fisierul \"%s\"." #: src/AuFile.cc:171 msgid "an error occured while writing the au headers to standard output." msgstr "" "o eroare a fost generata in timp ce se scriau header-ele au la iesirea " "standard." #: src/AuFile.cc:188 msgid ", mu-law encoding" msgstr ", codare mu-law" #: src/AuFile.cc:193 msgid ", PCM encoding" msgstr ", codare PCM" #: src/AuFile.cc:196 src/BmpFile.cc:87 src/JpegFile.cc:61 src/WavFile.cc:81 msgid "format" msgstr "format" #: src/AudioData.h:94 src/WavFile.cc:249 #, c-format msgid "an error occured while reading the audio data from the file \"%s\"." msgstr "o eroare a fost generata in timp ce se citeau datele audio din \"%s\"." #: src/AudioData.h:100 src/WavFile.cc:253 #, c-format msgid "premature end of file \"%s\" while reading audio data." msgstr "terminare prematura a \"%s\" in timpul citirii datelor audio." #: src/AudioData.h:106 src/WavFile.cc:257 msgid "an error occured while reading the audio data from standard input." msgstr "" "o eroare a fost generata in timp ce se citeau datele audio de la intrarea " "standard." #: src/AudioData.h:112 src/WavFile.cc:261 msgid "premature end of data from standard input while reading audio data." msgstr "" "terminare prematura a datelor de la intrarea standard in timpul citirii " "datelor audio." #: src/AudioData.h:134 src/WavFile.cc:302 #, c-format msgid "an error occured while writing the audio data to the file \"%s\"." msgstr "" "o eroare a fost generata in timp ce se scria datele audio in fisierul \"%s\"." #: src/AudioData.h:140 src/WavFile.cc:306 msgid "an error occured while writing the audio data to standard output." msgstr "" "o eroare a fost generata in timpul scrierii datelor audio la iesirea " "standard." #: src/BinaryIO.cc:67 #, c-format msgid "the file \"%s\" does already exist. overwrite ?" msgstr "fisierul \"%s\" exista deja. doriti sa-l rescrieti?" #: src/BinaryIO.cc:70 #, c-format msgid "did not write to file \"%s\"." msgstr "nu am putut scrie in fisierul \"%s\"." #: src/BinaryIO.cc:113 #, c-format msgid "could not open the file \"%s\"." msgstr "nu am putut deschide fisierul \"%s\"." #: src/BinaryIO.cc:137 #, c-format msgid "could not close the file \"%s\"." msgstr "nu pot inchide fisierul \"%s\"." #: src/BitString.cc:299 src/BitString.cc:347 src/MCryptPP.cc:322 #: src/MHashKeyGen.cc:115 msgid "could not allocate memory." msgstr "nu pot aloca memoria RAM necesara." #: src/BitString.cc:303 #, c-format msgid "error %d while calling zlib's compress2." msgstr "" "s-a generat o eroare %d in timp ce am apelat functia compress2 aflata in " "libraria zlib." #: src/BitString.cc:351 msgid "can not uncompress data. compressed data is corrupted." msgstr "nu pot decompresa datele pentru ca datele compresate sunt corupte." #: src/BitString.cc:355 #, c-format msgid "error %d while calling zlib's uncompress." msgstr "" "s-a generat o eroare %d in timp ce am apelat functia decompress aflata in " "libraria zlib." #: src/BmpFile.cc:80 msgid "Windows 3.x bitmap" msgstr "Windows 3.x bitmap" #: src/BmpFile.cc:84 msgid "OS/2 1.x bitmap" msgstr "OS/2 1.x bitmap" #: src/BmpFile.cc:428 #, c-format msgid "" "the bmp data from standard input has a format that is not supported (biSize: " "%lu)." msgstr "" "datele bmp de la intrarea standardut au un format nesuportat de steghide " "(biSize: %lu)." #: src/BmpFile.cc:431 #, c-format msgid "the bmp file \"%s\" has a format that is not supported (biSize: %lu)." msgstr "" "fisierul bitmap \"%s\" are un format nesuportat de steghide (biSize: %lu)." #: src/BmpFile.cc:439 #, c-format msgid "an error occured while reading the bmp headers from the file \"%s\"." msgstr "" "o eroare a fost generata in timp ce se citeau header-ele bmp din \"%s\"." #: src/BmpFile.cc:443 #, c-format msgid "premature end of file \"%s\" while reading bmp headers." msgstr "terminare prematura a \"%s\" in timpul citirii header-elor bmp." #: src/BmpFile.cc:447 msgid "an error occured while reading the bmp headers from standard input." msgstr "" "o eroare a fost generata in timp ce se citeau header-ele bmp de la intrarea " "standard." #: src/BmpFile.cc:451 msgid "premature end of data from standard input while reading bmp headers." msgstr "" "terminare prematura a datelor de la intrarea standard in timpul citirii " "header-elor bmp." #: src/BmpFile.cc:492 #, c-format msgid "" "the bmp data from standard input has a format that is not supported " "(biBitCount: %d)." msgstr "" "datele bmp de la intrarea standardut au un format nesuportat de steghide " "(biBitCount: %d)." #: src/BmpFile.cc:495 #, c-format msgid "" "the bmp file \"%s\" has a format that is not supported (biBitCount: %d)." msgstr "" "fisierul bmp \"%s\" are un format nesuportat de steghide (biBitCount: %d)." #: src/BmpFile.cc:502 msgid "" "the bitmap data from standard input is compressed which is not supported." msgstr "" "datele bitmap de la intrarea standard sunt compresate, metoda nesuportata." #: src/BmpFile.cc:505 #, c-format msgid "the bitmap data in \"%s\" is compressed which is not supported." msgstr "datele bitmap din \"%s\" sunt compresate, metoda nesuportata." #: src/BmpFile.cc:521 src/BmpFile.cc:610 msgid "using a black/white bitmap as cover is very insecure!" msgstr "" "folosirea unui fisier bitmap in alb/negru ca acoperire este foarte nesigura!" #: src/BmpFile.cc:529 src/BmpFile.cc:618 msgid "using a 16-color bitmap as cover is very insecure!" msgstr "" "folosirea unui fisier bitmap in 16 culori ca acoperire este foarte nesigura!" #: src/BmpFile.cc:552 msgid "maybe corrupted windows bmp data (Reserved in RGBQUAD is non-zero)." msgstr "" "posibil date bmp windows corupte (byte-ul rezervat RGBQUAD este diferit de " "zero)." #: src/BmpFile.cc:595 #, c-format msgid "" "the bmp data from standard input has a format that is not supported " "(bcBitCount: %d)." msgstr "" "datele bmp de la intrarea standardut au un format nesuportat de steghide " "(bcBitCount: %d)." #: src/BmpFile.cc:598 #, c-format msgid "" "the bmp file \"%s\" has a format that is not supported (bcBitCount: %d)." msgstr "" "fisierul bmp \"%s\" are un format nesuportat de steghide (bcBitCount: %d)." #: src/BmpFile.cc:669 #, c-format msgid "an error occured while writing the bmp headers to the file \"%s\"." msgstr "" "o eroare a fost generata in timpul scrierii header-elor bitmap in \"%s\"." #: src/BmpFile.cc:673 msgid "an error occured while writing the bmp headers to standard output." msgstr "" "ao eroare a fost generata in timpul scrierii header-elor bitmap la iesirea " "standard." #: src/BmpFile.cc:776 #, c-format msgid "maybe corrupted bmp data (padding byte at 0x%lx set to non-zero)." msgstr "posibil date bmp corupte (byte-ul 0x%lx este setat non-zero)." #: src/BmpFile.cc:790 #, c-format msgid "an error occured while reading the bmp data from the file \"%s\"." msgstr "o eroare a fost generata in timp ce se citeau datele bmp din \"%s\"." #: src/BmpFile.cc:794 #, c-format msgid "premature end of file \"%s\" while reading bmp data." msgstr "terminare prematura a \"%s\" in timpul citirii datelor bmp." #: src/BmpFile.cc:798 msgid "an error occured while reading the bmp data from standard input." msgstr "" "o eroare a fost generata in timp ce se citeau datele bmp de la intrarea " "standard." #: src/BmpFile.cc:802 msgid "premature end of bmp data from standard input." msgstr "terminare prematura a datelor bmp de la intrarea standard." #: src/BmpFile.cc:840 #, c-format msgid "an error occured while writing the bitmap data to the file \"%s\"." msgstr "" "o eroare a fost generata in timpul scrierii datelor bitmap in fisierul \"%s" "\"." #: src/BmpFile.cc:844 msgid "an error occured while writing the bitmap data to standard output." msgstr "" "o eroare a fost generata in timpul scrierii datelor bitmap la iesirea " "standard." #: src/CvrStgFile.cc:212 msgid "" "can not read input file. steghide has been compiled without support for jpeg " "files." msgstr "" "nu pot citi fisierul de intrare. steghide a fost compilat fara suport pentru " "jpeg files." #: src/EmbData.cc:91 msgid "could not extract any data with that passphrase!" msgstr "nu am putut extrage date cu parola introdusa!" #: src/EmbData.cc:107 #, c-format msgid "" "attempting to read an embedding of version %d but steghide %s only supports " "embeddings of version %d." msgstr "" "ati incercat sa cititi date incorporate cu versiunea %d dar steghide %s " "suporta doar incorporari de date versiunea %d." #: src/EmbData.cc:137 msgid "" "The embedded data is encrypted but steghide has been compiled without " "encryption\n" "support. To be able to read the embedded data, you have to install " "libmcrypt\n" "(http://mcrypt.sourceforge.net/) and recompile steghide." msgstr "" "Datele incorporate sunt encriptate dar steghide a fost compliat fara " "suportul de encriptie.\n" "Pentru a putea sa cititi datele incorporate trebuie sa instalati libmcrypt\n" "(http://mcrypt.sourceforge.net/) si sa recompilati steghide." #: src/EmbData.cc:226 msgid "the embedded data has an invalid length." msgstr "datele incorporate au o lungime invalida." #: src/Embedder.cc:48 msgid "reading secret data from standard input..." msgstr "citire date secrete de la intrarea standard..." #: src/Embedder.cc:51 #, c-format msgid "reading secret file \"%s\"..." msgstr "citire fisier secret \"%s\"..." #: src/Embedder.cc:63 src/Extractor.cc:46 src/ProgressOutput.cc:71 #: src/Session.cc:88 msgid " done" msgstr " gata" #: src/Embedder.cc:84 msgid "reading cover file from standard input..." msgstr "citire fisier de acoperire de la intrarea standard..." #: src/Embedder.cc:87 #, c-format msgid "reading cover file \"%s\"..." msgstr "citire fisier de acoperire \"%s\"..." #: src/Embedder.cc:98 msgid "the cover file is too short to embed the data." msgstr "fisierul de acoperire este prea mic pentru a incorpora date." #: src/Embedder.cc:104 msgid "creating the graph..." msgstr "creare graf..." #: src/Embedder.cc:148 src/Embedder.cc:154 msgid "standard input" msgstr "intrarea standard" #: src/Embedder.cc:160 #, c-format msgid "embedding %s in %s..." msgstr "incorporare %s in %s..." #: src/Embedder.cc:189 msgid "writing stego file to standard output... " msgstr "scriere fisier stego la iesirea standard... " #: src/Embedder.cc:194 #, c-format msgid "writing stego file \"%s\"... " msgstr "scriere fisier stego \"%s\"... " #: src/Embedder.cc:204 msgid "done" msgstr "gata" #: src/Embedder.cc:217 #, c-format msgid "executing %s..." msgstr "execut %s..." #: src/Extractor.cc:36 msgid "reading stego file from standard input..." msgstr "citire fisier stego de la intrarea standard..." #: src/Extractor.cc:39 #, c-format msgid "reading stego file \"%s\"..." msgstr "citire fisier stego \"%s\"..." #: src/Extractor.cc:52 msgid "extracting data..." msgstr "extractie date..." #: src/Extractor.cc:62 msgid "" "the stego data from standard input is too short to contain the embedded data." msgstr "" "datele stego de la intrarea standard sunt prea mici pentru a contine date " "incorporate." #: src/Extractor.cc:65 #, c-format msgid "the stego file \"%s\" is too short to contain the embedded data." msgstr "fisierul stego \"%s\" este prea mic pentru a putea incorpora date." #: src/Extractor.cc:82 msgid "checking crc32 checksum..." msgstr "verificare crc32 checksum..." #: src/Extractor.cc:86 msgid " ok" msgstr " ok" #: src/Extractor.cc:90 msgid " FAILED!" msgstr " NEREUSIT!" #: src/Extractor.cc:93 msgid "crc32 checksum failed! extracted data is probably corrupted." msgstr "checksum-ul crc32 e invalid! datele extrase sunt probabil corupte." #: src/Graph.cc:253 #, c-format msgid " %lu sample values, %lu vertices, %lu edges" msgstr " %lu valori-exemplu, %lu varfuri, %lu muchii" #: src/JpegFile.cc:73 msgid "can not use standard input as source for jpeg files with libjpeg." msgstr "" "nu pot folosi intrarea standard ca sursa pentru fisiere jpeg cu libjpeg." #: src/MCryptPP.cc:64 src/MCryptPP.cc:249 #, c-format msgid "could not open libmcrypt module \"%s\",\"%s\"." msgstr "nu am putut deschide modulul libmcrypt \"%s\",\"%s\"." #: src/MCryptPP.cc:119 msgid "" "could not initialize libmcrypt encryption. see above error messages if any." msgstr "" "nu am putut initializa encriptarea folosind libmcrypt. uitat-va deasupra " "dupa posibile mesaje de eroare." #: src/MCryptPP.cc:132 msgid "could not encrypt data." msgstr "nu am putut encripta datele." #: src/MCryptPP.cc:154 msgid "could not finish libmcrypt encryption." msgstr "nu am putut termina encriptia libmcrypt." #: src/MCryptPP.cc:185 msgid "" "could not initialize libmcrypt decryption. see above error messages if any." msgstr "" "nu am putut initializa decriptarea folosind libmcrypt. uitat-va deasupra " "dupa posibile mesaje de eroare." #: src/MCryptPP.cc:198 msgid "could not decrypt data." msgstr "ne am putut decripta datele." #: src/MCryptPP.cc:209 msgid "could not finish libmcrypt decryption." msgstr "nu am putut termina decriptia libmcrypt." #: src/MHashKeyGen.cc:61 msgid "could not generate key using libmhash." msgstr "nu am putut genera o cheie folosind libmhash." #: src/MHashPP.cc:45 #, c-format msgid "could not initialize libmhash %s algorithm." msgstr "nu am putut initializa algoritmul libmhash %s." #: src/ProgressOutput.cc:79 msgid " done\n" msgstr " gata\n" #: src/RandomSource.cc:38 msgid "" "could not open /dev/urandom, using standard library random numbers instead." msgstr "" "nu am putut deschide /dev/urandom, voi folosi in loc libraria standard " "pentru numere aleatoare." #: src/RandomSource.cc:53 msgid "could not close random input file." msgstr "nu pot inchide fisierul de intrare aleator." #: src/Session.cc:64 msgid "" "please specify a file name for the extracted data (there is no name embedded " "in the stego file)." msgstr "" "va rog sa specificati un nume de fisier pentru datele extrase (nu este nici " "un nume incorporat in fisierul stego)." #: src/Session.cc:71 msgid "writing extracted data to standard output..." msgstr "scriere date extrase la iesirea standard..." #: src/Session.cc:75 #, c-format msgid "writing extracted data to \"%s\"..." msgstr "scriere date extrase in \"%s\"..." #: src/Session.cc:94 #, c-format msgid "wrote extracted data to \"%s\"." msgstr "scrie data extrasa la \"%s\"." #: src/Session.cc:138 msgid "data from standard input:\n" msgstr "date de la intrarea standard:\n" #: src/Session.cc:145 msgid "capacity" msgstr "capacitatea" #: src/Session.cc:152 msgid "Try to get information about embedded data ?" msgstr "Doriti sa incerc sa obtin informatii despre datele incorporate ?" #: src/Session.cc:171 msgid " embedded data:\n" msgstr " data introduse:\n" #: src/Session.cc:174 #, c-format msgid " embedded file \"%s\":\n" msgstr " fisier introdus \"%s\":\n" #: src/Session.cc:177 #, c-format msgid " size: %s\n" msgstr " marimea: %s\n" #: src/Session.cc:180 src/Session.cc:186 msgid "no" msgstr "nu" #: src/Session.cc:185 #, c-format msgid " encrypted: %s\n" msgstr " encriptat: %s\n" #: src/Session.cc:186 #, c-format msgid " compressed: %s\n" msgstr " compresat: %s\n" #: src/Session.cc:186 msgid "yes" msgstr "da" #: src/Session.cc:191 msgid "could not extract any data with that passphrase!\n" msgstr "nu am putut extrage date cu parola introdusa!\n" #: src/Session.cc:214 msgid "" "encryption algorithms:\n" ": ...\n" msgstr "" "algoritmi de encriptare:\n" ": ...\n" #: src/Session.cc:231 msgid "" "steghide has been compiled without support for encryption.\n" "If you want to encrypt your data before embedding it, use an external " "encryption\n" "program or install libmcrypt (http://mcrypt.sourceforge.net/) and recompile " "steghide.\n" msgstr "" "steghide a fost compilat fara suport pentru encriptie.\n" "Daca vreti sa encriptati datele inainte de a le incorpora, folositi un " "program extern de encriptie\n" "sau instalati libmcrypt (http://mcrypt.sourceforge.net/) si apoi recompilati " "steghide.\n" #: src/Session.cc:245 msgid "" "\n" "the first argument must be one of the following:\n" " embed, --embed embed data\n" " extract, --extract extract data\n" " info, --info display information about a cover- or stego-file\n" " info display information about \n" " encinfo, --encinfo display a list of supported encryption algorithms\n" " version, --version display version information\n" " license, --license display steghide's license\n" " help, --help display this usage information\n" "\n" "embedding options:\n" " -ef, --embedfile select file to be embedded\n" " -ef embed the file \n" " -cf, --coverfile select cover-file\n" " -cf embed into the file \n" " -p, --passphrase specify passphrase\n" " -p use to embed data\n" " -sf, --stegofile select stego file\n" " -sf write result to instead of cover-file\n" " -e, --encryption select encryption parameters\n" " -e []|[] specify an encryption algorithm and/or mode\n" " -e none do not encrypt data before embedding\n" " -z, --compress compress data before embedding (default)\n" " -z using level (1 best speed...9 best " "compression)\n" " -Z, --dontcompress do not compress data before embedding\n" " -K, --nochecksum do not embed crc32 checksum of embedded data\n" " -N, --dontembedname do not embed the name of the original file\n" " -f, --force overwrite existing files\n" " -q, --quiet suppress information messages\n" " -v, --verbose display detailed information\n" "\n" "extracting options:\n" " -sf, --stegofile select stego file\n" " -sf extract data from \n" " -p, --passphrase specify passphrase\n" " -p use to extract data\n" " -xf, --extractfile select file name for extracted data\n" " -xf write the extracted data to \n" " -f, --force overwrite existing files\n" " -q, --quiet suppress information messages\n" " -v, --verbose display detailed information\n" "\n" "options for the info command:\n" " -p, --passphrase specify passphrase\n" " -p use to get info about embedded data\n" "\n" "To embed emb.txt in cvr.jpg: steghide embed -cf cvr.jpg -ef emb.txt\n" "To extract embedded data from stg.jpg: steghide extract -sf stg.jpg\n" msgstr "" "\n" "primul argument trebuie sa fie din cele de mai jos:\n" " embed, --embed incorporeaza datele\n" " extract, --extract extrage datele\n" " info, --info afiseaza informatii despre acoperire- sau despre " "fisierul stego\n" " info afiseaza informatii despre \n" " encinfo, --encinfo afiseaza lista du algoritmii de encriptie " "suportati\n" " version, --version afiseaza informatii despre versiunea curenta a " "programului\n" " license, --license afiseaza licenta steghide\n" " help, --help afiseaza informatiile despre folosire(cele de mai " "sus)\n" "\n" "optiuni pentru incorporarea de date:\n" " -ef, --embedfile selecteaza fisierul dorit pentru a fi incorporat\n" " -ef incorporeaza fisierul \n" " -cf, --coverfile selecteaza fisierul sursa dorit pentru adaugarea de " "date\n" " -cf incorporeaza in fisierul \n" " -p, --passphrase specifica parola\n" " -p foloseste pentru a incorpora datele\n" " -sf, --stegofile selecteaza fisierul stego\n" " -sf scriere rezultate in in loc de fisierul " "sursa\n" " -e, --encryption selecteaza parametrii de encriptie\n" " -e []|[] specifica un algoritm de encriptie si/sau un mod\n" " -e none nu encripta datele inainte de incorporare\n" " -z, --compress compreseaza datele inainte de incorporare " "(default)\n" " -z folosind unul din nivelele (1 cel mai " "rapid...9 cea mai puternica compresie)\n" " -Z, --dontcompress nu compresa datele inainte de incorporare\n" " -K, --nochecksum nu incorpora datele crc32 ale datelor incorporate\n" " -N, --dontembedname nu incorpora numele fisierului original\n" " -f, --force rescrie fisierele existente\n" " -q, --quiet nu afisa informatii despre proces\n" " -v, --verbose afiseaza informatii detaliate despre proces\n" "\n" "optiuni pentru extragerea de date:\n" " -sf, --stegofile selecteaza fisier stego\n" " -sf extrage datele din \n" " -p, --passphrase specifica parola\n" " -p foloseste pentru a extrage date\n" " -xf, --extractfile selecteaza numele fisierului pentru datele extrase\n" " -xf scrie datele extrase in \n" " -f, --force rescrie fisierele existente\n" " -q, --quiet nu afisa informatii despre proces\n" " -v, --verbose afiseaza informatii detaliate despre proces\n" "\n" "optiuni pentru comanda info:\n" " -p, --passphrase specificare parola\n" " -p foloseste pentru a obtine date despre " "embedded data\n" "\n" "Pentru a incorpora emb.txt in cvr.jpg: steghide embed -cf cvr.jpg -ef emb." "txt\n" "Pentru a extrage datele din stg.jpg: steghide extract -sf stg.jpg\n" #: src/SteghideError.cc:27 msgid "error, exiting. (no error message defined)." msgstr "" "s-a generat o eroare, iesire din program. (nici un mesaj de eroare definit)." #: src/Terminal.cc:31 src/Terminal.cc:39 src/Terminal.cc:53 msgid "could not get terminal attributes." msgstr "nu am putut determina atributele terminalului." #: src/Terminal.cc:45 src/Terminal.cc:61 src/Terminal.cc:68 msgid "could not set terminal attributes." msgstr "nu am putut seta atributele terminalului." #: src/WavFile.cc:346 #, c-format msgid "an error occured while reading the wav headers from the file \"%s\"." msgstr "" "o eroare a fost generata in timp ce se citeau header-ele wav din fisierul \"%" "s\"." #: src/WavFile.cc:352 #, c-format msgid "premature end of file \"%s\" while reading wav headers." msgstr "terminare prematura a \"%s\" in timpul citirii header-elor wav." #: src/WavFile.cc:358 msgid "an error occured while reading the wav headers from standard input." msgstr "" "o eroare a fost generata in timp ce se citeau header-ele wav de la intrarea " "standard." #: src/WavFile.cc:364 msgid "premature end of data from standard input while reading wav headers." msgstr "" "terminare prematura a datelor de la intrarea standard in timpul citirii " "header-elor wav." #: src/WavFile.cc:394 #, c-format msgid "an error occured while writing the wav headers to the file \"%s\"." msgstr "o eroare a fost generata in timpul scrierii header-elor wav in \"%s\"." #: src/WavFile.cc:400 msgid "an error occured while writing the wav headers to standard output." msgstr "" "o eroare a fost generata in timpul scrierii header-elor wav la iesirea " "standard." #: src/WavFormatChunk.cc:31 #, c-format msgid "" "the wav file from standard input has a format that is not supported " "(FormatTag: 0x%X)." msgstr "" "fisierul WAV de la intrarea standard este intr-un format care nu e suportat" "(FormatTag: 0x%X)." #: src/WavFormatChunk.cc:34 #, c-format msgid "" "the wav file \"%s\" has a format that is not supported (FormatTag: 0x%X)." msgstr "" "fisierul WAV \"%s\" este intr-un format care nu este suportat (FormatTag: 0x%" "X)." #: src/WavFormatChunk.cc:49 msgid "" "the wav file from standard input does not have pcm format (header too long)." msgstr "" "fisierul WAV de la intrarea standard nu este in format pcm (header-ul este " "prea lung)." #: src/WavFormatChunk.cc:52 #, c-format msgid "the wav file \"%s\" does not have pcm format (header too long)." msgstr "fisierul WAV \"%s\" nu este in format pcm (header-ul este prea lung)." #: src/WavFormatChunk.cc:57 msgid "the wav file from standard input is corrupted." msgstr "fisierul WAV de la intrarea standard este corupt." #: src/WavFormatChunk.cc:60 #, c-format msgid "the wav file \"%s\" is corrupted." msgstr "fisierul WAV \"%s\" este corupt." #: src/error.cc:45 msgid "type \"steghide --help\" for help." msgstr "tasteaza \"steghide --help\" pentru ajutor." #: src/error.cc:56 msgid "premature end of data from standard input." msgstr "terminare prematura a datelor de la intrarea standard." #: src/error.cc:60 #, c-format msgid "premature end of file \"%s\"." msgstr "terminare prematura a \"%s\"." #: src/error.cc:66 msgid "an error occured while reading data from standard input." msgstr "" "o eroare a fost generata in timp ce se citea date de la intrarea standard." #: src/error.cc:70 #, c-format msgid "an error occured while reading data from the file \"%s\"." msgstr "o eroare a fost generata in timp ce se citea date din fisierul \"%s\"." #: src/error.cc:93 msgid "an error occured while writing data to standard output." msgstr "o eroare a fost generata in timp ce se scria date la iesirea standard." #: src/error.cc:97 #, c-format msgid "an error occured while writing data to the file \"%s\"." msgstr "o eroare a fost generata in timp ce se scria fisierul \"%s\"." #: src/error.cc:119 msgid "the file format of the data from standard input is not supported." msgstr "formatul fisierului de la intrarea standard nu este suportat." #: src/error.cc:122 #, c-format msgid "the file format of the file \"%s\" is not supported." msgstr "formatul fisierului \"%s\" nu este suportat." #: src/error.cc:141 msgid "" "This feature is not (yet) available. Please let me (shetzl@chello.at) know\n" "that you want to use this functionality to increase the chance that this " "will\n" "be implemented in the near future. Steghide has to exit now. Sorry.\n" msgstr "" "Aceasta optiune nu este (inca) disponibila. Va rog sa-mi spuneti la " "shetzl@chello.at \n" "daca vreti sa folositi aceasta optiune pentru a mari sansele ca aceasta sa " "fie \n" "implementata in viitorul apropiat. Steghide trebuie sa se inchida acum. Imi " "pare rau.\n" #: src/error.cc:161 msgid "" "Other possible reasons for this error are that the passphrase is wrong\n" "or that there is no embedded data.\n" msgstr "" "Alte motive posibile pentru aceasta eroare ar putea fi : parola este " "gresita\n" "sau fisierul nu contine date incorporate.\n" #: src/msg.cc:35 msgid "__no_message_defined__" msgstr "__nici_un_mesaj_definit__" #: src/msg.cc:135 src/msg.cc:153 msgid "warning:" msgstr "atentie:" #: src/msg.cc:162 src/msg.cc:169 src/msg.cc:176 msgid "y" msgstr "d" #: src/msg.cc:163 src/msg.cc:170 src/msg.cc:177 msgid "n" msgstr "n" #: src/msg.cc:188 msgid "unknown terminal. you might need to press after answering." msgstr "terminal nerecunoscut. s-ar putea sa fiti nevoiti sa apasati ." #~ msgid "the \"%s\" argument must be followed by a number between 0 and %d." #~ msgstr "" #~ "argumentul \"%s\" trebuie sa fie urmat de un numar cuprins intre 0 si %d." #~ msgid "" #~ "the \"%s\" argument must be followed by the number of times the " #~ "construction heuristic should be run." #~ msgstr "" #~ "argumentul \"%s\" trebuie sa fie urmat de numarul dorit de executii a " #~ "constructiei euristice." #~ msgid "the \"%s\" argument must be followed by the priority queue range." #~ msgstr "argumentul \"%s\" trebuie sa fie urmat de prioritatea procesului." #~ msgid "the algorithm argument can be used only once." #~ msgstr "" #~ "argumentul pentru alegerea algoritmului poate fi folosit o singura data." #~ msgid "the file \"%s\" does already exist." #~ msgstr "fisierul \"%s\" exista deja." #~ msgid "the number construction heuristic argument can be used only once." #~ msgstr "" #~ "argumentul pentru numarul constructiilor euristice can be used only once." #~ msgid "the priority queue range argument can be used only once." #~ msgstr "" #~ "argumentul pentru specificarea prioritatii procesului poate fi folosit o " #~ "singura data." steghide-0.5.1/po/en@boldquot.header0000644000076400001440000000247107735006035013047 # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # steghide-0.5.1/po/en@quot.header0000644000076400001440000000226307735006035012205 # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # steghide-0.5.1/po/Rules-quot0000644000076400001440000000323107735006035011417 # Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header steghide-0.5.1/po/remove-potcdate.sin0000644000076400001440000000066007735006035013230 # Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } steghide-0.5.1/po/boldquot.sed0000644000076400001440000000033107735006035011740 s/"\([^"]*\)"/“\1â€/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“â€/""/g s/“/“/g s/â€/â€/g s/‘/‘/g s/’/’/g steghide-0.5.1/po/POTFILES.in0000644000076400001440000000433307731562515011203 # List of source files containing translatable strings src/AUtils.h src/Arg.cc src/Arg.h src/Arguments.cc src/Arguments.h src/AssertionFailed.cc src/AssertionFailed.h src/AuData.h src/AuFile.cc src/AuFile.h src/AuSampleValues.cc src/AuSampleValues.h src/AudioData.h src/AudioSampleValue.h src/BFSAPHeuristic.cc src/BFSAPHeuristic.h src/BinaryIO.cc src/BinaryIO.h src/BitString.cc src/BitString.h src/BmpFile.cc src/BmpFile.h src/BmpPaletteSampleValue.cc src/BmpPaletteSampleValue.h src/BmpRGBSampleValue.cc src/BmpRGBSampleValue.h src/BmpSampleValue.cc src/BmpSampleValue.h src/ColorPalette.h src/CvrStgFile.cc src/CvrStgFile.h src/CvrStgObject.h src/DFSAPHeuristic.cc src/DFSAPHeuristic.h src/DMDConstructionHeuristic.cc src/DMDConstructionHeuristic.h src/DebugOutput.h src/Edge.cc src/Edge.h src/EdgeIterator.cc src/EdgeIterator.h src/EmbData.cc src/EmbData.h src/Embedder.cc src/Embedder.h src/EncryptionAlgorithm.cc src/EncryptionAlgorithm.h src/EncryptionMode.cc src/EncryptionMode.h src/Extractor.cc src/Extractor.h src/Globals.h src/Graph.cc src/Graph.h src/JpegFile.cc src/JpegFile.h src/JpegSampleValue.cc src/JpegSampleValue.h src/MCryptPP.cc src/MCryptPP.h src/MHashKeyGen.cc src/MHashKeyGen.h src/MHashPP.cc src/MHashPP.h src/Matching.cc src/Matching.h src/MatchingAlgorithm.cc src/MatchingAlgorithm.h src/ProgressOutput.cc src/ProgressOutput.h src/PseudoRandomSource.cc src/PseudoRandomSource.h src/RGBTriple.cc src/RGBTriple.h src/RandomSource.cc src/RandomSource.h src/SMDConstructionHeuristic.cc src/SMDConstructionHeuristic.h src/SampleOccurence.h src/SampleValue.cc src/SampleValue.h src/SampleValueAdjacencyList.cc src/SampleValueAdjacencyList.h src/Selector.cc src/Selector.h src/Session.cc src/Session.h src/SteghideError.cc src/SteghideError.h src/Terminal.cc src/Terminal.h src/Utils.cc src/Utils.h src/Vertex.cc src/Vertex.h src/WKSConstructionHeuristic.cc src/WKSConstructionHeuristic.h src/WavChunk.cc src/WavChunk.h src/WavChunkHeader.cc src/WavChunkHeader.h src/WavChunkUnused.cc src/WavChunkUnused.h src/WavFile.cc src/WavFile.h src/WavFormatChunk.cc src/WavFormatChunk.h src/WavPCMSampleValue.cc src/WavPCMSampleValue.h src/common.h src/error.cc src/error.h src/main.cc src/msg.cc src/msg.h src/wrapper_hash_map.h src/wrapper_hash_set.h steghide-0.5.1/po/insert-header.sin0000644000076400001440000000124007735006035012657 # Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } steghide-0.5.1/po/quot.sed0000644000076400001440000000023107735006035011076 s/"\([^"]*\)"/“\1â€/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“â€/""/g steghide-0.5.1/po/steghide.pot0000644000076400001440000005437307743177372011765 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Stefan Hetzl # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2003-10-15 10:02+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/Arguments.cc:84 #, c-format msgid "unknown argument \"%s\"." msgstr "" #: src/Arguments.cc:90 msgid "standard input cannot be used for cover data AND data to be embedded." msgstr "" #: src/Arguments.cc:103 src/Arguments.cc:109 msgid "" "if standard input is used, the passphrase must be specified on the command " "line." msgstr "" #: src/Arguments.cc:138 #, c-format msgid "you have to suppy a filename to the \"%s\" command." msgstr "" #: src/Arguments.cc:159 src/Arguments.cc:166 src/Arguments.cc:173 #: src/Arguments.cc:180 #, c-format msgid "you cannot use arguments with the \"%s\" command." msgstr "" #: src/Arguments.cc:195 #, c-format msgid "unknown command \"%s\"." msgstr "" #: src/Arguments.cc:205 src/Arguments.cc:236 src/Arguments.cc:267 #: src/Arguments.cc:351 src/Arguments.cc:396 src/Arguments.cc:440 #: src/Arguments.cc:542 src/Arguments.cc:570 #, c-format msgid "the argument \"%s\" can only be used with the \"%s\" command." msgstr "" #: src/Arguments.cc:209 src/Arguments.cc:240 src/Arguments.cc:302 #, c-format msgid "the \"%s\" argument can be used only once." msgstr "" #: src/Arguments.cc:213 #, c-format msgid "the \"%s\" argument must be followed by the embed file name." msgstr "" #: src/Arguments.cc:244 #, c-format msgid "the \"%s\" argument must be followed by the extract file name." msgstr "" #: src/Arguments.cc:271 msgid "the cover file name argument can be used only once." msgstr "" #: src/Arguments.cc:275 #, c-format msgid "the \"%s\" argument must be followed by the cover file name." msgstr "" #: src/Arguments.cc:298 src/Arguments.cc:601 src/Arguments.cc:625 #: src/Arguments.cc:639 #, c-format msgid "" "the argument \"%s\" can only be used with the \"%s\" and \"%s\" commands." msgstr "" #: src/Arguments.cc:306 #, c-format msgid "the \"%s\" argument must be followed by the stego file name." msgstr "" #: src/Arguments.cc:329 msgid "the passphrase argument can be used only once." msgstr "" #: src/Arguments.cc:333 #, c-format msgid "the \"%s\" argument must be followed by the passphrase." msgstr "" #: src/Arguments.cc:355 msgid "the checksum argument can be used only once." msgstr "" #: src/Arguments.cc:373 src/Arguments.cc:418 #, c-format msgid "the argument \"%s\" can only be used with the \"embed\" command." msgstr "" #: src/Arguments.cc:377 src/Arguments.cc:400 msgid "the compression argument can be used only once." msgstr "" #: src/Arguments.cc:381 #, c-format msgid "the \"%s\" argument must be followed by the compression level." msgstr "" #: src/Arguments.cc:387 #, c-format msgid "\"%s\" is not a valid compression level." msgstr "" #: src/Arguments.cc:422 msgid "the file name embedding argument can be used only once." msgstr "" #: src/Arguments.cc:444 msgid "the encryption argument can be used only once." msgstr "" #: src/Arguments.cc:448 src/Arguments.cc:453 #, c-format msgid "the \"%s\" argument must be followed by encryption parameters." msgstr "" #: src/Arguments.cc:485 src/Arguments.cc:494 #, c-format msgid "\"%s\" is neither an algorithm nor a mode supported by libmcrypt." msgstr "" #: src/Arguments.cc:499 #, c-format msgid "" "\"%s\" and \"%s\" are both libmcrypt algorithms. please specify only one." msgstr "" #: src/Arguments.cc:502 #, c-format msgid "\"%s\" and \"%s\" are both libmcrypt modes. please specify only one." msgstr "" #: src/Arguments.cc:519 #, c-format msgid "the encryption algorithm \"%s\" can not be used with the mode \"%s\"." msgstr "" #: src/Arguments.cc:525 msgid "steghide has been compiled without support for encryption." msgstr "" #: src/Arguments.cc:546 msgid "the radius argument can be used only once." msgstr "" #: src/Arguments.cc:550 #, c-format msgid "the \"%s\" argument must be followed by the neighbourhood radius." msgstr "" #: src/Arguments.cc:574 msgid "the goal argument can be used only once." msgstr "" #: src/Arguments.cc:578 src/Arguments.cc:584 #, c-format msgid "the \"%s\" argument must be followed by a number between 0 and 100." msgstr "" #: src/Arguments.cc:605 msgid "the force argument can be used only once." msgstr "" #: src/Arguments.cc:629 src/Arguments.cc:643 src/Arguments.cc:701 #, c-format msgid "" "the \"%s\" argument cannot be used here because the verbosity has already " "been set." msgstr "" #: src/Arguments.cc:659 src/Arguments.cc:669 src/Arguments.cc:679 #: src/Arguments.cc:697 msgid "you cannot use more than one debug command at a time." msgstr "" #: src/Arguments.cc:711 msgid "the debug level argument can be used only once." msgstr "" #: src/Arguments.cc:715 #, c-format msgid "the \"%s\" argument must be followed by the debug level." msgstr "" #: src/Arguments.cc:741 msgid "unknown terminal. the passphrase you type now will be visible." msgstr "" #: src/Arguments.cc:745 msgid "Enter passphrase: " msgstr "" #: src/Arguments.cc:758 msgid "Re-Enter passphrase: " msgstr "" #: src/Arguments.cc:770 msgid "the passphrases do not match." msgstr "" #: src/AssertionFailed.cc:28 msgid "" "This means that you have found a bug. Please let me (shetzl@chello.at)\n" "know this if you have a way to reproduce the error.\n" "Steghide has to exit now. Sorry.\n" msgstr "" #: src/AssertionFailed.h:30 #, c-format msgid "assertion failed in %s at line number %d." msgstr "" #: src/AuFile.cc:94 #, c-format msgid "the au file on standard input uses the unkown encoding %d." msgstr "" #: src/AuFile.cc:97 #, c-format msgid "the au file \"%s\" uses the unknown encoding %d." msgstr "" #: src/AuFile.cc:107 #, c-format msgid "an error occured while reading the au headers from the file \"%s\"." msgstr "" #: src/AuFile.cc:113 #, c-format msgid "premature end of file \"%s\" while reading au headers." msgstr "" #: src/AuFile.cc:119 msgid "an error occured while reading the au headers from standard input." msgstr "" #: src/AuFile.cc:125 msgid "premature end of data from standard input while reading au headers." msgstr "" #: src/AuFile.cc:165 #, c-format msgid "an error occured while writing the au headers to the file \"%s\"." msgstr "" #: src/AuFile.cc:171 msgid "an error occured while writing the au headers to standard output." msgstr "" #: src/AuFile.cc:188 msgid ", mu-law encoding" msgstr "" #: src/AuFile.cc:193 msgid ", PCM encoding" msgstr "" #: src/AuFile.cc:196 src/BmpFile.cc:87 src/JpegFile.cc:61 src/WavFile.cc:81 msgid "format" msgstr "" #: src/AudioData.h:94 src/WavFile.cc:249 #, c-format msgid "an error occured while reading the audio data from the file \"%s\"." msgstr "" #: src/AudioData.h:100 src/WavFile.cc:253 #, c-format msgid "premature end of file \"%s\" while reading audio data." msgstr "" #: src/AudioData.h:106 src/WavFile.cc:257 msgid "an error occured while reading the audio data from standard input." msgstr "" #: src/AudioData.h:112 src/WavFile.cc:261 msgid "premature end of data from standard input while reading audio data." msgstr "" #: src/AudioData.h:134 src/WavFile.cc:302 #, c-format msgid "an error occured while writing the audio data to the file \"%s\"." msgstr "" #: src/AudioData.h:140 src/WavFile.cc:306 msgid "an error occured while writing the audio data to standard output." msgstr "" #: src/BinaryIO.cc:67 #, c-format msgid "the file \"%s\" does already exist. overwrite ?" msgstr "" #: src/BinaryIO.cc:70 #, c-format msgid "did not write to file \"%s\"." msgstr "" #: src/BinaryIO.cc:113 #, c-format msgid "could not open the file \"%s\"." msgstr "" #: src/BinaryIO.cc:137 #, c-format msgid "could not close the file \"%s\"." msgstr "" #: src/BitString.cc:299 src/BitString.cc:347 src/MCryptPP.cc:322 #: src/MHashKeyGen.cc:115 msgid "could not allocate memory." msgstr "" #: src/BitString.cc:303 #, c-format msgid "error %d while calling zlib's compress2." msgstr "" #: src/BitString.cc:351 msgid "can not uncompress data. compressed data is corrupted." msgstr "" #: src/BitString.cc:355 #, c-format msgid "error %d while calling zlib's uncompress." msgstr "" #: src/BmpFile.cc:80 msgid "Windows 3.x bitmap" msgstr "" #: src/BmpFile.cc:84 msgid "OS/2 1.x bitmap" msgstr "" #: src/BmpFile.cc:428 #, c-format msgid "" "the bmp data from standard input has a format that is not supported (biSize: " "%lu)." msgstr "" #: src/BmpFile.cc:431 #, c-format msgid "the bmp file \"%s\" has a format that is not supported (biSize: %lu)." msgstr "" #: src/BmpFile.cc:439 #, c-format msgid "an error occured while reading the bmp headers from the file \"%s\"." msgstr "" #: src/BmpFile.cc:443 #, c-format msgid "premature end of file \"%s\" while reading bmp headers." msgstr "" #: src/BmpFile.cc:447 msgid "an error occured while reading the bmp headers from standard input." msgstr "" #: src/BmpFile.cc:451 msgid "premature end of data from standard input while reading bmp headers." msgstr "" #: src/BmpFile.cc:492 #, c-format msgid "" "the bmp data from standard input has a format that is not supported " "(biBitCount: %d)." msgstr "" #: src/BmpFile.cc:495 #, c-format msgid "" "the bmp file \"%s\" has a format that is not supported (biBitCount: %d)." msgstr "" #: src/BmpFile.cc:502 msgid "" "the bitmap data from standard input is compressed which is not supported." msgstr "" #: src/BmpFile.cc:505 #, c-format msgid "the bitmap data in \"%s\" is compressed which is not supported." msgstr "" #: src/BmpFile.cc:521 src/BmpFile.cc:610 msgid "using a black/white bitmap as cover is very insecure!" msgstr "" #: src/BmpFile.cc:529 src/BmpFile.cc:618 msgid "using a 16-color bitmap as cover is very insecure!" msgstr "" #: src/BmpFile.cc:552 msgid "maybe corrupted windows bmp data (Reserved in RGBQUAD is non-zero)." msgstr "" #: src/BmpFile.cc:595 #, c-format msgid "" "the bmp data from standard input has a format that is not supported " "(bcBitCount: %d)." msgstr "" #: src/BmpFile.cc:598 #, c-format msgid "" "the bmp file \"%s\" has a format that is not supported (bcBitCount: %d)." msgstr "" #: src/BmpFile.cc:669 #, c-format msgid "an error occured while writing the bmp headers to the file \"%s\"." msgstr "" #: src/BmpFile.cc:673 msgid "an error occured while writing the bmp headers to standard output." msgstr "" #: src/BmpFile.cc:776 #, c-format msgid "maybe corrupted bmp data (padding byte at 0x%lx set to non-zero)." msgstr "" #: src/BmpFile.cc:790 #, c-format msgid "an error occured while reading the bmp data from the file \"%s\"." msgstr "" #: src/BmpFile.cc:794 #, c-format msgid "premature end of file \"%s\" while reading bmp data." msgstr "" #: src/BmpFile.cc:798 msgid "an error occured while reading the bmp data from standard input." msgstr "" #: src/BmpFile.cc:802 msgid "premature end of bmp data from standard input." msgstr "" #: src/BmpFile.cc:840 #, c-format msgid "an error occured while writing the bitmap data to the file \"%s\"." msgstr "" #: src/BmpFile.cc:844 msgid "an error occured while writing the bitmap data to standard output." msgstr "" #: src/CvrStgFile.cc:212 msgid "" "can not read input file. steghide has been compiled without support for jpeg " "files." msgstr "" #: src/EmbData.cc:91 msgid "could not extract any data with that passphrase!" msgstr "" #: src/EmbData.cc:107 #, c-format msgid "" "attempting to read an embedding of version %d but steghide %s only supports " "embeddings of version %d." msgstr "" #: src/EmbData.cc:137 msgid "" "The embedded data is encrypted but steghide has been compiled without " "encryption\n" "support. To be able to read the embedded data, you have to install " "libmcrypt\n" "(http://mcrypt.sourceforge.net/) and recompile steghide." msgstr "" #: src/EmbData.cc:226 msgid "the embedded data has an invalid length." msgstr "" #: src/Embedder.cc:48 msgid "reading secret data from standard input..." msgstr "" #: src/Embedder.cc:51 #, c-format msgid "reading secret file \"%s\"..." msgstr "" #: src/Embedder.cc:63 src/Extractor.cc:46 src/ProgressOutput.cc:71 #: src/Session.cc:88 msgid " done" msgstr "" #: src/Embedder.cc:84 msgid "reading cover file from standard input..." msgstr "" #: src/Embedder.cc:87 #, c-format msgid "reading cover file \"%s\"..." msgstr "" #: src/Embedder.cc:98 msgid "the cover file is too short to embed the data." msgstr "" #: src/Embedder.cc:104 msgid "creating the graph..." msgstr "" #: src/Embedder.cc:148 src/Embedder.cc:154 msgid "standard input" msgstr "" #: src/Embedder.cc:160 #, c-format msgid "embedding %s in %s..." msgstr "" #: src/Embedder.cc:189 msgid "writing stego file to standard output... " msgstr "" #: src/Embedder.cc:194 #, c-format msgid "writing stego file \"%s\"... " msgstr "" #: src/Embedder.cc:204 msgid "done" msgstr "" #: src/Embedder.cc:217 #, c-format msgid "executing %s..." msgstr "" #: src/Extractor.cc:36 msgid "reading stego file from standard input..." msgstr "" #: src/Extractor.cc:39 #, c-format msgid "reading stego file \"%s\"..." msgstr "" #: src/Extractor.cc:52 msgid "extracting data..." msgstr "" #: src/Extractor.cc:62 msgid "" "the stego data from standard input is too short to contain the embedded data." msgstr "" #: src/Extractor.cc:65 #, c-format msgid "the stego file \"%s\" is too short to contain the embedded data." msgstr "" #: src/Extractor.cc:82 msgid "checking crc32 checksum..." msgstr "" #: src/Extractor.cc:86 msgid " ok" msgstr "" #: src/Extractor.cc:90 msgid " FAILED!" msgstr "" #: src/Extractor.cc:93 msgid "crc32 checksum failed! extracted data is probably corrupted." msgstr "" #: src/Graph.cc:253 #, c-format msgid " %lu sample values, %lu vertices, %lu edges" msgstr "" #: src/JpegFile.cc:73 msgid "can not use standard input as source for jpeg files with libjpeg." msgstr "" #: src/MCryptPP.cc:64 src/MCryptPP.cc:249 #, c-format msgid "could not open libmcrypt module \"%s\",\"%s\"." msgstr "" #: src/MCryptPP.cc:119 msgid "" "could not initialize libmcrypt encryption. see above error messages if any." msgstr "" #: src/MCryptPP.cc:132 msgid "could not encrypt data." msgstr "" #: src/MCryptPP.cc:154 msgid "could not finish libmcrypt encryption." msgstr "" #: src/MCryptPP.cc:185 msgid "" "could not initialize libmcrypt decryption. see above error messages if any." msgstr "" #: src/MCryptPP.cc:198 msgid "could not decrypt data." msgstr "" #: src/MCryptPP.cc:209 msgid "could not finish libmcrypt decryption." msgstr "" #: src/MHashKeyGen.cc:61 msgid "could not generate key using libmhash." msgstr "" #: src/MHashPP.cc:45 #, c-format msgid "could not initialize libmhash %s algorithm." msgstr "" #: src/ProgressOutput.cc:79 msgid " done\n" msgstr "" #: src/RandomSource.cc:38 msgid "" "could not open /dev/urandom, using standard library random numbers instead." msgstr "" #: src/RandomSource.cc:53 msgid "could not close random input file." msgstr "" #: src/Session.cc:64 msgid "" "please specify a file name for the extracted data (there is no name embedded " "in the stego file)." msgstr "" #: src/Session.cc:71 msgid "writing extracted data to standard output..." msgstr "" #: src/Session.cc:75 #, c-format msgid "writing extracted data to \"%s\"..." msgstr "" #: src/Session.cc:94 #, c-format msgid "wrote extracted data to \"%s\"." msgstr "" #: src/Session.cc:138 msgid "data from standard input:\n" msgstr "" #: src/Session.cc:145 msgid "capacity" msgstr "" #: src/Session.cc:152 msgid "Try to get information about embedded data ?" msgstr "" #: src/Session.cc:171 msgid " embedded data:\n" msgstr "" #: src/Session.cc:174 #, c-format msgid " embedded file \"%s\":\n" msgstr "" #: src/Session.cc:177 #, c-format msgid " size: %s\n" msgstr "" #: src/Session.cc:180 src/Session.cc:186 msgid "no" msgstr "" #: src/Session.cc:185 #, c-format msgid " encrypted: %s\n" msgstr "" #: src/Session.cc:186 #, c-format msgid " compressed: %s\n" msgstr "" #: src/Session.cc:186 msgid "yes" msgstr "" #: src/Session.cc:191 msgid "could not extract any data with that passphrase!\n" msgstr "" #: src/Session.cc:214 msgid "" "encryption algorithms:\n" ": ...\n" msgstr "" #: src/Session.cc:231 msgid "" "steghide has been compiled without support for encryption.\n" "If you want to encrypt your data before embedding it, use an external " "encryption\n" "program or install libmcrypt (http://mcrypt.sourceforge.net/) and recompile " "steghide.\n" msgstr "" #: src/Session.cc:245 msgid "" "\n" "the first argument must be one of the following:\n" " embed, --embed embed data\n" " extract, --extract extract data\n" " info, --info display information about a cover- or stego-file\n" " info display information about \n" " encinfo, --encinfo display a list of supported encryption algorithms\n" " version, --version display version information\n" " license, --license display steghide's license\n" " help, --help display this usage information\n" "\n" "embedding options:\n" " -ef, --embedfile select file to be embedded\n" " -ef embed the file \n" " -cf, --coverfile select cover-file\n" " -cf embed into the file \n" " -p, --passphrase specify passphrase\n" " -p use to embed data\n" " -sf, --stegofile select stego file\n" " -sf write result to instead of cover-file\n" " -e, --encryption select encryption parameters\n" " -e []|[] specify an encryption algorithm and/or mode\n" " -e none do not encrypt data before embedding\n" " -z, --compress compress data before embedding (default)\n" " -z using level (1 best speed...9 best " "compression)\n" " -Z, --dontcompress do not compress data before embedding\n" " -K, --nochecksum do not embed crc32 checksum of embedded data\n" " -N, --dontembedname do not embed the name of the original file\n" " -f, --force overwrite existing files\n" " -q, --quiet suppress information messages\n" " -v, --verbose display detailed information\n" "\n" "extracting options:\n" " -sf, --stegofile select stego file\n" " -sf extract data from \n" " -p, --passphrase specify passphrase\n" " -p use to extract data\n" " -xf, --extractfile select file name for extracted data\n" " -xf write the extracted data to \n" " -f, --force overwrite existing files\n" " -q, --quiet suppress information messages\n" " -v, --verbose display detailed information\n" "\n" "options for the info command:\n" " -p, --passphrase specify passphrase\n" " -p use to get info about embedded data\n" "\n" "To embed emb.txt in cvr.jpg: steghide embed -cf cvr.jpg -ef emb.txt\n" "To extract embedded data from stg.jpg: steghide extract -sf stg.jpg\n" msgstr "" #: src/SteghideError.cc:27 msgid "error, exiting. (no error message defined)." msgstr "" #: src/Terminal.cc:31 src/Terminal.cc:39 src/Terminal.cc:53 msgid "could not get terminal attributes." msgstr "" #: src/Terminal.cc:45 src/Terminal.cc:61 src/Terminal.cc:68 msgid "could not set terminal attributes." msgstr "" #: src/WavFile.cc:346 #, c-format msgid "an error occured while reading the wav headers from the file \"%s\"." msgstr "" #: src/WavFile.cc:352 #, c-format msgid "premature end of file \"%s\" while reading wav headers." msgstr "" #: src/WavFile.cc:358 msgid "an error occured while reading the wav headers from standard input." msgstr "" #: src/WavFile.cc:364 msgid "premature end of data from standard input while reading wav headers." msgstr "" #: src/WavFile.cc:394 #, c-format msgid "an error occured while writing the wav headers to the file \"%s\"." msgstr "" #: src/WavFile.cc:400 msgid "an error occured while writing the wav headers to standard output." msgstr "" #: src/WavFormatChunk.cc:31 #, c-format msgid "" "the wav file from standard input has a format that is not supported " "(FormatTag: 0x%X)." msgstr "" #: src/WavFormatChunk.cc:34 #, c-format msgid "" "the wav file \"%s\" has a format that is not supported (FormatTag: 0x%X)." msgstr "" #: src/WavFormatChunk.cc:49 msgid "" "the wav file from standard input does not have pcm format (header too long)." msgstr "" #: src/WavFormatChunk.cc:52 #, c-format msgid "the wav file \"%s\" does not have pcm format (header too long)." msgstr "" #: src/WavFormatChunk.cc:57 msgid "the wav file from standard input is corrupted." msgstr "" #: src/WavFormatChunk.cc:60 #, c-format msgid "the wav file \"%s\" is corrupted." msgstr "" #: src/error.cc:45 msgid "type \"steghide --help\" for help." msgstr "" #: src/error.cc:56 msgid "premature end of data from standard input." msgstr "" #: src/error.cc:60 #, c-format msgid "premature end of file \"%s\"." msgstr "" #: src/error.cc:66 msgid "an error occured while reading data from standard input." msgstr "" #: src/error.cc:70 #, c-format msgid "an error occured while reading data from the file \"%s\"." msgstr "" #: src/error.cc:93 msgid "an error occured while writing data to standard output." msgstr "" #: src/error.cc:97 #, c-format msgid "an error occured while writing data to the file \"%s\"." msgstr "" #: src/error.cc:119 msgid "the file format of the data from standard input is not supported." msgstr "" #: src/error.cc:122 #, c-format msgid "the file format of the file \"%s\" is not supported." msgstr "" #: src/error.cc:141 msgid "" "This feature is not (yet) available. Please let me (shetzl@chello.at) know\n" "that you want to use this functionality to increase the chance that this " "will\n" "be implemented in the near future. Steghide has to exit now. Sorry.\n" msgstr "" #: src/error.cc:161 msgid "" "Other possible reasons for this error are that the passphrase is wrong\n" "or that there is no embedded data.\n" msgstr "" #: src/msg.cc:35 msgid "__no_message_defined__" msgstr "" #: src/msg.cc:135 src/msg.cc:153 msgid "warning:" msgstr "" #: src/msg.cc:162 src/msg.cc:169 src/msg.cc:176 msgid "y" msgstr "" #: src/msg.cc:163 src/msg.cc:170 src/msg.cc:177 msgid "n" msgstr "" #: src/msg.cc:188 msgid "unknown terminal. you might need to press after answering." msgstr "" steghide-0.5.1/po/Makefile.in.in0000644000076400001440000002430007735602332012070 # Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2002 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ localedir = $(datadir)/locale gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \ $(POFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common); do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all $(mkinstalldirs) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkinstalldirs) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: $(mkinstalldirs) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkinstalldirs) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext"; then \ for file in $(DISTFILES.common); do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all dvi info tags TAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: $(DISTFILES) dists="$(DISTFILES)"; \ if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir); \ else \ cp -p $(srcdir)/$$file $(distdir); \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: steghide-0.5.1/doc/0000777000076400001440000000000007743177374007646 5steghide-0.5.1/doc/es/0000777000076400001440000000000007743177374010255 5steghide-0.5.1/doc/es/steghide.10000644000076400001440000002556707742457567012072 .\" steghide 0.5.1 página de man .TH steghide 1 "14 Mayo 2002" .SH NAME steghide \- un programa de estenografía .SH SYNOPSIS .B steghide .I comando [ .I argumentos ] .SH DESCRIPCIÓN .B Steghide es un programa de estenografía que permite ocultar datos en varios tipos de imagen- y archivos de audio. Los respectivos muestreos de frecuencia de color no varían lo que hace que el adjunto soporte pruebas estadísticas del primer orden. Sus características incluyen el compactado y el encriptado de los datos adjuntos, y revisión automática de integridad usando un checksum. Se reconocen los formatos de archivo JPEG, BMP, WAV y AU para usar como archivos de portada. No existen restricciones en el formato de los datos ocultos. Steghide aplica un enfoque estenográfico 'gráfico-teórico'(e.i.'graph-theoretic'). No necesitamos saber nada sobre teorías gráficas para usar steghide. Tranquilamente podemos saltearnos el resto del párrafo si no nos interesan los detalles técnicos. El algoritmo de adjunto funciona así a groso modo: Primero, se compacta y encripta la información secreta. Luego se crea una secuencia de posiciones de pixels en el archivo portada basado en un generador pseudo-aleatorio de números inicializado con un salvoconducto (los datos secretos se adjuntarán en los pixels de estas posiciones). En estas posiciones,se excluyen los que no necesitan cambiarse (porque ya tienen el valor correcto, por casualidad). Luego, un algoritmo gráfico-teórico de concordancia halla pares de posiciones de forma que al intercambiar sus valores dejemos adjunta la parte correspondiente a los datos secretos. Cuando el algoritmo encuentra el último par, se realiza el intercambio. Los pixels de las posiciones sobrantes(las posiciones que no conforman dichos pares) también se modifican para llevar los datos adjuntos(pero esto se hace sobreescribiéndolos, no intercambiándolos con otros pixels). El hecho de que (en su mayor parte) se adjunta intercambiando valores de píxels implica que las estadísticas de primer orden (x.e. las veces que se usa un color en la imagen) no se alteran. En los archivos de audio se usa el mismo algoritmo, aunque se usan muestras de audio en lugar de pixels. El algoritmo de encriptado por omisión es el Rijndael con clave de 128 bits de tamaño (que es EAE (e.i.AES)\- Encriptado Avanzado Estandar) en la modalidad de encadenado de bloques de cifras. Si esta combinación, por el motivo que sea, no nos da confianza, tenemos la libertad de elegir otra combinación de algoritmo/tipo (el comando \fBencinfo\fP nos muestra información sobre todas las combinaciones de algoritmos y tipos). El checksum se calcula usando el algoritmo CRC32. .SH COMANDOS En esta sección se listan los comandos de steghide. El primer argumento deberá ser siempre uno de los siguientes comandos. Podemos agregarle argumentos adicionales a los comandos \fBembed\fP, \fBextract\fP y \fBinfo\fP. Los demás comandos no llevan ningún argumento. .TP .B "embed, --embed" Adjuntar datos secretos en un archivo portada creando un archivo stego. .TP .B "extract, --extract" Extraer datos secretos de un archivo stego. .TP .B "info, --info" Mostrar información sobre un archivo portada o uno stego. .TP .B "encinfo, --encinfo" Mostrar una lista de algoritmos y tipos que pueden usarse. No necesita argumentos. .TP .B "version, --version" Mostrar una breve información sobre la version. No necesita argumentos. .TP .B "license, --license" Mostrar la licencia de steghide. No necesita argumentos. .TP .B "help, --help" Mostrar una pantalla de ayuda. No necesita argumentos. .SH ADJUNTO Deberíamos usar el comando \fBembed\fP cuando queremos adjuntar datos secretos en un archivo de portada. Con el comando \fBembed\fP pueden usarse los siguientes argumentos: .TP .B "-ef, --embedfile \fInomArchivo\fP" Declarar el archivo a adjuntar(el archivo que tiene el mensaje secreto). Notar que steghide adjunta el nombre original del archivo en el archivo stego. Cuando extraemos los datos (ver más abajo) tiende, por omisión, a grabar el archivo adjunto en el directorio actual y con su nombre de archivo original. Si se omite este argumento o \fInomArchivo\fP es \fB-\fP, steghide leerá los datos secretos desde la entrada estandar. .TP .B "-cf, --coverfile \fInomArchivo\fP" Declarar el nombre del archivo de portada que usaremos para adjuntar los datos. El archivo de portada debe tener uno de los siguientes formatos: AU, BMP, JPEG o WAV. El formato del archivo se detecta automáticamente basándose en la información de su cabecera (no importa su extensión). Si omitimos este argumento o \fInomArchivo\fP es \fB-\fP, steghide leerá el archivo de portada desde la entrada estandar. .TP .B "-sf, --stegofile \fInomArchivo\fP" Declarar el nombre del archivo stego a crearse. Si omitimos este argumento cuando llamamos a steghide con el comando \fBembed\fP, las modificaciones para adjuntar los datos secretos se harán directamente en el archivo portada sin grabarlo con un nombre nuevo. .TP .B "-e, --encryption \fIalgo\fP [ \fItipo\fP ] | \fItipo\fP [ \fIalgo\fP ]" Declarar parámetros de encriptado. A esta opción debe seguirle una o dos cadenas que definan un algoritmo de encriptado y/o un tipo. Los nombres de todos los algoritmos y tipos posibles pueden obtenerse con el comando \fBencinfo\fP. El encriptado por omisión es \fBrijndael-128\fP (EAE) de tipo \fBcbc\fP. Si no quisiéramos usar ningún encriptado, usaríamos \fB-e none\fP. .TP .B "-z, --compress \fInivel\fP" Declarar el nivel de compactado. El nivel de compactado es de 1...9. Donde 1 representa el más rápido y 9 representa el mejor compactado. .TP .B "-Z, --dontcompress" No compactar la información secreta antes de adjuntarla. .TP .B "-K, --nochecksum" No adjuntar el checksum CRC32. Podemos usar esto si los datos secretos ya tienen algún tipo de checksum o si no queremos adjuntar esos 32 bits extras para hacer el checksum. .TP .B "-N, --dontembedname" No adjuntar el nombre del archivo secreto. Si se usa esta opinión, el extractor necesitará declarar un nombre de archivo para decirle a steghide en donde escribiremos los datos adjuntos. .SH EXTRACCIÓN Si hemos recibido un archivo que tiene un mensaje adjunto con steghide, usaremos el comando \fBextract\fP para extraerlo. Pueden usarse los siguientes argumentos con este comando. .TP .B "-sf, --stegofile \fInomArchivo\fP" Declara el archivo stego (el archivo que contiene los datos adjuntos). Si se omite este argumento o \fInomArchivo\fP es \fB-\fP, steghide leerá un archivo stego desde la entrada estandar. .TP .B "-xf, --extractfile \fInomArchivo\fP" Crear un archivo con nombre \fInomArchivo\fP y grabar los datos adjuntos del archivo stego en él. Esta opción sobreescribe el nombre del archivo adjuntado en el archivo stego. Si se omite este argumento, los datos adjuntos se grabarán en el directorio actual con su nombre original. .SH OBTENIENDO INFORMACIÓN DE UN ARCHIVO DE PORTADA/STEGO Podemos usar el comando \fBinfo\fP para obtener información sobre un archivo portada o stego (por ejemplo su tamaño). Podríamos necesitar usarlo cuando recibimos un archivo y no estamos seguros de que contenga un mensaje adjunto o si pensamos usar cierto archivo como archivo portada y queremos averiguar su tamaño. El comando de linea \fBsteghide info\fP \fI\fP devolverá información sobre \fI\fP y luego nos preguntará si queremos ver la información sobre los datos adjuntos en ese archivo. Si respondemos 'yes' tendremos que escribir el salvoconducto que se usó para adjuntar los datos en ese archivo. También podemos agregarle el argumento \fB-p, --passphrase\fP (ver abajo) al comando \fBinfo\fP para que steghide intente obtener automáticamente la información adjunta usando el salvoconducto declarado. .SH OPCIONES COMUNES Las siguientes opciones pueden usarse en todos los comandos (donde tenga algún sentido). .TP .B "-p, --passphrase" Usar como salvoconducto, la cadena que le sigue a este argumento. Si nuestro salvoconducto contiene espacios en blanco, habremos de encerrar todo entre comillas, por ejemplo: \fB-p "un salvoconducto muy extenso"\fP. .TP .B "-v, --verbose" Mostrar información muy detallada sobre el estado del proceso de adjuntado o del de extracción. .TP .B "-q, --quiet" Evitar mensajes informativos. .TP .B "-f, --force" Siempre sobreescribir los archivos existentes. .SH OPCIONES DE NOMBRE DE ARCHIVO Todos los argumentos de nombre de archivo (\fB-cf\fP, \fB-ef\fP, \fB-sf\fP, \fB-xf\fP) también aceptan \fB-\fP como nombre de archivo lo que hará que steghide use la entrada o salida estandar (lo que tenga sentido). Omitiendo el argumento correspondiente a su nombre de archivo es lo mismo que escribir \fB-\fP excepto en dos casos: Si se omite \fB-sf\fP en el comando embed, se harán las modificaciones directamente sobre el archivo de cubierta. Si se omite \fB-xf\fP para la extracción, los datos adjuntos se grabarán con el nombre de archivo que figura en el archivo stego. Así que cuando queramos asegurarnos de que se use la entrada/salida estandar, usaremos \fB-\fP como nombre de archivo. .SH EJEMPLOS Básicamente se usa así: $ steghide embed -cf imagen.jpg -ef secreto.txt Ingrese salvoconducto: Re-ingrese salvoconducto: adjuntando "secreto.txt" en "imagen.jpg"... hecho Este comando adjuntará el archivo secreto.txt en el archivo de portada imagen.jpg. Una vez adjuntado nuestro archivo de datos secretos como vimos antes se puede enviar el archivo imagen.jpg a la persona que debería recibir el mensaje secreto. El receptor debe usar steghide de la siguiente manera: $ steghide extract -sf imagen.jpg Ingrese salvoconducto: los datos extraídos se grabaron en "secreto.txt". Si el salvoconducto declarado es el correcto, el contenido del archivo original secreto.txt se extraerá del archivo stego imagen.jpg y se grabará en el directorio actual. Si hemos recibido un archivo que contiene datos adjuntos y quisiéramos tener más información sobre el mismo antes de extraerlo, usaremos el comando info: $ steghide info archivo_recibido.wav "archivo_recibido.wav": formato: wave audio, PCM encoding capacidad: 3.5 KB ¿ Intento extraer información sobre los datos adjuntos? (y/n) y Ingrese salvoconducto: archivo adjunto "secreto.txt": tamaño: 1.6 KB encriptado: rijndael-128, cbc comprimido: si Luego de emitir algunos datos generales sobre el archivo stego (formato, capacidad) se nos preguntará si queremos que steghide obtenga información sobre los datos adjuntos. Si respondemos con yes tendremos que declarar un salvoconducto. Steghide entonces intentará extraer los datos adjuntos con ese salvoconducto y - si tiene 'éxito - emitirá un informe sobre el mismo. .SH VALOR DE RESPUESTA Steghide devuelve 0 si tiene éxito 1 si ocurre un fallo y debe terminar antes de terminar la operación solicitada. Las advertencias no tienen efecto en los valores de respuesta. .SH AUTOR Stefan Hetzl .SH Traducción al castellano versión 1 - Alberto Adrián Schiano steghide-0.5.1/doc/steghide.10000644000076400001440000002426407743177043011441 .\" steghide 0.5.1 man page .TH steghide 1 "13 Oct 2003" .SH NAME steghide \- a steganography program .SH SYNOPSIS .B steghide .I command [ .I arguments ] .SH DESCRIPTION .B Steghide is a steganography program that is able to hide data in various kinds of image- and audio-files. The color- respectivly sample-frequencies are not changed thus making the embedding resistant against first-order statistical tests. Features include the compression of the embedded data, encryption of the embedded data and automatic integrity checking using a checksum. The JPEG, BMP, WAV and AU file formats are supported for use as cover file. There are no restrictions on the format of the secret data. Steghide uses a graph-theoretic approach to steganography. You do not need to know anything about graph theory to use steghide and you can safely skip the rest of this paragraph if you are not interested in the technical details. The embedding algorithm roughly works as follows: At first, the secret data is compressed and encrypted. Then a sequence of postions of pixels in the cover file is created based on a pseudo-random number generator initialized with the passphrase (the secret data will be embedded in the pixels at these positions). Of these positions those that do not need to be changed (because they already contain the correct value by chance) are sorted out. Then a graph-theoretic matching algorithm finds pairs of positions such that exchanging their values has the effect of embedding the corresponding part of the secret data. If the algorithm cannot find any more such pairs all exchanges are actually performed. The pixels at the remaining positions (the positions that are not part of such a pair) are also modified to contain the embedded data (but this is done by overwriting them, not by exchanging them with other pixels). The fact that (most of) the embedding is done by exchanging pixel values implies that the first-order statistics (i.e. the number of times a color occurs in the picture) is not changed. For audio files the algorithm is the same, except that audio samples are used instead of pixels. The default encryption algorithm is Rijndael with a key size of 128 bits (which is AES \- the advanced encryption standard) in the cipher block chaining mode. If you do not trust this combination for whatever reason feel free to choose another algorithm/mode combination (information about all possible algorithms and modes is displayed by the \fBencinfo\fP command). The checksum is calculated using the CRC32 algorithm. .SH COMMANDS In this section the commands for steghide are listed. The first argument must always be one of these commands. You can supply additional arguments to the \fBembed\fP, \fBextract\fP and \fBinfo\fP commands. The other commands to not take any arguments. .TP .B "embed, --embed" Embed secret data in a cover file thereby creating a stego file. .TP .B "extract, --extract" Extract secret data from a stego file. .TP .B "info, --info" Display information about a cover or stego file. .TP .B "encinfo, --encinfo" Display a list of encryption algorithms and modes that can be used. No arguments required. .TP .B "version, --version" Display short version information. No arguments required. .TP .B "license, --license" Display steghide's license. No arguments required. .TP .B "help, --help" Display a help screen. No arguments required. .SH EMBEDDING You should use the \fBembed\fP command if you want to embed secret data in a cover file. The following arguments can be used with the \fBembed\fP command: .TP .B "-ef, --embedfile \fIfilename\fP" Specify the file that will be embedded (the file that contains the secret message). Note that steghide embeds the original file name in the stego file. When extracting data (see below) the default behaviour is to save the embedded file into the current directory under its original name. If this argument is omitted or \fIfilename\fP is \fB-\fP, steghide will read the secret data from standard input. .TP .B "-cf, --coverfile \fIfilename\fP" Specify the cover file that will be used to embed data. The cover file must be in one of the following formats: AU, BMP, JPEG or WAV. The file-format will be detected automatically based on header information (the extension is not relevant). If this argument is omitted or \fIfilename\fP is \fB-\fP, steghide will read the cover file from standard input. .TP .B "-sf, --stegofile \fIfilename\fP" Specify the name for the stego file that will be created. If this argument is omitted when calling steghide with the \fBembed\fP command, then the modifications to embed the secret data will be made directly to the cover file without saving it under a new name. .TP .B "-e, --encryption \fIalgo\fP [ \fImode\fP ] | \fImode\fP [ \fIalgo\fP ]" Specify encryption parameters. This option must be followed by one or two strings that identify an encryption algorithm and/or mode. You can get the names of all available algorithms and supported modes with the \fBencinfo\fP command. The default encryption is \fBrijndael-128\fP (AES) in the \fBcbc\fP mode. If you do not want to use any encryption, use \fB-e none\fP. .TP .B "-z, --compress \fIlevel\fP" Specify the compression level. The compression level can be any number in 1...9 where 1 means best speed and 9 means best compression. .TP .B "-Z, --dontcompress" Do not compress the secret data before embedding it. .TP .B "-K, --nochecksum" Do not embed a CRC32 checksum. You can use this if the secret data already contains some type of checksum or if you do not want to embed those extra 32 bits needed for the checksum. .TP .B "-N, --dontembedname" Do not embed the file name of the secret file. If this option is used, the extractor needs to specify a filename to tell steghide where to write the embedded data. .SH EXTRACTING If you have received a file that contains a message that has been embedded with steghide, use the \fBextract\fP command to extract it. The following arguments can be used with this command. .TP .B "-sf, --stegofile \fIfilename\fP" Specify the stego file (the file that contains embedded data). If this argument is omitted or \fIfilename\fP is \fB-\fP, steghide will read a stego file from standard input. .TP .B "-xf, --extractfile \fIfilename\fP" Create a file with the name \fIfilename\fP and write the data that is embedded in the stego file to it. This option overrides the filename that is embedded int the stego file. If this argument is omitted, the embedded data will be saved to the current directory under its original name. .SH GETTING INFORMATION ABOUT A COVER/STEGO FILE You can use the \fBinfo\fP command to get some information about a cover or stego file (for example the capacity). You might want to use this if you have received a file and you are not sure if it contains an embedded message or if you consider using a certain file as cover file and want to find out its capacity. The command line \fBsteghide info\fP \fI\fP will print information about \fI\fP and then ask you if you would like to get information about data that is embedded in that file. If you answer with yes you have to supply the passphrase that was used to embed the data in that file. You can also supply the \fB-p, --passphrase\fP argument (see below) to the \fBinfo\fP command which has the effect that steghide will automatically try to get information about the data that has been embedded using the given passphrase. .SH COMMON OPTIONS The following options can be used with all commands (where it makes sense). .TP .B "-p, --passphrase" Use the string following this argument as the passphrase. If your passphrase contains whitespace, you have to enclose it in quotes, for example: \fB-p "a very long passphrase"\fP. .TP .B "-v, --verbose" Display detailed information about the status of the embedding or extracting process. .TP .B "-q, --quiet" Supress information messages. .TP .B "-f, --force" Always overwrite existing files. .SH FILE NAME OPTIONS All file name arguments (\fB-cf\fP, \fB-ef\fP, \fB-sf\fP, \fB-xf\fP) also accept \fB-\fP as a filename which makes steghide use standard input or standard output (whichever makes sense). Omitting the corresponding file name argument will have the same effect as using \fB-\fP with two exceptions: If \fB-sf\fP is omitted for the embed command, then the modifications will be done directly in the cover file. If \fB-xf\fP is omitted for extraction, then the embedded data will be saved under the file name that is embedded in the stego file. So when you want to be sure that standard input/output is used, use \fB-\fP as filename. .SH EXAMPLES The basic usage is as follows: $ steghide embed -cf picture.jpg -ef secret.txt Enter passphrase: Re-Enter passphrase: embedding "secret.txt" in "picture.jpg"... done This command will embed the file secret.txt in the cover file picture.jpg. After you have embedded your secret data as shown above you can send the file picture.jpg to the person who should receive the secret message. The receiver has to use steghide in the following way: $ steghide extract -sf picture.jpg Enter passphrase: wrote extracted data to "secret.txt". If the supplied passphrase is correct, the contents of the original file secret.txt will be extracted from the stego file picture.jpg and saved in the current directory. If you have received a file that contains embedded data and you want to get some information about it before extracting it, use the info command: $ steghide info received_file.wav "received_file.wav": format: wave audio, PCM encoding capacity: 3.5 KB Try to get information about embedded data ? (y/n) y Enter passphrase: embedded file "secret.txt": size: 1.6 KB encrypted: rijndael-128, cbc compressed: yes After printing some general information about the stego file (format, capacity) you will be asked if steghide should try to get information about the embedded data. If you answer with yes you have to supply a passphrase. Steghide will then try to extract the embedded data with that passphrase and - if it succeeds - print some information about it. .SH RETURN VALUE Steghide returns 0 on success and 1 if a failure occured and it had to terminate before completion of the requested operation. Warnings do not have an effect on the return value. .SH AUTHOR Stefan Hetzl steghide-0.5.1/doc/Makefile.am0000644000076400001440000000037207742462335011611 man_MANS = steghide.1 EXTRA_DIST = steghide.1 es/steghide.1 MAINTAINERCLEANFILES = Makefile.in if HAVE_DOXYGEN noinst_DATA = doxygen clean-local: rm -rf doxygen maintainer-clean-local: rm -rf doxygen doxygen: doxygen ../steghide.doxygen endif steghide-0.5.1/doc/Makefile.in0000644000076400001440000002350207743177330011621 # Makefile.in generated by automake 1.7.2 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_INTLDIR_FALSE = @USE_INTLDIR_FALSE@ USE_INTLDIR_TRUE = @USE_INTLDIR_TRUE@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_cv_prog_doxygen = @ac_cv_prog_doxygen@ ac_cv_prog_perl = @ac_cv_prog_perl@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ man_MANS = steghide.1 EXTRA_DIST = steghide.1 es/steghide.1 MAINTAINERCLEANFILES = Makefile.in @HAVE_DOXYGEN_TRUE@noinst_DATA = doxygen subdir = doc mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = DIST_SOURCES = NROFF = nroff MANS = $(man_MANS) DATA = $(noinst_DATA) DIST_COMMON = Makefile.am Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) uninstall-info-am: man1dir = $(mandir)/man1 install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(man1dir) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/es @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) $(DATA) installdirs: $(mkinstalldirs) $(DESTDIR)$(man1dir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-man install-exec-am: install-info: install-info-am install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-man1 install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ uninstall-man uninstall-man1 @HAVE_DOXYGEN_TRUE@clean-local: @HAVE_DOXYGEN_TRUE@ rm -rf doxygen @HAVE_DOXYGEN_TRUE@maintainer-clean-local: @HAVE_DOXYGEN_TRUE@ rm -rf doxygen @HAVE_DOXYGEN_TRUE@doxygen: @HAVE_DOXYGEN_TRUE@ doxygen ../steghide.doxygen # 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: steghide-0.5.1/src/0000777000076400001440000000000007743177375007671 5steghide-0.5.1/src/WavChunkUnused.cc0000644000076400001440000000241507735577226013030 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "BinaryIO.h" #include "WavChunkHeader.h" #include "WavChunkUnused.h" void WavChunkUnused::read (BinaryIO *io) { Data = std::vector (ChunkHeader->getChunkLength()) ; for (unsigned int i = 0 ; i < ChunkHeader->getChunkLength() ; i++) { Data[i] = io->read8() ; } } void WavChunkUnused::write (BinaryIO *io) { WavChunk::write (io) ; for (std::vector::const_iterator i = Data.begin() ; i != Data.end() ; i++) { io->write8 (*i) ; } } steghide-0.5.1/src/CvrStgObject.h0000644000076400001440000000471707735577226012326 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_CVRSTGOBJECT_H #define SH_CVRSTGOBJECT_H #include "common.h" class SampleValue ; /** * \class CvrStgObject * \brief an object that can hold embedded data * * This abstract base class provides an interface for every class that is able * to hold embedded data. Something that can hold embedded data is essentially * though of as an array of samples. * * Definitions: * Embedded Bit...a bit to be embedded (one bit in the original or extracted embfile) * Sample...the smallest data unit in a file (e.g. a RGB triple, a DCT coefficient) **/ class CvrStgObject { public: /** * get the number of samples in this CvrStgObject **/ virtual unsigned long getNumSamples (void) const = 0 ; /** * get the sample at position pos * \param pos the position of a sample (must be in 0...getNumSamples()-1) * \return the sample at the given position * * The sample object is created in this function and should be deleted by the caller. * The derived class should check the condition(s) given above in its Implementation of this function. **/ virtual SampleValue* getSampleValue (const SamplePos pos) const = 0 ; /** * replace a sample thus (possibly) altering the value of the bit returned by SampleValue->getBit() * \param pos the position of the sample (must be in 0...getNumSamples()-1) * \param s the sample value that should replace the current sample value (must be of correct type for this CvrStgObject) * * The derived class should check the condition(s) given above in its Implementation of this function. **/ virtual void replaceSample (const SamplePos pos, const SampleValue* s) = 0 ; } ; #endif //ndef SH_CVRSTGOBJECT_H steghide-0.5.1/src/Arg.cc0000644000076400001440000000205007735577226010622 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "Arg.h" template Arg::Arg (T v, bool setbyuser) { set = false ; setValue (v, setbyuser) ; } template void Arg::setValue (T v, bool setbyuser) { Value = v ; if (setbyuser) { set = true ; } } steghide-0.5.1/src/SampleValueAdjacencyList.h0000644000076400001440000000464707735577226014645 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_SAMPLEVALUEADJACENCYLIST_H #define SH_SAMPLEVALUEADJACENCYLIST_H #include #include "SampleValue.h" #include "common.h" /** * \class SampleValueAdjacencyList * \brief an adjacency list-like data structur for sample values **/ class SampleValueAdjacencyList { public: /** * construct a SampleValueAdjacencyList with numsvs rows **/ SampleValueAdjacencyList (SampleValueLabel numsvs) ; std::vector& operator[] (const SampleValueLabel lbl) { return AdjacencyList[lbl] ; } ; std::vector& operator[] (const SampleValue* sv) { return AdjacencyList[sv->getLabel()] ; } ; unsigned long getNumRows (void) const { return AdjacencyList.size() ; } ; /** * check if every row contains the same set of sample values **/ bool operator== (const SampleValueAdjacencyList& sval) ; /** * sort the list in a way that the first entry of a row has the least distance to source sample value **/ void sort (void) ; private: std::vector > AdjacencyList ; void quicksort (std::vector& oppneighs, UWORD32* distances, unsigned int l, unsigned int r) ; /** * partition oppneighs/distances into those with distances less than and those with distances greater than and equal to x * \return the index in oppneighs/distances that separates the two **/ unsigned int partition (std::vector& oppneighs, UWORD32* distances, unsigned int l, unsigned int r, UWORD32 x) ; void swap (std::vector& oppneighs, UWORD32* distances, unsigned int i, unsigned int j) ; } ; #endif // ndef SH_SAMPLEVALUEADJACENCYLIST_H steghide-0.5.1/src/JpegFile.h0000644000076400001440000000531307735577226011445 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_JPEGFILE_H #define SH_JPEGFILE_H #include "common.h" #ifdef USE_LIBJPEG #include extern "C" { #include #include } class BinaryIO ; #include "CvrStgFile.h" class SampleValue ; /** * \class JpegFile * \brief a cover-/stego-file in the jpeg file format * * This class uses the JPEG library by the IJG for access to jpeg files. **/ class JpegFile : public CvrStgFile { public: JpegFile (BinaryIO* io) ; ~JpegFile (void) ; void read (BinaryIO* io) ; void write (void) ; std::list getProperties (void) const ; std::vector getMatchingAlgorithms (Graph* g, Matching* m) const ; unsigned long getNumSamples (void) const ; void replaceSample (const SamplePos pos, const SampleValue* s) ; SampleValue* getSampleValue (const SamplePos pos) const ; EmbValue getEmbeddedValue (const SamplePos pos) const ; #ifdef DEBUG std::map* getFrequencies (void) ; /** * SampleKey is unsigned, jpeg dct coefficients are signed data. This function is a specialization * of printFrequencies that converts the SampleKeys back to dct coefficient values before printing * them and also prints the values starting from the lowest (negative) and ending with the highest * (positive). **/ void printFrequencies (const std::map& freqs) ; #endif private: /// the number of dct coefficients per block static const unsigned int CoeffPerBlock = 64 ; static const unsigned short SamplesPerVertex = 3 ; static const UWORD32 Radius = 1 ; static const EmbValue EmbValueModulus = 2 ; struct jpeg_compress_struct CInfo ; struct jpeg_decompress_struct DeCInfo ; unsigned int* HeightInBlocks ; unsigned int* WidthInBlocks ; jvirt_barray_ptr* DctCoeffs ; std::vector LinDctCoeffs ; std::vector StegoIndices ; } ; #endif // def USE_LIBJPEG #endif // ndef SH_JPEGFILE_H steghide-0.5.1/src/SteghideError.h0000644000076400001440000000221107735577226012520 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_STEGHIDEERROR_H #define SH_STEGHIDEERROR_H #include #include "msg.h" class SteghideError : public MessageBase { public: SteghideError (void) ; SteghideError (std::string msg) ; SteghideError (const char *msgfmt, ...) ; virtual void printMessage (void) const ; } ; #endif // ndef SH_STEGHIDEERROR_H steghide-0.5.1/src/CvrStgFile.h0000644000076400001440000001357707735577226012003 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_CVRSTGFILE_H #define SH_CVRSTGFILE_H #include #include #include #include "BinaryIO.h" #include "CvrStgObject.h" class Graph ; class Matching ; class MatchingAlgorithm ; class SampleValue ; class SampleValueAdjacencyList ; /** * \class CvrStgFile * \brief a cover-/stego-file * * file-format specific constants are handled as follows: * CvrStgFile contains a protected set-function (e.g. setSamplesPerVertex), a public * get-function (e.g. getSamplesPerVertex() const) and a private variable. The public get * function does nothing else than returning the private variable, which must be set * as soon as possible (if it is not set, it will contain a null value set in CvrStgFile::CvrStgFile). **/ class CvrStgFile : public CvrStgObject { public: /** * this function reads the file with name fn and returns * a *File object of the correct type casted to CvrStgFile. **/ static CvrStgFile *readFile (const std::string& fn) ; class Property : private std::pair { public: Property (std::string key, std::string value) : std::pair (key, value) {} ; std::string getKey (void) const { return first ; } ; std::string getValue (void) const { return second ; } ; } ; CvrStgFile (void) ; virtual ~CvrStgFile (void) ; virtual void read (BinaryIO *io) ; virtual void write (void) ; void transform (const std::string& fn) ; virtual std::list getProperties (void) const = 0 ; /** * calculate a vector a SampleValueAdjacencyLists * \param svs a vector of unique(!) sample values where svs[i]->getLabel() == i holds for all i * \return a vector of SampleValueAdjacencyLists where retval[i] only contains sample values with getEmbValue() == i * * Every row in the adjacency lists must be sorted in the following order: The first sample value has * the least distance to the source sample value, the last has the largest distance. If two sample values * in one row have the same distance to the source sample value, the order does not matter. * * May be overridden in derived class to provide a faster version. **/ virtual std::vector calcSVAdjacencyLists (const std::vector& svs) const ; /** * get recommended list of matching algorithms * \param m an empty matching - will be used in construction of MatchingAlgorithm objects * * The MatchingAlgorithm objects returned by this function should be deleted by the caller * if they are no longer needed. **/ virtual std::vector getMatchingAlgorithms (Graph* g, Matching* m) const ; /** * get the name of this cvrstgfile **/ const std::string& getName (void) const { return getBinIO()->getName() ; } ; bool is_std (void) const { return getBinIO()->is_std() ; } ; /** * get the capacity of this cvrstgfile * \return the capacity in bytes **/ unsigned long getCapacity (void) const ; /** * get the capacity as a human-readable string **/ std::string getHRCapacity (void) const ; /** * get the number of samples per vertex (this is a file-format specific constant) **/ unsigned short getSamplesPerVertex (void) const { return SamplesPerVertex ; } ; /** * get the neighbourhood radius (this is a file-format specific constant) **/ UWORD32 getRadius (void) const { return Radius ; } ; /** * values that are embedded in samples will be in 0...Modulus-1 (this is a file-format specific constant) **/ EmbValue getEmbValueModulus (void) const { return EmbValueModulus ; } ; /** * get the value that is embedded in the Sample pos * \param pos the position of the sample * \return the value that is embedded in the sample at the given sample position * * This is equivalent to getSample(pos)->getEmbeddedValue() and is implemented here like this. * * May be overwritten by derived class to provide a faster version. **/ virtual EmbValue getEmbeddedValue (const SamplePos pos) const ; #ifdef DEBUG /** * return a map that contains the absolute sample frequencies indexed by sample key **/ virtual std::map* getFrequencies (void) ; /** * print the frequency table freqs * * This method is meant to be overriden in *File to provide a file-format specific way * of printing a frequency table. **/ virtual void printFrequencies (const std::map& freqs) ; #endif protected: void setSamplesPerVertex (unsigned short spv) { SamplesPerVertex = spv ; } ; /** * set Radius to r unless Args.Radius is set (set Radius to Args.Radius.getValue() then) **/ void setRadius (UWORD32 r) ; void setEmbValueModulus (EmbValue m) { EmbValueModulus = m ; } ; void setBinIO (BinaryIO* io) { BinIO = io ; } ; BinaryIO* getBinIO (void) const { return BinIO ; } ; private: enum FILEFORMAT { UNKNOWN, BMP, WAV, AU, JPEG } ; /** * guesses the file format by looking at the first few bytes **/ static FILEFORMAT guessff (BinaryIO *io) ; BinaryIO* BinIO ; unsigned short SamplesPerVertex ; UWORD32 Radius ; EmbValue EmbValueModulus ; } ; #endif /* ndef SH_CVRSTGFILE_H */ steghide-0.5.1/src/WavChunkHeader.cc0000644000076400001440000000257607735577226012765 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "BinaryIO.h" #include "WavChunkHeader.h" WavChunkHeader::WavChunkHeader (char *id, UWORD32 len) { for (unsigned int i = 0 ; i < 4 ; i++) { ChunkId[i] = id[i] ; } ChunkLength = len ; } WavChunkHeader::WavChunkHeader (BinaryIO *io) { read (io) ; } void WavChunkHeader::read (BinaryIO *io) { for (unsigned int i = 0 ; i < 4 ; i++) { ChunkId[i] = io->read8() ; } ChunkLength = io->read32_le() ; } void WavChunkHeader::write (BinaryIO *io) const { for (unsigned int i = 0 ; i < 4 ; i++) { io->write8 (ChunkId[i]) ; } io->write32_le (ChunkLength) ; } steghide-0.5.1/src/BitString.cc0000644000076400001440000002410007735577226012016 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "AUtils.h" #include "BitString.h" #include "common.h" #ifdef USE_ZLIB namespace zlib { #include } #endif // def USE_ZLIB #define BITPOS(n) (n % 8) #define BYTEPOS(n) (n / 8) BitString::BitString (EmbValue arity) : Length(0) { setArity(arity) ; } BitString::BitString (const BitString& bs) { Length = bs.Length ; Arity = bs.Arity ; ArityNBits = bs.ArityNBits ; Data.resize(bs.Data.size()) ; for (unsigned long i = 0 ; i < bs.Data.size() ; i++) { Data[i] = bs.Data[i] ; } } BitString::BitString (unsigned long l) { unsigned long nbytes = 0 ; if (l % 8 == 0) { nbytes = l / 8 ; } else { nbytes = (l / 8) + 1 ; } Data = std::vector (nbytes, 0) ; // is initialized to zeros in std::vector's constructor Length = l ; setArity(2) ; } BitString::BitString (const std::vector &d) : Length(0) { setArity(2) ; append (d) ; } BitString::BitString (const std::string &d) : Length(0) { setArity(2) ; append (d) ; } void BitString::setArity (EmbValue arity) { BYTE tmp = Arity = arity ; ArityNBits = 0 ; while (tmp > 1) { myassert (tmp % 2 == 0) ; // only implemented for arity = 2^i tmp /= 2 ; ArityNBits++ ; } } BitString& BitString::clear() { Data.clear() ; Length = 0 ; return *this ; } void BitString::_append (BIT v) { if (Length % 8 == 0) { Data.push_back (0) ; } Data[BYTEPOS(Length)] |= (v << BITPOS(Length)) ; Length++ ; } BitString& BitString::append (BIT v) { _append (v) ; return *this ; } BitString& BitString::append (const BYTE v, const unsigned short n) { for (unsigned short i = 0 ; i < n ; i++) { _append ((BIT) ((v & (1 << i)) >> i)) ; } return *this ; } BitString& BitString::append (const UWORD16 v, const unsigned short n) { for (unsigned short i = 0 ; i < n ; i++) { _append ((BIT) ((v & (1 << i)) >> i)) ; } return *this ; } BitString& BitString::append (const UWORD32 v, const unsigned short n) { for (unsigned short i = 0 ; i < n ; i++) { _append ((BIT) ((v & (1 << i)) >> i)) ; } return *this ; } BitString& BitString::append (const BitString& v) { for (unsigned long i = 0 ; i < v.getLength() ; i++) { _append (v[i]) ; } return *this ; } BitString& BitString::append (const std::vector& v) { for (std::vector::const_iterator i = v.begin() ; i != v.end() ; i++) { append (*i) ; } return *this ; } BitString& BitString::append (const std::string& v) { for (std::string::const_iterator i = v.begin() ; i != v.end() ; i++) { append ((BYTE) *i) ; } return *this ; } BIT BitString::operator[] (unsigned long i) const { myassert (i < Length) ; return ((Data[BYTEPOS(i)] >> BITPOS(i)) & 1) ; } BitString& BitString::setBit (unsigned long i, BIT v) { myassert (i < Length) ; BYTE mask = ~(1 << BITPOS(i)) ; Data[BYTEPOS(i)] &= mask ; Data[BYTEPOS(i)] |= (v << BITPOS(i)) ; return (*this) ; } BitString BitString::getBits (unsigned long s, unsigned long l) const { BitString retval ; for (unsigned long i = s ; i < s + l ; i++) { retval.append ((*this)[i]) ; } return retval ; } BitString BitString::cutBits (unsigned long s, unsigned long l) { myassert (s + l <= Length) ; BitString retval ; for (unsigned long i = s, j = s + l ; i < s + l || j < Length ; i++, j++) { if (i < s + l) { retval.append ((*this)[i]) ; } if (j < Length) { setBit(i, (*this)[j]) ; } } Length -= l ; Data.resize (AUtils::div_roundup (Length, 8)) ; clearUnused() ; return retval ; } UWORD32 BitString::getValue (unsigned long s, unsigned short l) const { myassert (l <= 32) ; UWORD32 retval = 0 ; for (unsigned short i = 0 ; i < l ; i++) { retval |= (*this)[s + i] << i ; } return retval ; } const std::vector& BitString::getBytes() const { myassert (Length % 8 == 0) ; return Data ; } BitString& BitString::truncate (const unsigned long s, const unsigned long e) { unsigned long newsize_i = e - s ; unsigned long newsize_y = 0 ; if (newsize_i % 8 == 0) { newsize_y = newsize_i / 8 ; } else { newsize_y = newsize_i / 8 + 1 ; } for (unsigned long i = 0 ; i < newsize_i ; i++) { // replace i-th bit with (s+i)-th bit BIT bit = (*this)[s + i] ; Data[BYTEPOS(i)] &= (BYTE) ~(1 << BITPOS(i)) ; // delete i-th bit Data[BYTEPOS(i)] |= (BYTE) (bit << BITPOS(i)) ; } Length = newsize_i ; clearUnused() ; return *this ; } BitString& BitString::pad (unsigned long mult, BIT v) { while (Length % mult != 0) { _append (v) ; } return *this ; } BitString& BitString::padRandom (unsigned long mult) { while (Length % mult != 0) { append (RndSrc.getBool()) ; } return *this ; } BYTE BitString::getNAry (unsigned long p) const { unsigned long pbinary = p * ArityNBits ; BYTE retval = 0 ; for (unsigned short i = 0 ; (i < ArityNBits) && (pbinary + i < Length /* Length not a multiple of ArityNBits */) ; i++) { retval |= (*this)[pbinary + i] << i ; } return retval ; } void BitString::appendNAry (BYTE v) { for (unsigned short i = 0 ; i < ArityNBits ; i++) { _append ((v & (1 << i)) >> i) ; } } #ifdef USE_ZLIB BitString& BitString::compress (int level) { myassert (level >= 1 && level <= 9) ; pad (8, 0) ; // prepare source buffer zlib::uLong srclen = Data.size() ; zlib::Byte *srcbuf = new zlib::Byte[srclen] ; for (unsigned long i = 0 ; i < srclen ; i++) { srcbuf[i] = Data[i] ; } // prepare dest buffer (see zlib manual for this magic length) zlib::uLong destlen = ((zlib::uLong) ((Data.size() + 12) * 1.001)) + 1 ; zlib::Byte* destbuf = new zlib::Byte[destlen] ; // do compression int ret = zlib::compress2 (destbuf, &destlen, (const zlib::Bytef*) srcbuf, srclen, level) ; if (ret != Z_OK) { switch (ret) { case Z_MEM_ERROR: throw SteghideError (_("could not allocate memory.")) ; break ; default: throw SteghideError (_("error %d while calling zlib's compress2."), ret) ; break ; } } // write compressed data into Data Data.resize (destlen) ; for (unsigned long i = 0 ; i < destlen ; i++) { Data[i] = destbuf[i] ; } Length = destlen * 8 ; delete[] srcbuf ; delete[] destbuf ; return *this ; } BitString& BitString::uncompress (unsigned long idestlen) { myassert (Length % 8 == 0) ; // prepare source buffer zlib::uLong srclen = Length / 8 ; zlib::Byte* srcbuf = new zlib::Byte[srclen] ; for (unsigned long i = 0 ; i < srclen ; i++) { srcbuf[i] = Data[i] ; } // prepare destination buffer zlib::uLong ydestlen = 0 ; if (idestlen % 8 == 0) { ydestlen = idestlen / 8 ; } else { ydestlen = (idestlen / 8) + 1 ; } zlib::Byte* destbuf = new zlib::Byte[ydestlen] ; // do uncompression zlib::uLong ydestlen_before = ydestlen ; int ret = zlib::uncompress (destbuf, &ydestlen, (const zlib::Bytef*) srcbuf, srclen) ; if (ret != Z_OK) { switch (ret) { case Z_MEM_ERROR: throw SteghideError (_("could not allocate memory.")) ; break ; case Z_DATA_ERROR: throw SteghideError (_("can not uncompress data. compressed data is corrupted.")) ; break ; default: throw SteghideError (_("error %d while calling zlib's uncompress."), ret) ; break ; } } myassert (ydestlen_before == ydestlen) ; // because idestlen must be _exactly_ size in bits // write uncompressed data into Data Data.resize (ydestlen) ; for (unsigned long i = 0 ; i < ydestlen ; i++) { Data[i] = destbuf[i] ; } Length = idestlen ; clearUnused() ; delete[] srcbuf ; delete[] destbuf ; return *this ; } #endif // def USE_ZLIB bool BitString::operator== (const BitString &v) const { bool retval = true ; if (v.getLength() == getLength()) { unsigned int n = getLength() ; for (unsigned int i = 0 ; i < n ; i++) { if (v[i] != (*this)[i]) { retval = false ; } } } else { retval = false ; } return retval ; } bool BitString::operator!= (const BitString &v) const { bool retval = false ; if (v.getLength() != getLength()) { retval = true ; } else { for (unsigned int i = 0 ; i < getLength() ; i++) { if (v[i] != (*this)[i]) { retval = true ; break ; } } } return retval ; } BitString& BitString::operator^= (const BitString &v) { for (unsigned long i = 0 ; i < Length ; i++) { unsigned long bytepos = BYTEPOS (i) ; unsigned int bitpos = BITPOS (i) ; BIT bit = (Data[bytepos] & (1 << bitpos)) >> bitpos ; bit ^= v[i] ; Data[bytepos] = (Data[bytepos] & ~(1 << bitpos)) | (bit << bitpos) ; } return *this ; } void BitString::clearUnused () { if (Length % 8 != 0) { // clear unused part of last byte (_append depends on this) unsigned short nbitsfilled = Length % 8 ; BYTE mask = 0x00 ; for (unsigned short i = 0 ; i < nbitsfilled ; i++) { mask <<= 1 ; mask |= 1 ; } Data[Data.size() - 1] &= mask ; } } void BitString::print (unsigned short spc) const { char* space = new char[spc + 1] ; for (unsigned short i = 0 ; i < spc ; i++) { space[i] = ' ' ; } space[spc] = '\0' ; std::cerr << space << "Length: " << getLength() << std::endl ; std::cerr << space << "Data.size(): " << Data.size() << std::endl ; std::cerr << space << "Data:" << std::endl ; std::cerr << space ; for (unsigned long i = 0 ; i < getLength() ; i++) { if ((i % 64 == 0) && (i > 0)) { // new line std::cerr << std::endl << space ; } if (i % 8 == 0) { // new byte std::cerr << " " ; } std::cerr << ((*this)[i]) ; } std::cerr << std::endl ; } #ifdef DEBUG void BitString::printDebug (unsigned short level, unsigned short spc) const { if (RUNDEBUGLEVEL(level)) { print (spc) ; } } #endif steghide-0.5.1/src/WavChunk.cc0000644000076400001440000000201007735577226011633 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "WavChunk.h" #include "WavChunkHeader.h" WavChunk::~WavChunk () { if (ChunkHeader != NULL) { delete ChunkHeader ; } } void WavChunk::write (BinaryIO *io) { ChunkHeader->write (io) ; } steghide-0.5.1/src/Edge.h0000644000076400001440000000614307735577226010626 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_EDGE_H #define SH_EDGE_H #include "SampleValue.h" #include "Vertex.h" #include "common.h" class Edge { public: /** * default constructor - does not create a useful object **/ Edge (void) : Vertex1(NULL), Index1(0), Vertex2(NULL), Index2(0), Weight(UWORD32_MAX) {} ; /** * constructs an edge object **/ Edge (Vertex *v1, unsigned short idx1, Vertex *v2, unsigned short idx2) ; /** * copy constructor **/ Edge (const Edge& e) ; Vertex *getVertex1 (void) const { return Vertex1 ; } ; void setVertex1 (Vertex* v) { Vertex1 = v ; } ; Vertex *getVertex2 (void) const { return Vertex2 ; } ; unsigned short getIndex1 (void) const { return Index1 ; } ; void setIndex1 (unsigned short i) { Index1 = i ; } ; unsigned short getIndex2 (void) const { return Index2 ; } ; UWORD32 getWeight (void) ; void set (Vertex* v1, unsigned short idx1, Vertex* v2, unsigned short idx2) ; void set1 (Vertex* v1, unsigned short idx1) ; void set2 (Vertex* v2, unsigned short idx2) ; bool operator== (const Edge& e) const ; bool operator!= (const Edge& e) const ; /** * swap vertices 1 and 2 in this edge (weight is not altered) **/ void swap (void) ; /** * \return true iff this edge contains the vertex v **/ bool contains (const Vertex *v) const ; /** * get the vertex on this edge that is not equal to v **/ Vertex *getOtherVertex (const Vertex *v) const ; /** * get the position of the sample that should be changed to embed the bit represented by the vertex v **/ SamplePos getSamplePos (Vertex* v) const ; /** * get the old sample value that will be replaced to embed the bit represented by the vertex v **/ SampleValue *getOriginalSampleValue (Vertex *v) const ; /** * get the sample value that should replace the previous sample value to embed the bit represented by the vertex v **/ SampleValue *getReplacingSampleValue (Vertex *v) const ; void print (unsigned short spc = 0) const ; private: Vertex *Vertex1 ; /// contains the index of the sample (of those in Vertex1) that will be changed (if this edge is used) unsigned short Index1 ; Vertex *Vertex2 ; /// contains the index of the sample (of those in Vertex2) that will be changed (if this edge is used) unsigned short Index2 ; UWORD32 Weight ; } ; #endif // ndef SH_EDGE_H steghide-0.5.1/src/SMDConstructionHeuristic.cc0000644000076400001440000000336407735577226015040 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "Edge.h" #include "Graph.h" #include "Matching.h" #include "SMDConstructionHeuristic.h" #include "Vertex.h" SMDConstructionHeuristic::SMDConstructionHeuristic (Graph* g, Matching* m, float goal) : MatchingAlgorithm (g, m, goal) { Vertices = std::vector (g->getNumVertices()) ; for (VertexLabel l = 0 ; l < g->getNumVertices() ; l++) { Vertices[l] = g->getVertex(l) ; myassert (m->isExposed (Vertices[l])) ; } sort (Vertices.begin(), Vertices.end(), SmallerVertexDegree()) ; } void SMDConstructionHeuristic::run (void) { for (VertexLabel l = 0 ; l < Vertices.size() ; l++) { if (TheMatching->isExposed(Vertices[l]) && Vertices[l]->getDegree() > 0) { Vertex* v1 = Vertices[l] ; v1->updateShortestEdge() ; Edge* e = v1->getShortestEdge() ; Vertex* v2 = e->getOtherVertex (v1) ; TheMatching->addEdge(*e) ; v1->markDeleted() ; v2->markDeleted() ; } } TheGraph->unmarkDeletedAllVertices() ; } steghide-0.5.1/src/BinaryIO.h0000644000076400001440000001110207735577225011424 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BINARYIO_H #define SH_BINARYIO_H #include #include #include "common.h" /** * \class BinaryIO * \brief provides methods for file i/o as needed by the rest of steghide **/ class BinaryIO { public: enum MODE { READ, WRITE } ; BinaryIO (void) ; /** * construct a BinaryIO object * \param fn the filename ("" to indicate stdin/stdout) * \param m the mode (BinaryIO::READ or BinaryIO::WRITE) * * The file described by fn is opened in the given mode. **/ BinaryIO (const std::string& fn, MODE m) ; ~BinaryIO (void) ; /** * get the name (with path) of this file **/ const std::string& getName (void) const { return Name ; } ; /** * is this file currently opened ? **/ bool is_open (void) const { return FileOpen ; } ; /** * is this file a standard stream (stdin or stdout) ? **/ bool is_std (void) const { return (getStream() != NULL && getName() == "") ; } ; /** * get the current position in the current file **/ unsigned long getPos (void) const { return ftell(getStream()) ; } ; /** * is the current state of this file at the end of the file **/ bool eof (void) const ; /** * open the file given by fn in the mode m * \param fn a filename ("" to indicate stdin/stdout) * \param m the mode (BinaryIO::READ or BinaryIO::WRITE) **/ void open (const std::string& fn, MODE m) ; /** * close the currently open file - it is save to call close() even if is_std() is true **/ void close (void) ; /** * read one byte from the file **/ BYTE read8 (void) ; /** * read two bytes from the file using little-endian byte ordering **/ UWORD16 read16_le (void) ; /** * read two bytes from the file using big-endian byte ordering **/ UWORD16 read16_be (void) ; /** * read four bytes from the file using little-endian byte ordering **/ UWORD32 read32_le (void) ; /** * read four bytes from the file using big-endian byte ordering **/ UWORD32 read32_be (void) ; /** * read n bytes (little endian byte ordering) * \param n the number of bytes to read (must be <= 4) **/ UWORD32 read_le (unsigned short n) ; /** * read a string with length len from the file **/ std::string readstring (unsigned int len) ; /** * write one byte to the file **/ void write8 (BYTE val) ; /** * write two bytes to the file using little-endian byte ordering **/ void write16_le (UWORD16 val) ; /** * write two bytes to the file using big-endian byte ordering **/ void write16_be (UWORD16 val) ; /** * write four bytes to the file using little-endian byte ordering **/ void write32_le (UWORD32 val) ; /** * write four bytes to the file using big-endian byte ordering **/ void write32_be (UWORD32 val) ; /** * write n bytes of val (little endian byte ordering) * \param n the number of bytes to write (must be <= 4) * \param val the value **/ void write_le (UWORD32 val, unsigned short n) ; void writestring (const std::string& s) ; /** * get the underlying cstdio FILE* pointer **/ FILE* getStream (void) const { return Stream ; } ; protected: void setStream (FILE* s) { Stream = s ; } ; void setName (const std::string& fn) { Name = fn ; } ; MODE getMode (void) const { return Mode ; } ; void setMode (MODE m) { Mode = m ; } ; private: std::string Name ; FILE *Stream ; bool FileOpen ; MODE Mode ; void init (void) ; void set_open (bool o) { FileOpen = o ; } ; /** * when opening a file in write mode perform various checks depending on the value of the force argument **/ void checkForce (const std::string& fn) const ; /** * check if the file described by fn exists * \return true iff a fopen call with fn as file name succeeded **/ bool Fileexists (const std::string& fn) const ; } ; #endif /* ndef SH_BINARYIO_H */ steghide-0.5.1/src/Utils.h0000644000076400001440000000210507735577226011054 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_UTILS_H #define SH_UTILS_H #include class Utils { public: /** * gets a number of bytes and returns a human-readable string like e.g. "3,5 KB" **/ static std::string formatHRSize (unsigned long size) ; } ; #endif // ndef SH_UTILS_H steghide-0.5.1/src/WKSConstructionHeuristic.h0000644000076400001440000000717507735577226014727 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_WKSCONSTRUCTIONHEURISTIC_H #define SH_WKSCONSTRUCTIONHEURISTIC_H #include #include #include class Edge ; class Graph ; class Matching ; #include "MatchingAlgorithm.h" class ProgressOutput ; class Vertex ; #include "common.h" /** * \class WKSConstructionHeuristic * \brief a heuristic algorithm for constructing a matching * * This class implements a construction heuristic for the maximum matching * problem. The idea for the algorithm is taken from Michael Sipser, Richard M. Karp: * "Maximum matchings in sparse random graphs", in 22nd Annual Symposium on Foundations * of Computer Science. The modification consists of the priority queues, resp. of * the fact that the vertices in the priority queues are ordered by the length of their * shortest edge, thus creating a weighted version of this heuristic by biasing the * algorithm to choose shorter edges on average. **/ class WKSConstructionHeuristic : public MatchingAlgorithm { public: /** * \param g the underlying graph * \param m the inital matching (should be empty) **/ WKSConstructionHeuristic (Graph* g, Matching* m, float goal = 100.0) ; virtual ~WKSConstructionHeuristic (void) {} ; const char* getName (void) const { return "Weighted Karp&Sipser Construction Heuristic" ; } ; void run (void) ; /** * \class LongerShortestEdge * \brief a comparison operator * * lse(v1, v2) is true if the length of the shortest edge of v1 * is greater than the length of the shortest edge of v2. If a vertex * has Degree 0, the length of its shortest edge is defined to be +Infinity. * If both v1 and v2 have degree 0, then the vertex with the greater label * is defined to have the "longer shortest edge". **/ class LongerShortestEdge : public std::binary_function { public: bool operator() (const Vertex *v1, const Vertex *v2) ; } ; #ifdef DEBUG void print (unsigned short spc = 0) ; void printPQ (std::priority_queue, LongerShortestEdge>& pq) ; #endif private: /** * get the Vertex from VerticesDeg1 that is nearest to top (with updated degrees and shortest edges) **/ Vertex *findVertexDeg1 (void) ; /** * get the Vertex from VerticesDegG that is nearest to top (with updated degrees and shortest edges) **/ Vertex *findVertexDegG (void) ; /** * copy all Neighbours of v that have degree 1 to VerticesDeg1 **/ void checkNeighboursDeg1 (Vertex *v) ; /// contains all vertices of degree 1 - every vertex in this queue has a correct shortest edge if it still has degree 1 std::priority_queue, LongerShortestEdge> VerticesDeg1 ; /// contains all vertices with degree greater than 1 std::priority_queue, LongerShortestEdge> VerticesDegG ; } ; #endif // ndef SH_WKSCONSTRUCTIONHEURISTIC_H steghide-0.5.1/src/ProgressOutput.h0000644000076400001440000000406507735577226013010 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_PROGRESSOUTPUT_H #define SH_PROGRESSOUTPUT_H #include #include #include /** * \class ProgressOutput * \brief prints the progress to stdout **/ class ProgressOutput { public: /** * create an empty ProgressOutput object **/ ProgressOutput (void) ; /** * create a ProgressOutput object * \param m the message to be displayed **/ ProgressOutput (const std::string& m) ; void setMessage (const std::string& m) { Message = m ; } ; void setMessage (const char *msgfmt, ...) ; /** * update the output (taking update frequency into account) with rate as percentage **/ void update (float rate) ; /** * update the output appending "done" and a newline (no rate nor average weight) **/ void done (void) const ; /** * update the output appending rate, [average edge weight], "done" and a newline * \param rate the rate of matched vertices * \param avgweight the average edge weight (is not printed if not given) **/ void done (float rate, float avgweight = NoAvgWeight) const ; static const float NoAvgWeight = -1.0 ; protected: std::string vcompose (const char *msgfmt, va_list ap) const ; private: std::string Message ; time_t LastUpdate ; } ; #endif // ndef SH_PROGRESSOUTPUT_H steghide-0.5.1/src/Matching.h0000644000076400001440000001546507742073424011510 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_MATCHING_H #define SH_MATCHING_H #include #include #include "Vertex.h" #include "common.h" class Edge ; class ProgressOutput ; /** * \class Matching * \brief represent a matching on a graph * * A Matching object will copy all Edges that are passed to it and will take care of them, i.e. * delete them if they are no longer used. Edges do only "leave" a Matching object as const * pointers. **/ class Matching { public: /** * create an empty matching that is ready for adding and augmenting * \param g the underlying graph * \param po a ProgressOutput object that will print the number of matched vertices (in percent) **/ Matching (Graph* g, ProgressOutput* po = NULL) ; ~Matching (void) ; /** * returns true iff the vertex v is matched in this matching. **/ bool isMatched (Vertex *v) const { return VertexInformation[v->getLabel()].isMatched() ; } ; /** * returns true iff the vertex with the label vlbl is matched in this matching. **/ bool isMatched (VertexLabel vlbl) const { return VertexInformation[vlbl].isMatched() ; } ; /** * returns true iff the vertex v is exposed (not matched) in this matching. **/ bool isExposed (Vertex *v) const { return VertexInformation[v->getLabel()].isExposed() ; } ; /** * returns true iff the vertex with the label vlbl is exposed (not matched) in this matching. **/ bool isExposed (VertexLabel vlbl) const { return VertexInformation[vlbl].isExposed() ; } ; /** * get the edge that is in the matching and adjacent to v * \return the matched edge or NULL if v is exposed **/ const Edge* getMatchingEdge (Vertex *v) const { return VertexInformation[v->getLabel()].getMatchingEdge() ; } ; /** * does this matching include the edge e ? * \return true iff the edge e is element of this matching **/ bool includesEdge (const Edge* e) const { return includesEdge(*e) ; } ; bool includesEdge (const Edge& e) const ; /** * get the cardinality (the number of matched edges) **/ unsigned long getCardinality (void) const { return Cardinality ; } ; const std::list& getExposedVertices (void) const { return ExposedVertices ; } ; /** * get the rate of vertices of the underlying graph that are currently matched in this matching * \return a value between 0 and 1 **/ float getMatchedRate (void) const ; /** * get the average weight of all edges that are in this matching **/ float getAvgEdgeWeight (void) const ; /** * get access to the std::list of exposed vertices * \return a pointer to the std::list of exposed vertices in this matching. * * The std::list that is pointed to by return value contains the exposed vertices * even after augment has been called (it is the ExposedVertices member) an * arbitrary number of times. **/ const std::list *getExposedVerticesLink (void) const { return &ExposedVertices ; } ; /** * add an edge to the matching * \param e the edge to add. * * For e=(v1,v2): neither v1 nor v2 are allowed to be adjacent * to an edge that is already in the matching, **/ void addEdge (const Edge& e) ; void addEdge (Edge* e) { addEdge(*e) ; } ; /** * remove an edge from the matching * \param e the edge to remove * * The edge e _must_ be in this matching **/ void removeEdge (const Edge& e) ; /** * get the list of all edges in this matching **/ const std::list& getEdges (void) const { return MatchingEdges ; } ; /** * augment this matching along the given augmenting path * \param path an augmenting path * \param len the length (number of edges) of the augmenting path * * An augementing path is a path where edges with odd indices (the first, third,...) are not * in the matching and edges with even indices are and the path has * an odd length. **/ Matching& augment (const Edge** path, unsigned long len) ; Matching& augment (const std::vector& path) ; void printVerboseInfo (void) const ; private: /** * \class VertexInfo * \brief contains information about a vertex that is possibly in a matching **/ class VertexInfo { public: VertexInfo (std::list::iterator mit) { setMatched (mit) ; } ; VertexInfo (std::list::iterator eit) { setExposed (eit) ; } ; bool isExposed (void) const { return !Matched ; } ; bool isMatched (void) const { return Matched ; } ; Edge *getMatchingEdge (void) const { return *MatchedIterator ; } ; std::list::iterator getMatchedIterator (void) const { return MatchedIterator ; } ; std::list::iterator getExposedIterator (void) const { return ExposedIterator ; } ; void setMatched (std::list::iterator mit) { Matched = true ; MatchedIterator = mit ; } ; void setExposed (std::list::iterator eit) { Matched = false ; ExposedIterator = eit ; } ; private: bool Matched ; /// an iterator into the list of matched edges (only valid if this vertex is matched) std::list::iterator MatchedIterator ; /// an iterator into the list of exposed vertices (only valid if this vertex is exposed) std::list::iterator ExposedIterator ; } ; /// contains a VertexInfo object for every vertex std::vector VertexInformation ; /// the std::list of all exposed vertices std::list ExposedVertices ; /// the std::list of all edges in the matching std::list MatchingEdges ; /// the number of edges in the matching unsigned long Cardinality ; /// the graph underlying this Matching Graph* TheGraph ; /// the ProgressOutput object that will print the number of matched vertices (as percentage) ProgressOutput* PrOut ; /** * set the cardinality (thereby updating PrOut) **/ void setCardinality (unsigned long c) ; public: bool check (void) const ; bool check_MatchingEdges_vs_VertexInformation (void) const ; bool check_ExposedVertices_vs_VertexInformation (void) const ; bool check_VertexInformation_Integrity (void) const ; bool check_ValidAugPath (const std::vector& path) const ; } ; #endif // ndef SH_MATCHING_H steghide-0.5.1/src/Selector.cc0000644000076400001440000000552407735577226011702 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "BitString.h" #include "MHashPP.h" #include "PseudoRandomSource.h" #include "Selector.h" Selector::Selector (UWORD32 m, std::string pp) : Maximum(m), NumInArray(0) { MHashPP hash (MHASH_MD5) ; hash << pp << MHashPP::endhash ; BitString h = hash.getHashBits() ; myassert (h.getLength() == 128) ; UWORD32 seed = 0 ; for (unsigned short i = 0 ; i < 4 ; i++) { seed ^= h.getValue (i * 32, 32) ; } PRandom = new PseudoRandomSource (seed) ; } Selector::Selector (UWORD32 m) { Maximum = m ; X.resize(m) ; for (UWORD32 i = 0 ; i < m ; i++) { X[i] = i ; } NumInArray = m ; PRandom = NULL ; } Selector::Selector (const std::vector& retvals) { X = retvals ; Maximum = retvals.size() ; NumInArray = retvals.size() ; PRandom = NULL ; } Selector::~Selector () { if (PRandom) { delete PRandom ; } } UWORD32 Selector::operator[] (UWORD32 i) { myassert (i < Maximum) ; calculate(i + 1) ; return X[i] ; } void Selector::calculate (UWORD32 m) { UWORD32 j = NumInArray ; if (m > NumInArray) { NumInArray = m ; X.resize (NumInArray) ; Y.resize (NumInArray) ; } for ( ; j < m ; j++) { // k is a number from {j,...,Maximum-1} UWORD32 k = j + PRandom->getValue(Maximum - j) ; UWORD32 i = 0 ; if (idxX (k, j, &i)) { // there exists i < j with X[i] = k // use Y[i] instead of k setX (j, Y[i]) ; if (X[j] > j) { // some future k could be X[j] Y[j] = j ; } if (X[i] > j) { // some future k could be X[i] Y[i] = j ; UWORD32 l = 0 ; if (idxX (Y[i], j, &l)) { Y[i] = Y[l] ; } } } else { setX (j, k) ; Y[j] = j ; } if (X[j] > j) { UWORD32 i = 0 ; if (idxX (Y[j], j, &i)) { Y[j] = Y[i] ; } } } } bool Selector::idxX (UWORD32 v, UWORD32 m, UWORD32* p) const { bool retval = false ; sgi::hash_map::const_iterator it = Xreversed.find (v) ; if ((it != Xreversed.end()) && (it->second < m)) { *p = it->second ; retval = true ; } return retval ; } void Selector::setX (UWORD32 i, UWORD32 v) { X[i] = v ; Xreversed[v] = i ; } steghide-0.5.1/src/EncryptionMode.cc0000644000076400001440000000467107735577226013063 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include "EncryptionMode.h" EncryptionMode::EncryptionMode () { setValue (ECB) ; } EncryptionMode::EncryptionMode (EncryptionMode::IRep irep) { setValue (irep) ; } EncryptionMode::EncryptionMode (std::string srep) { setValue (translate (srep)) ; } void EncryptionMode::setValue (EncryptionMode::IRep irep) { Value = irep ; } std::string EncryptionMode::getStringRep () const { return translate(Value) ; } EncryptionMode::IRep EncryptionMode::getIntegerRep () const { return Value ; } bool EncryptionMode::isValidStringRep (std::string srep) { bool retval = false ; for (unsigned int i = 0 ; i < NumValues ; i++) { if (Translations[i].srep == srep) { retval = true ; } } return retval ; } bool EncryptionMode::isValidIntegerRep (unsigned int irep) { return (irep < NumValues) ; } std::string EncryptionMode::translate (EncryptionMode::IRep irep) { std::string retval ; bool found = false ; for (unsigned int i = 0 ; i < NumValues ; i++) { if (Translations[i].irep == irep) { retval = std::string (Translations[i].srep) ; found = true ; } } myassert (found) ; return retval ; } EncryptionMode::IRep EncryptionMode::translate (std::string srep) { IRep retval = ECB ; bool found = false ; for (unsigned int i = 0 ; i < NumValues ; i++) { if (Translations[i].srep == srep) { retval = Translations[i].irep ; found = true ; } } myassert (found) ; return retval ; } const EncryptionMode::Translation EncryptionMode::Translations[] = { { ECB, "ecb" }, { CBC, "cbc" }, { OFB, "ofb" }, { CFB, "cfb" }, { NOFB, "nofb" }, { NCFB, "ncfb" }, { CTR, "ctr" }, { STREAM, "stream" } } ; steghide-0.5.1/src/Arg.h0000644000076400001440000000375507735577225010500 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_ARG_H #define SH_ARG_H #include #include #include "EncryptionAlgorithm.h" #include "EncryptionMode.h" // to include DEBUG if defined #ifdef HAVE_CONFIG_H #include #endif template class Arg { public: Arg (void) : set(false) {} ; Arg (T v, bool setbyuser = true) ; T getValue (void) const { return Value ; } ; void setValue (T v, bool setbyuser = true) ; bool is_set (void) const { return set ; } ; private: T Value ; bool set ; } ; enum COMMAND { EMBED, EXTRACT, INFO, ENCINFO, SHOWVERSION, SHOWLICENSE, SHOWHELP, PRINTFREQS } ; enum VERBOSITY { QUIET, NORMAL, VERBOSE, STATS } ; enum DEBUGCOMMAND { NONE, PRINTGRAPH, PRINTGMLGRAPH, PRINTGMLVERTEX } ; typedef Arg ArgCommand ; typedef Arg ArgVerbosity ; typedef Arg ArgBool ; typedef Arg ArgString ; typedef Arg ArgULong ; typedef Arg ArgInt ; typedef Arg ArgFloat ; typedef Arg ArgEncAlgo ; typedef Arg ArgEncMode ; typedef Arg ArgUInt ; typedef Arg > ArgStringList ; typedef Arg ArgDebugCommand ; #endif // ndef SH_ARG_H steghide-0.5.1/src/SampleValueAdjacencyList.cc0000644000076400001440000000724007735577226014773 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include #include "BmpRGBSampleValue.h" #include "CvrStgFile.h" #include "Graph.h" #include "SampleValue.h" #include "SampleValueAdjacencyList.h" #include "WavPCMSampleValue.h" #include "common.h" SampleValueAdjacencyList::SampleValueAdjacencyList (SampleValueLabel numsvs) { AdjacencyList = std::vector > (numsvs) ; } bool SampleValueAdjacencyList::operator== (const SampleValueAdjacencyList& sval) { bool equal = false ; if (AdjacencyList.size() == sval.AdjacencyList.size()) { equal = true ; for (unsigned long i = 0 ; i < AdjacencyList.size() ; i++) { bool rowequal = false ; if (AdjacencyList[i].size() == sval.AdjacencyList[i].size()) { std::set thisset (AdjacencyList[i].begin(), AdjacencyList[i].end()) ; std::set::const_iterator thisit = thisset.begin() ; std::set otherset (sval.AdjacencyList[i].begin(), sval.AdjacencyList[i].end()) ; std::set::const_iterator otherit = otherset.begin() ; rowequal = true ; for ( ; thisit != thisset.end() && otherit != otherset.end() ; thisit++, otherit++) { rowequal = (**thisit == **otherit) ; } } equal = rowequal && equal ; } } return equal ; } void SampleValueAdjacencyList::sort () { for (SampleValueLabel lbl = 0 ; lbl < AdjacencyList.size() ; lbl++) { std::vector& row = AdjacencyList[lbl] ; if (row.size() > 0) { UWORD32* distances = new UWORD32[row.size() + 1] ; for (unsigned int i = 0 ; i < row.size() ; i++) { distances[i] = Globs.TheGraph->SampleValues[lbl]->calcDistance (row[i]) ; } quicksort (row, distances, 0, row.size() - 1) ; delete[] distances ; } } } void SampleValueAdjacencyList::quicksort (std::vector& oppneighs, UWORD32* distances, unsigned int l, unsigned int r) { if (l < r) { unsigned int p = partition (oppneighs, distances, l, r, distances[r]) ; if (p > 0) { quicksort (oppneighs, distances, l, p - 1) ; } quicksort (oppneighs, distances, p + 1, r) ; } } unsigned int SampleValueAdjacencyList::partition (std::vector& oppneighs, UWORD32* distances, unsigned int l, unsigned int r, UWORD32 x) { unsigned int i = l, j = r ; while (i < j) { while ((distances[i] < x) && (i < r)) { i++ ; } while ((distances[j] >= x) && (j > l)) { j-- ; } if (i < j) { swap (oppneighs, distances, i, j) ; } } swap (oppneighs, distances, i, r) ; return i ; } void SampleValueAdjacencyList::swap (std::vector& oppneighs, UWORD32* distances, unsigned int i, unsigned int j) { SampleValue* tmp1 = oppneighs[i] ; UWORD32 tmp2 = distances[i] ; oppneighs[i] = oppneighs[j] ; distances[i] = distances[j] ; oppneighs[j] = tmp1 ; distances[j] = tmp2 ; } steghide-0.5.1/src/Embedder.cc0000644000076400001440000002020407742073504011605 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include "DFSAPHeuristic.h" #include "BitString.h" #include "CvrStgFile.h" #include "DMDConstructionHeuristic.h" #include "EmbData.h" #include "Embedder.h" #include "Edge.h" #include "Graph.h" #include "Matching.h" #include "ProgressOutput.h" #include "Selector.h" #include "Vertex.h" #include "WKSConstructionHeuristic.h" #include "common.h" #include "error.h" #include "msg.h" Globals Globs ; Embedder::Embedder () { // read embfile VerboseMessage vrs ; if (Args.EmbFn.getValue() == "") { vrs.setMessage (_("reading secret data from standard input...")) ; } else { vrs.setMessage (_("reading secret file \"%s\"..."), Args.EmbFn.getValue().c_str()) ; vrs.setNewline (false) ; } vrs.printMessage() ; std::vector emb ; BinaryIO embio (Args.EmbFn.getValue(), BinaryIO::READ) ; while (!embio.eof()) { emb.push_back (embio.read8()) ; } embio.close() ; VerboseMessage vdone (_(" done")) ; if (Args.EmbFn.getValue() != "") { vdone.printMessage() ; } // create bitstring to be embedded std::string fn = "" ; if (Args.EmbedEmbFn.getValue()) { fn = Args.EmbFn.getValue() ; } EmbData embdata (EmbData::EMBED, Args.Passphrase.getValue(), fn) ; embdata.setEncAlgo (Args.EncAlgo.getValue()) ; embdata.setEncMode (Args.EncMode.getValue()) ; embdata.setCompression (Args.Compression.getValue()) ; embdata.setChecksum (Args.Checksum.getValue()) ; embdata.setData (emb) ; ToEmbed = embdata.getBitString() ; // read cover-/stego-file VerboseMessage vrc ; if (Args.CvrFn.getValue() == "") { vrc.setMessage (_("reading cover file from standard input...")) ; } else { vrc.setMessage (_("reading cover file \"%s\"..."), Args.CvrFn.getValue().c_str()) ; } vrc.setNewline (false) ; vrc.printMessage() ; CvrStgFile::readFile (Args.CvrFn.getValue()) ; vdone.printMessage() ; ToEmbed.setArity (Globs.TheCvrStgFile->getEmbValueModulus()) ; if ((ToEmbed.getNAryLength() * Globs.TheCvrStgFile->getSamplesPerVertex()) > Globs.TheCvrStgFile->getNumSamples()) { throw SteghideError (_("the cover file is too short to embed the data.")) ; } // create graph Selector sel (Globs.TheCvrStgFile->getNumSamples(), Args.Passphrase.getValue()) ; VerboseMessage v (_("creating the graph...")) ; v.setNewline (false) ; v.printMessage() ; new Graph (Globs.TheCvrStgFile, ToEmbed, sel) ; Globs.TheGraph->printVerboseInfo() ; if (Args.Check.getValue()) { if (!Globs.TheGraph->check()) { CriticalWarning w ("integrity checking of graph data structures failed!") ; // TODO: internationalize this w.printMessage() ; } } #ifdef DEBUG if (Args.DebugCommand.getValue() == PRINTGRAPH) { Globs.TheGraph->print() ; exit (EXIT_SUCCESS) ; } else if (Args.DebugCommand.getValue() == PRINTGMLGRAPH) { Globs.TheGraph->print_gml (std::cout) ; exit (EXIT_SUCCESS) ; } else if (Args.DebugCommand.getValue() == PRINTGMLVERTEX) { std::vector nodeprinted (Globs.TheGraph->getNumVertices()) ; std::vector edgesprinted (Globs.TheGraph->getNumVertices()) ; Globs.TheGraph->printPrologue_gml(std::cout) ; Globs.TheGraph->printVertex_gml (std::cout, Globs.TheGraph->getVertex(Args.GmlStartVertex.getValue()), Args.GmlGraphRecDepth.getValue(), nodeprinted, edgesprinted) ; Globs.TheGraph->printEpilogue_gml(std::cout) ; exit (EXIT_SUCCESS) ; } #endif } Embedder::~Embedder () { delete Globs.TheGraph ; delete Globs.TheCvrStgFile ; } void Embedder::embed () { ProgressOutput* prout = NULL ; if (Args.Verbosity.getValue() == NORMAL) { std::string embstring, cvrstring ; if (Args.EmbFn.getValue() == "") { embstring = _("standard input") ; } else { embstring = "\"" + Args.EmbFn.getValue() + "\"" ; } if (Args.CvrFn.getValue() == "") { cvrstring = _("standard input") ; } else { cvrstring = "\"" + Args.CvrFn.getValue() + "\"" ; } char buf[200] ; sprintf (buf, _("embedding %s in %s..."), embstring.c_str(), cvrstring.c_str()) ; prout = new ProgressOutput (std::string(buf)) ; } else if (Args.Verbosity.getValue() == VERBOSE) { prout = new ProgressOutput () ; } const Matching* M = calculateMatching (prout) ; // embed matched edges const std::list medges = M->getEdges() ; for (std::list::const_iterator it = medges.begin() ; it != medges.end() ; it++) { embedEdge (*it) ; } // embed exposed vertices const std::list *expvertices = M->getExposedVerticesLink() ; for (std::list::const_iterator it = expvertices->begin() ; it != expvertices->end() ; it++) { embedExposedVertex (*it) ; } delete M ; // write stego file Globs.TheCvrStgFile->transform (Args.StgFn.getValue()) ; bool displaydone = false ; if (Globs.TheCvrStgFile->is_std()) { Message ws (_("writing stego file to standard output... ")) ; ws.printMessage() ; } else { if (Args.StgFn.getValue() != Args.CvrFn.getValue()) { Message ws (_("writing stego file \"%s\"... "), Globs.TheCvrStgFile->getName().c_str()) ; ws.setNewline (false) ; ws.printMessage() ; displaydone = true ; } } Globs.TheCvrStgFile->write() ; if (displaydone) { Message wsd (_("done")) ; wsd.printMessage() ; } } const Matching* Embedder::calculateMatching (ProgressOutput* prout) { Matching* matching = new Matching (Globs.TheGraph, prout) ; std::vector MatchingAlgos = Globs.TheCvrStgFile->getMatchingAlgorithms (Globs.TheGraph, matching) ; for (std::vector::const_iterator ait = MatchingAlgos.begin() ; ait != MatchingAlgos.end() ; ait++) { if (Args.Verbosity.getValue() == VERBOSE) { prout->setMessage (_("executing %s..."), (*ait)->getName()) ; } (*ait)->setGoal (Args.Goal.getValue()) ; (*ait)->run() ; delete *ait ; if (Args.Verbosity.getValue() == VERBOSE) { prout->done (matching->getMatchedRate(), matching->getAvgEdgeWeight()) ; } } if (Args.Check.getValue()) { if (!matching->check()) { CriticalWarning w ("integrity checking of matching data structures failed!") ; // TODO: internationalize this w.printMessage() ; } } matching->printVerboseInfo() ; // only print info for best matching if (Args.Verbosity.getValue() == NORMAL) { prout->done() ; } if (prout) { delete prout ; } return matching ; } void Embedder::embedEdge (Edge *e) { Vertex* v1 = e->getVertex1() ; Vertex* v2 = e->getVertex2() ; Globs.TheCvrStgFile->replaceSample (e->getSamplePos(v1), e->getReplacingSampleValue (v1)) ; Globs.TheCvrStgFile->replaceSample (e->getSamplePos(v2), e->getReplacingSampleValue (v2)) ; } void Embedder::embedExposedVertex (Vertex *v) { SamplePos samplepos = 0 ; SampleValue *newsample = NULL ; float mindistance = FLT_MAX ; for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { SampleValue *curold = v->getSampleValue(i) ; SampleValue *curnew = v->getSampleValue(i)->getNearestTargetSampleValue(v->getTargetValue(i)) ; if (curold->calcDistance (curnew) < mindistance) { samplepos = v->getSamplePos(i) ; newsample = curnew ; mindistance = curold->calcDistance (curnew) ; } else { delete curnew ; } } #ifdef DEBUG printDebug (1, "embedding vertex with label %lu by changing sample position %lu.", v->getLabel(), samplepos) ; #endif EmbValue oldev = Globs.TheCvrStgFile->getEmbeddedValue (samplepos) ; Globs.TheCvrStgFile->replaceSample (samplepos, newsample) ; myassert (oldev != Globs.TheCvrStgFile->getEmbeddedValue (samplepos)) ; delete newsample ; } steghide-0.5.1/src/msg.h0000644000076400001440000000623707735577226010554 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_MSG_H #define SH_MSG_H #include #include class MessageBase { public: MessageBase (void) ; MessageBase (std::string msg) ; MessageBase (const char* msgfmt, ...) ; virtual ~MessageBase() {} ; const std::string& getMessage (void) const { return Message ; } ; void setMessage (std::string msg) { Message = msg ; } ; /** * toggle newline printing on/off * \param prnl wether to print a newline character after the message **/ void setNewline (bool prnl) { Newline = prnl ; } ; /** * return either "\n" or "" depending on wether this message should be followed by a newline or not **/ const std::string getNewline (void) const { return (Newline ? "\n" : "") ; } ; void setMessage (const char *msgfmt, ...) ; virtual void printMessage (void) const = 0 ; protected: static const unsigned int MsgMaxSize = 512 ; std::string compose (const char *msgfmt, ...) const ; std::string vcompose (const char *msgfmt, va_list ap) const ; private: std::string Message ; bool Newline ; } ; class Message : public MessageBase { public: Message (void) : MessageBase() {} ; Message (std::string msg) : MessageBase (msg) {} ; Message (const char *msgfmt, ...) ; void printMessage (void) const ; } ; class VerboseMessage : public MessageBase { public: VerboseMessage (void) : MessageBase() {} ; VerboseMessage (std::string msg) : MessageBase (msg) {} ; VerboseMessage (const char *msgfmt, ...) ; void printMessage (void) const ; } ; class Warning : public MessageBase { public: Warning (void) : MessageBase() {} ; Warning (std::string msg) : MessageBase (msg) {} ; Warning (const char *msgfmt, ...) ; void printMessage (void) const ; } ; class CriticalWarning : public MessageBase { public: CriticalWarning (void) : MessageBase() {} ; CriticalWarning (std::string msg) : MessageBase (msg) {} ; CriticalWarning (const char *msgfmt, ...) ; void printMessage (void) const ; } ; class Question : public MessageBase { public: Question (void) ; Question (std::string msg) ; Question (const char *msgfmt, ...) ; void printMessage (void) const ; /** * wait for the user to answer the question (should be printed before) * \return true iff the user answers with yes, i.e. presses the yeschar-key **/ bool getAnswer (void) ; private: std::string yeschar ; std::string nochar ; } ; #endif /* ndef SH_MSG_H */ steghide-0.5.1/src/AuSampleValues.h0000644000076400001440000000226107735577225012645 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_AUSAMPLEVALUES_H #define SH_AUSAMPLEVALUES_H #include "AudioSampleValue.h" typedef AudioSampleValue AuMuLawSampleValue ; typedef AudioSampleValue AuPCM8SampleValue ; typedef AudioSampleValue AuPCM16SampleValue ; typedef AudioSampleValue AuPCM32SampleValue ; #endif // ndef SH_AUSAMPLEVALUES_H steghide-0.5.1/src/AudioSampleValue.h0000644000076400001440000000742507735577225013165 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_AUDIOSAMPLEVALUE_H #define SH_AUDIOSAMPLEVALUE_H #include "CvrStgFile.h" #include "SampleValue.h" #include "common.h" /** * An enumeration containing all audio sample types. This enumeration * is used as template parameter for AudioSampleValue and AudioData to * identify the correct implementation for a given audio format. **/ enum AUDIOSAMPLETYPE { /// au 8 Bit mu-law AuMuLaw, /// au 8 Bit linear pcm AuPCM8, /// au 16 Bit linear pcm AuPCM16, /// au 32 Bit linear pcm AuPCM32 } ; /** * \class AudioSampleValue * \brief a class representing an audio sample **/ template class AudioSampleValue : public SampleValue { public: AudioSampleValue (ValueType v) ; ValueType getValue (void) const { return Value ; } ; SampleValue* getNearestTargetSampleValue (EmbValue t) const ; UWORD32 calcDistance (const SampleValue* s) const ; std::string getName (void) const ; private: ValueType Value ; static const ValueType MinValue ; static const ValueType MaxValue ; UWORD32 calcKey (ValueType v) const { return (v - MinValue) ; } ; EmbValue calcEValue (ValueType v) const { return ((EmbValue) ((v - MinValue) % Globs.TheCvrStgFile->getEmbValueModulus())) ; } ; } ; template AudioSampleValue::AudioSampleValue (ValueType v) : SampleValue(), Value(v) { Key = calcKey(v) ; EValue = calcEValue(v) ; } template UWORD32 AudioSampleValue::calcDistance (const SampleValue* s) const { const AudioSampleValue* sample = (const AudioSampleValue*) s ; /* If s is not a correct AudioSampleValue then we get into real trouble here. But calcDistance is called very often, a dynamic_cast costs a lot of time and it does not make sense to pass anything but a correct AudioSampleValue as s anyway. */ if (sample->Value > Value) { return sample->Value - Value ; } else { return Value - sample->Value ; } } template SampleValue* AudioSampleValue::getNearestTargetSampleValue (EmbValue t) const { ValueType val_up = Value, val_down = Value, newval = 0 ; bool found = false ; do { if (val_up < MaxValue) { val_up++ ; } if (val_down > MinValue) { val_down-- ; } if (calcEValue(val_up) == t && calcEValue(val_down) == t) { if (RndSrc.getBool()) { newval = val_up ; } else { newval = val_down ; } found = true ; } else if (calcEValue(val_up) == t) { newval = val_up ; found = true ; } else if (calcEValue(val_down) == t) { newval = val_down ; found = true ; } } while (!found) ; return ((SampleValue *) new AudioSampleValue (newval)) ; } template std::string AudioSampleValue::getName (void) const { char buf[128] ; sprintf (buf, "%ld", (long) Value) ; return std::string (buf) ; } #endif // ndef SH_AUDIOSAMPLEVALUE_H steghide-0.5.1/src/AssertionFailed.cc0000644000076400001440000000306407735577226013173 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "AssertionFailed.h" void AssertionFailed::printMessage () const { printf ("\n") ; SteghideError::printMessage() ; printf (_("This means that you have found a bug. Please let me (shetzl@chello.at)\n" "know this if you have a way to reproduce the error.\n" "Steghide has to exit now. Sorry.\n")) ; } char* AssertionFailed::stripDir (const char *fn) { int i = 0, j = 0, start = 0, end = 0 ; end = i = strlen (fn) - 1 ; while ((i >= 0) && (fn[i] != '\\') && (fn[i] != '/')) { i-- ; } start = i + 1 ; char* retval = (char *) malloc (end - start + 2) ; j = 0 ; for (i = start ; i <= end ; i++, j++) { retval[j] = fn [i] ; } retval[j] = '\0' ; return retval ; } steghide-0.5.1/src/WavPCMSampleValue.h0000644000076400001440000000312007735577226013206 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_WAVSAMPLE_H #define SH_WAVSAMPLE_H #include #include "SampleValue.h" class CvrStgFile ; class WavPCMSampleValue : public SampleValue { public: WavPCMSampleValue (int v) ; SampleValue* getNearestTargetSampleValue (EmbValue t) const ; UWORD32 calcDistance (const SampleValue *s) const ; std::string getName (void) const ; int getValue (void) const { return Value ; } ; private: int Value ; int MaxValue ; int MinValue ; EmbValue calcEValue (int v) const { return (v & 1) ; } } ; class WavPCMSmaller : public std::binary_function { public: bool operator() (const WavPCMSampleValue *v, const WavPCMSampleValue *w) { return v->getValue() < w->getValue() ; } ; } ; #endif // ndef SH_WAVSAMPLE_H steghide-0.5.1/src/BFSAPHeuristic.h0000644000076400001440000000352507735577225012475 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BFSAPHeuristic #define SH_BFSAPHeuristic #include "EdgeIterator.h" #include "MatchingAlgorithm.h" #include "Vertex.h" class Edge ; #include "Graph.h" class Matching ; /** * \class BFSAPHeuristic * \brief a matching algorithm implementing a heuristic breadth-first-search for augmenting paths **/ class BFSAPHeuristic : public MatchingAlgorithm { public: /** * construct an BFSAPHeuristic object * \param g the graph on which this heuristic should run * \param m the matching to start with **/ BFSAPHeuristic (Graph* g, Matching* m) ; virtual ~BFSAPHeuristic (void) ; const char* getName (void) const { return "BFS Augmenting Path Heuristic" ; } ; void run (void) ; private: /** * \param v0 an exposed vertex * \param path an array of Edge pointers where the path will be put * \return the length of the path (the number of valid edges in path) **/ unsigned long searchAugmentingPath (Vertex* v0, const Edge** path) ; bool* VertexVisited ; Edge* BackEdge ; } ; #endif // ndef SH_BFSAPHeuristic steghide-0.5.1/src/error.cc0000644000076400001440000000753307735577226011255 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include #include "BinaryIO.h" #include "common.h" #include "error.h" // // class ArgError // ArgError::ArgError (const char* msgfmt, ...) : SteghideError() { va_list ap ; va_start (ap, msgfmt) , setMessage (vcompose (msgfmt, ap)) ; va_end (ap) ; } void ArgError::printMessage () const { SteghideError::printMessage() ; std::cerr << "steghide: " << _("type \"steghide --help\" for help.") << std::endl ; } // // class BinaryInputError // BinaryInputError::BinaryInputError (std::string fn, FILE* s) : SteghideError() { if (feof (s)) { if (fn == "") { setMessage(_("premature end of data from standard input.")) ; setType (STDIN_EOF) ; } else { setMessage(compose (_("premature end of file \"%s\"."), fn.c_str())) ; setType (FILE_EOF) ; } } else { if (fn == "") { setMessage(_("an error occured while reading data from standard input.")) ; setType (STDIN_ERR) ; } else { setMessage(compose (_("an error occured while reading data from the file \"%s\"."), fn.c_str())) ; setType (FILE_ERR) ; } } } BinaryInputError::TYPE BinaryInputError::getType (void) { return type ; } void BinaryInputError::setType (BinaryInputError::TYPE t) { type = t ; } // // class BinaryOutputError // BinaryOutputError::BinaryOutputError (std::string fn) : SteghideError() { if (fn == "") { setMessage(_("an error occured while writing data to standard output.")) ; setType(STDOUT_ERR) ; } else { setMessage(compose (_("an error occured while writing data to the file \"%s\"."), fn.c_str())) ; setType(FILE_ERR) ; } } BinaryOutputError::TYPE BinaryOutputError::getType (void) { return type ; } void BinaryOutputError::setType (BinaryOutputError::TYPE t) { type = t ; } // // class UnSupFileFormat // UnSupFileFormat::UnSupFileFormat (BinaryIO *io) : SteghideError() { if (io->is_std()) { setMessage(_("the file format of the data from standard input is not supported.")) ; } else { setMessage(compose (_("the file format of the file \"%s\" is not supported."), io->getName().c_str())) ; } } // // class NotImplementedError // NotImplementedError::NotImplementedError (const char *msgfmt, ...) : SteghideError() { va_list ap ; va_start (ap, msgfmt) ; setMessage (vcompose (msgfmt, ap)) ; va_end (ap) ; } void NotImplementedError::printMessage () const { SteghideError::printMessage() ; printf (_("This feature is not (yet) available. Please let me (shetzl@chello.at) know\n" "that you want to use this functionality to increase the chance that this will\n" "be implemented in the near future. Steghide has to exit now. Sorry.\n")) ; } // // class CorruptDataError // CorruptDataError::CorruptDataError (const char* msgfmt, ...) : SteghideError() { va_list ap ; va_start (ap, msgfmt) ; setMessage (vcompose (msgfmt, ap)) ; va_end (ap) ; } void CorruptDataError::printMessage () const { SteghideError::printMessage() ; printf (_("Other possible reasons for this error are that the passphrase is wrong\n" "or that there is no embedded data.\n")) ; } steghide-0.5.1/src/wrapper_hash_map.h0000644000076400001440000000245207735577226013301 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_SGI_HASH_MAP_H #define SH_SGI_HASH_MAP_H // this file is included to get access to a sgi::hash_map implementation #ifdef __GNUC__ # if __GNUC__ < 3 # include namespace sgi { using ::hash ; using ::hash_map ; } ; # else # include # if __GNUC_MINOR__ == 0 namespace sgi = std ; // GCC 3.0 # else namespace sgi = __gnu_cxx ; // GCC 3.1 and later # endif # endif #else namespace sgi = std ; #endif #endif // ndef SH_SGI_HASH_MAP_H steghide-0.5.1/src/WavChunk.h0000644000076400001440000000227007735577226011505 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_WAVCHUNK_H #define SH_WAVCHUNK_H class BinaryIO ; class WavChunkHeader ; class WavChunk { public: WavChunk (void) {} ; WavChunk (WavChunkHeader *chh) : ChunkHeader(chh) {} ; virtual ~WavChunk (void) ; virtual void read (BinaryIO *io) = 0 ; virtual void write (BinaryIO *io) ; protected: WavChunkHeader *ChunkHeader ; } ; #endif // ndef SH_WAVCHUNK_H steghide-0.5.1/src/wrapper_hash_set.h0000644000076400001440000000245507735577226013322 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_SGI_HASH_SET_H #define SH_SGI_HASH_SET_H // this file is included to get access to a sgi::hash_set implementation #ifdef __GNUC__ # if __GNUC__ < 3 # include namespace sgi { using ::hash ; using ::hash_set ; } ; # else # include # if __GNUC_MINOR__ == 0 namespace sgi = std ; // GCC 3.0 # else namespace sgi = ::__gnu_cxx ; // GCC 3.1 and later # endif # endif #else namespace sgi = std ; #endif #endif // ndef SH_SGI_HASH_SET_H steghide-0.5.1/src/SampleOccurence.h0000644000076400001440000000273407735577226013034 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_SAMPLEOCCURENCE_H #define SH_SAMPLEOCCURENCE_H #include "Vertex.h" class SampleOccurence { public: SampleOccurence (Vertex *v, unsigned short i) : TheVertex(v), Index(i) {} ; Vertex *getVertex (void) const { return TheVertex ; } ; void setVertex (Vertex* v) { TheVertex = v ; } ; unsigned short getIndex (void) const { return Index ; } ; void setIndex (unsigned short i) { Index = i ; } ; bool operator== (const SampleOccurence& soc) const { return ((TheVertex->getLabel() == soc.TheVertex->getLabel()) && (Index == soc.Index)) ; } ; private: Vertex *TheVertex ; unsigned short Index ; } ; #endif // ndef SH_SAMPLEOCCURENCE_H steghide-0.5.1/src/Vertex.h0000644000076400001440000001062707735577226011241 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_VERTEX_H #define SH_VERTEX_H #include "CvrStgFile.h" #include "common.h" class Edge ; class SampleOccurence ; class SampleValue ; /** * \class Vertex * \brief a vertex in a graph * * A vertex represents a bit that will cause a change to the cover-stego-file to be embedded. * A vertex consists of k samples (that is k sample values at k (different) positions in the * cover-stego-file), where k is TheCvrStgFile->getNumSamplesPerVertex(). One of these k samples * must be changed to an opposite sample to embed the bit that corresponds to this vertex. * * NOTE: Vertex relies on the Globals object pointed to by the Globs pointer. * This means that it must be set correctly before using any method of a Vertex object. **/ class Vertex { public: /** * construct a new vertex object * \param l the vertex label for this vertex * \param sposs the array (with length g->getSamplesPerVertex()) of the positions of the samples * \param svalues the array (with length g->getSamplesPerVertex()) of (unique (!)) pointers to the sample values * \param t the target value for the whole vertex - the value that should be returned by getEmbeddedValue() after the embedding **/ Vertex (VertexLabel l, SamplePos* sposs, SampleValue** svalues, EmbValue t) ; ~Vertex (void) ; /** * get the i-th sample position * \param i an index of a sample in this vertex (must be < TheCvrStgFile->getNumSamplesPerVertex()) * \return the position of the sample in the associated cvrstgfile **/ SamplePos getSamplePos (unsigned short i) const { return SamplePositions[i] ; } ; /** * get the i-th sample value * \param i an index of a sample in this vertex (must be < TheCvrStgFile->getNumSamplesPerVertex()) * \return the value of the sample in the associated cvrstgfile **/ SampleValue* getSampleValue (unsigned short i) const { return SampleValues[i] ; } ; /** * get the degree of this vertex **/ UWORD32 getDegree (void) const ; /** * get the shortest edge of this vertex **/ Edge *getShortestEdge (void) const { return ShortestEdge ; } ; /** * find shortest edge of this vertex and save result to ShortestEdge **/ void updateShortestEdge (void) ; /** * if this vertex is valid, mark it as deleted **/ void markDeleted (void) ; /** * if this vertex is marked as deleted, undo this **/ void unmarkDeleted (void) ; VertexLabel getLabel (void) const { return Label ; } ; void setLabel (VertexLabel l) { Label = l ; } ; void setSampleOccurenceIt (unsigned short i, std::list::iterator it) { SampleOccurenceIts[i] = it ; } EmbValue getEmbeddedValue (void) const ; EmbValue getTargetValue (unsigned short i) const { return TargetValues[i] ; } ; void print (unsigned short spc = 0) const ; void printEdges (void) const ; private: /// the vertex label of this vertex VertexLabel Label ; /// the sample positions of the samples described by this vertex in the CvrStgFile SamplePos* SamplePositions ; /// the sample values at the SamplePositions SampleValue** SampleValues ; /// the target values for the sample values (exactly one of them has to be reached (and the other left unchanged) to embed this vertex) EmbValue* TargetValues ; /// point to entries in std::lists of sample occurences in the graph std::list::iterator* SampleOccurenceIts ; /// the shortest edge of this vertex (as calculated by updateShortestEdge) Edge *ShortestEdge ; /// true iff this vertex is not deleted bool valid ; /// the number of loop edges (loop edges are not valid edges) unsigned short SelfDegree ; } ; #endif // ndef SH_VERTEX_H steghide-0.5.1/src/RandomSource.cc0000644000076400001440000000552307735577226012522 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include "BitString.h" #include "common.h" #include "error.h" #include "msg.h" #include "RandomSource.h" // the global RandomSource object RandomSource RndSrc ; RandomSource::RandomSource () { RandomBytePos = 8 ; #ifdef HAVE_DEV_URANDOM if ((RandomInput = fopen ("/dev/urandom", "r")) == NULL) { Warning w (_("could not open /dev/urandom, using standard library random numbers instead.")) ; w.printMessage() ; RandomInput = NULL ; srand ((unsigned int) time (NULL)) ; } #else RandomInput = NULL ; srand ((unsigned int) time (NULL)) ; #endif } RandomSource::~RandomSource() { if (RandomInput != NULL) { if (fclose (RandomInput) != 0) { throw SteghideError (_("could not close random input file.")) ; } } } BYTE RandomSource::getByte () { BYTE retval = 0 ; #ifndef NORANDOM if (RandomInput != NULL) { retval = getc (RandomInput) ; } else { retval = (BYTE) (256.0 * (rand() / (RAND_MAX + 1.0))) ; } #endif return retval ; } std::vector RandomSource::getBytes (unsigned int n) { std::vector retval ; for (unsigned int i = 0 ; i < n ; i++) { retval.push_back (getByte()) ; } return retval ; } BitString RandomSource::getBits (unsigned int n) { BitString retval ; BYTE rndbyte = 0 ; unsigned int bitsused = 8 ; while (n > 0) { if (bitsused == 8) { rndbyte = getByte() ; bitsused = 0 ; } retval.append ((BIT) (rndbyte & 1)) ; rndbyte = rndbyte >> 1 ; bitsused++ ; n-- ; } return retval ; } bool RandomSource::getBool() { if (RandomBytePos == 8) { RandomByte = getByte() ; RandomBytePos = 0 ; } bool retval = (RandomByte & (1 << RandomBytePos)) ; RandomBytePos++ ; return retval ; } unsigned long RandomSource::getValue (unsigned long n) { const unsigned long ceilvalue = 0x1000000UL ; myassert (n < ceilvalue) ; unsigned long value = ((unsigned long) (getByte() << 16)) | ((unsigned long) (getByte() << 8)) | ((unsigned long) getByte()) ; return (unsigned long) ((((double) value) / ((double) ceilvalue)) * ((double) n)) ; } steghide-0.5.1/src/JpegFile.cc0000644000076400001440000001742407735577226011611 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #ifdef USE_LIBJPEG #include #include #include "AUtils.h" #include "BinaryIO.h" #include "JpegFile.h" #include "JpegSampleValue.h" #include "SMDConstructionHeuristic.h" #include "error.h" JpegFile::JpegFile (BinaryIO* io) : CvrStgFile() { setSamplesPerVertex (SamplesPerVertex) ; setRadius (Radius) ; setEmbValueModulus (EmbValueModulus) ; HeightInBlocks = NULL ; WidthInBlocks = NULL ; read (io) ; } JpegFile::~JpegFile () { if (WidthInBlocks) { delete[] WidthInBlocks ; } if (HeightInBlocks) { delete[] HeightInBlocks ; } } std::list JpegFile::getProperties () const { std::list retval ; // format retval.push_back (CvrStgFile::Property (_("format"), "jpeg")) ; return retval ; } void JpegFile::read (BinaryIO* io) { CvrStgFile::read (io) ; // TODO - use BinaryIO (or similar class) as input/output module for libjpeg (to avoid the NotImplementedError and using FILE* here) FILE *infile = NULL ; if (io->is_std()) { throw NotImplementedError (_("can not use standard input as source for jpeg files with libjpeg.")) ; } else { infile = io->getStream() ; rewind (infile) ; } struct jpeg_error_mgr errmgr ; DeCInfo.err = jpeg_std_error (&errmgr) ; jpeg_create_decompress (&DeCInfo) ; jpeg_stdio_src (&DeCInfo, infile) ; jpeg_read_header (&DeCInfo, TRUE) ; DctCoeffs = jpeg_read_coefficients (&DeCInfo) ; // fill HeightInBlocks and WidthInBlocks unsigned short max_v_samp_factor = 0 ; unsigned short max_h_samp_factor = 0 ; for (unsigned short icomp = 0 ; icomp < DeCInfo.num_components ; icomp++) { max_v_samp_factor = AUtils::max (max_v_samp_factor, DeCInfo.comp_info[icomp].v_samp_factor) ; max_h_samp_factor = AUtils::max (max_h_samp_factor, DeCInfo.comp_info[icomp].h_samp_factor) ; } HeightInBlocks = new unsigned int[DeCInfo.num_components] ; WidthInBlocks = new unsigned int[DeCInfo.num_components] ; for (unsigned short icomp = 0 ; icomp < DeCInfo.num_components ; icomp++) { HeightInBlocks[icomp] = AUtils::div_roundup (DeCInfo.image_height * DeCInfo.comp_info[icomp].v_samp_factor, 8 * max_v_samp_factor) ; WidthInBlocks[icomp] = AUtils::div_roundup (DeCInfo.image_width * DeCInfo.comp_info[icomp].h_samp_factor, 8 * max_h_samp_factor) ; } // resize LinDctCoeffs to size that is enough to contain all dct coeffs unsigned long totalnumcoeffs = 0 ; for (unsigned short icomp = 0 ; icomp < DeCInfo.num_components ; icomp++) { totalnumcoeffs += CoeffPerBlock * (HeightInBlocks[icomp] * WidthInBlocks[icomp]) ; } LinDctCoeffs.resize (totalnumcoeffs) ; // read data from jpeglib's virtual array into LinDctCoeffs and StegoIndices UWORD32 linindex = 0 ; for (unsigned short icomp = 0 ; icomp < DeCInfo.num_components ; icomp++) { unsigned int currow = 0 ; while (currow < HeightInBlocks[icomp]) { unsigned int naccess = 1 ; JBLOCKARRAY array = (*(DeCInfo.mem->access_virt_barray)) ((j_common_ptr) &DeCInfo, DctCoeffs[icomp], currow, naccess, FALSE) ; for (unsigned int irow = 0 ; irow < naccess ; irow++) { for (unsigned int iblock = 0 ; iblock < WidthInBlocks[icomp] ; iblock++) { for (unsigned int icoeff = 0 ; icoeff < CoeffPerBlock ; icoeff++) { LinDctCoeffs[linindex] = array[irow][iblock][icoeff] ; // don't use zero dct coefficients to embed data if (LinDctCoeffs[linindex] != 0) { StegoIndices.push_back (linindex) ; } linindex++ ; } } } currow += naccess ; } } } void JpegFile::write () { CvrStgFile::write() ; FILE* outfile = getBinIO()->getStream() ; // prepare for writing jpeg_create_compress (&CInfo) ; jpeg_copy_critical_parameters (&DeCInfo, &CInfo) ; struct jpeg_error_mgr jerr2 ; CInfo.err = jpeg_std_error(&jerr2) ; jpeg_stdio_dest (&CInfo, outfile) ; // write file header jpeg_write_coefficients (&CInfo, DctCoeffs) ; UWORD32 linindex = 0 ; for (unsigned short icomp = 0 ; icomp < CInfo.num_components ; icomp++) { unsigned int currow = 0 ; while (currow < HeightInBlocks[icomp]) { unsigned int naccess = 1 ; JBLOCKARRAY array = (*(CInfo.mem->access_virt_barray)) ((j_common_ptr) &CInfo, DctCoeffs[icomp], currow, naccess, TRUE) ; for (unsigned int irow = 0 ; irow < naccess ; irow++) { for (unsigned int iblock = 0 ; iblock < WidthInBlocks[icomp] ; iblock++) { for (unsigned int icoeff = 0 ; icoeff < CoeffPerBlock ; icoeff++) { array[irow][iblock][icoeff] = LinDctCoeffs[linindex] ; linindex++ ; } } } currow += naccess ; } } // write and deallocate everything (writing is possible only once) jpeg_finish_compress (&CInfo) ; jpeg_destroy_compress(&CInfo); jpeg_finish_decompress (&DeCInfo) ; jpeg_destroy_decompress(&DeCInfo); } unsigned long JpegFile::getNumSamples (void) const { return StegoIndices.size() ; } SampleValue* JpegFile::getSampleValue (const SamplePos pos) const { myassert (pos < StegoIndices.size()) ; return new JpegSampleValue (LinDctCoeffs[StegoIndices[pos]]) ; } void JpegFile::replaceSample (const SamplePos pos, const SampleValue* s) { const JpegSampleValue* sample = dynamic_cast (s) ; myassert (sample != NULL) ; myassert (pos <= StegoIndices.size()) ; LinDctCoeffs[StegoIndices[pos]] = sample->getDctCoeff() ; } EmbValue JpegFile::getEmbeddedValue (const SamplePos pos) const { myassert (pos < StegoIndices.size()) ; return JpegSampleValue::calcEValue (LinDctCoeffs[StegoIndices[pos]]) ; } std::vector JpegFile::getMatchingAlgorithms (Graph* g, Matching* m) const { std::vector retval ; retval.push_back (new SMDConstructionHeuristic (g, m)) ; return retval ; } #ifdef DEBUG std::map* JpegFile::getFrequencies () { unsigned long n = LinDctCoeffs.size() ; std::map* table = new std::map () ; for (unsigned long pos = 0 ; pos < n ; pos++) { SampleValue *sv = (SampleValue*) new JpegSampleValue (LinDctCoeffs[pos]) ; (*table)[sv->getKey()]++ ; delete sv ; } return table ; } void JpegFile::printFrequencies (const std::map& freqs) { std::list output ; // insert the positive dct coeffs into output list for (std::map::const_iterator pit = freqs.begin() ; pit->first < 2147483648UL /* 2^31 */ ; pit++) { char buf[30] ; sprintf (buf, "%ld: %lu", (long) pit->first, pit->second) ; output.push_back (std::string(buf)) ; } // insert the negative dct coeffs into output list for (std::map::const_reverse_iterator nit = freqs.rbegin() ; nit->first > 2147483648UL /* 2^31 */ ; nit++) { char buf[30] ; sprintf (buf, "%ld: %lu", (long) nit->first, nit->second) ; output.push_front (std::string(buf)) ; } for (std::list::const_iterator it = output.begin() ; it != output.end() ; it++) { std::cout << *it << std::endl ; } } #endif // def DEBUG #endif // def USE_LIBJPEG steghide-0.5.1/src/AUtils.h0000644000076400001440000000677107737767716011201 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_AUTILS_H #define SH_AUTILS_H #include #ifndef log2 // this is in an #ifndef because some cmath implementations #define log2 and some not # define log2(x) (log(x) / log(2.0)) #endif /** * \class AUtils * \brief provides some generic functions for non-standard arithmetic operations **/ class AUtils { public: /** * return the maximum of a and b (needs >) **/ template static T max (T a, T b) ; /** * return the minimum of a and b (needs <) **/ template static T min (T a, T b) ; /** * returns a divided through b rounded up to nearest "integer" (needs =, --, +, /) **/ template static T div_roundup (T a, T b) ; /** * substraction with the modification to return 0 (T()) for negative difference (needs >, -, T()) **/ template static T bminus (T a, T b) ; /** * addition with the modification to return top for sums that are larger than top **/ template static T bplus (T a, T b) ; template static T bplus (T a, T b, T top) ; /** * calculate the sum s[0]+...s[n-1] modulo m (needs =, +, % for T and =, CTYPE(), <, ++ for CTYPE) **/ template static T modsum (T* s, CTYPE n, T m) ; /** * round up x to nearest integer **/ template static IT roundup (FT x) ; /** * compute 2-logarithm of n (rounded up to nearest int), i.e. number of bits needed to store values from {0,...,n-1} **/ template static T log2_ceil (T n) ; } ; template T AUtils::max (T a, T b) { if (a > b) { return a ; } else { return b ; } } template T AUtils::min (T a, T b) { if (a < b) { return a ; } else { return b ; } } template T AUtils::div_roundup (T a, T b) { T c = b-- ; return ((a + b) / c) ; } template T AUtils::bminus (T a, T b) { if (a > b) { return (a - b) ; } else { return T() ; } } template T AUtils::bplus (T a, T b) { a += b ; if (a > top) { return top ; } else { return a ; } } template T AUtils::bplus (T a, T b, T top) { a += b ; if (a > top) { return top ; } else { return a ; } } template T AUtils::modsum (T* s, CTYPE n, T m) { T retval = 0 ; for (CTYPE i = CTYPE() ; i < n ; ++i) { retval = (retval + s[i]) % m ; } return retval ; } template IT AUtils::roundup (FT x) { IT retval = 0 ; FT intpart = (FT) ((IT) x) ; if (x - intpart == (FT) 0.0) { retval = (IT) x ; } else { retval = ((IT) x) + 1 ; } return retval ; } template T AUtils::log2_ceil (T n) { T retval = 0 ; while (n > 1) { n = div_roundup (n, 2) ; ++retval ; } return retval ; } #endif // ndef SH_AUTILS_H steghide-0.5.1/src/Selector.h0000644000076400001440000000536507735577226011547 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_SELECTOR_H #define SH_SELECTOR_H #include #include #include "wrapper_hash_map.h" #include "common.h" class PseudoRandomSource ; /** * \class Selector * \brief a random permutation of a random combination **/ class Selector { public: /** * construct a Selector object * \param m the range - operator[] will return numbers in {0,...,m-1} * \param pp a passphrase used to generate the seed **/ Selector (UWORD32 m, std::string pp) ; /** * construct a Selector object that resembles the identity permutation with range m * \param m the range - (*this)[i] will be i for i in {0,...,m-1} **/ Selector (UWORD32 m) ; /** * construct a Selector object that will return predefined values * \param retvals the values that operator[] shall return * * The Maximum is set to retvals.size(). **/ Selector (const std::vector& retvals) ; ~Selector (void) ; /** * get the value at the i-th position * \param i an index **/ UWORD32 operator[] (UWORD32 i) ; UWORD32 getRange (void) const { return Maximum ; } ; private: std::vector X ; std::vector Y ; sgi::hash_map Xreversed ; /// operator[] will return a value in {0,...,Maximum-1} UWORD32 Maximum ; /// the number of calculated positions in the arrays UWORD32 NumInArray ; PseudoRandomSource* PRandom ; /** * fill X, Y and Xreversed until but not including index m **/ void calculate (UWORD32 m) ; /** * search an index i such that 0 <= i < m and X[i] == v * \param v the value to be searched for in the X-array * \param m the upper bound for the index * \param p a pointer to a variable where the found index can be stored * \return true iff such an index is found (*p is set to i in this case **/ bool idxX (UWORD32 v, UWORD32 m, UWORD32* p) const ; /** * set X[i] to v while maintaining Xreversed **/ void setX (UWORD32 i, UWORD32 v) ; } ; #endif // ndef SH_SELECTOR_H steghide-0.5.1/src/Embedder.h0000644000076400001440000000276007735577226011472 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_EMBEDDER_H #define SH_EMBEDDER_H #include "BitString.h" class Edge ; class CvrStgFile ; class Graph ; class Matching ; class ProgressOutput ; class Vertex ; class Embedder { public: Embedder (void) ; ~Embedder (void) ; void embed (void) ; private: static const unsigned int Default_NConstrHeur = 1 ; BitString ToEmbed ; /** * do the matching algorithms **/ const Matching* calculateMatching (ProgressOutput* prout) ; /** * embed the two bits represented by the two vertices adjacent to e **/ void embedEdge (Edge *e) ; /** * embed the bit represented by the Vertex v **/ void embedExposedVertex (Vertex *v) ; } ; #endif // ndef SH_EMBEDDER_H steghide-0.5.1/src/AssertionFailed.h0000644000076400001440000000234607735577225013036 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_ASSERTIONFAILED_H #define SH_ASSERTIONFAILED_H #include "common.h" #include "SteghideError.h" class AssertionFailed : public SteghideError { public: AssertionFailed (const char* fn, unsigned int l) : SteghideError(_("assertion failed in %s at line number %d."), stripDir(fn), l) {} ; void printMessage (void) const ; private: char* stripDir (const char* fn) ; } ; #endif // ndef SH_ASSERTION_FAILED steghide-0.5.1/src/MHashKeyGen.cc0000644000076400001440000000602507735577226012222 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include "common.h" #include "error.h" #include "MHashKeyGen.h" MHashKeyGen::MHashKeyGen () { AlgorithmData.count = 0 ; AlgorithmData.salt = NULL ; AlgorithmData.salt_size = 0 ; } MHashKeyGen::MHashKeyGen (keygenid kgalgo, hashid halgo, unsigned int keysize) { setKeyGenAlgorithm (kgalgo) ; setKeySize (keysize) ; setHashAlgorithm (halgo) ; AlgorithmData.count = 0 ; AlgorithmData.salt = NULL ; AlgorithmData.salt_size = 0 ; } MHashKeyGen::~MHashKeyGen () { if (AlgorithmData.salt != NULL) { free (AlgorithmData.salt) ; } } std::vector MHashKeyGen::createKey (std::string password) { char *passwd = (char *) s_malloc (password.size() + 1) ; strcpy (passwd, password.c_str()) ; int passwdlen = strlen (passwd) ; unsigned char *key = (unsigned char *) s_malloc (KeySize) ; if (mhash_keygen_ext (Algorithm, AlgorithmData, key, KeySize, (unsigned char *) passwd, passwdlen) < 0) { throw SteghideError (_("could not generate key using libmhash.")) ; } std::vector retval (KeySize) ; for (unsigned int i = 0 ; i < KeySize ; i++) { retval[i] = key[i] ; } free (passwd) ; free (key) ; return retval ; } void MHashKeyGen::setKeySize (unsigned int keysize) { KeySize = keysize ; } void MHashKeyGen::setKeyGenAlgorithm (keygenid algo) { Algorithm = algo ; } void MHashKeyGen::setHashAlgorithm (hashid hashalgo) { AlgorithmData.hash_algorithm[0] = hashalgo ; } void MHashKeyGen::setHashAlgorithms (std::vector hashalgos) { myassert (hashalgos.size() <= 2) ; for (unsigned int i = 0 ; i < hashalgos.size() ; i++) { AlgorithmData.hash_algorithm[i] = hashalgos[i] ; } } void MHashKeyGen::setSalt (std::vector salt) { AlgorithmData.salt_size = salt.size() ; if (AlgorithmData.salt != NULL) { free (AlgorithmData.salt) ; } AlgorithmData.salt = s_malloc (AlgorithmData.salt_size) ; unsigned char *tmp = (unsigned char *) AlgorithmData.salt ; for (int i = 0 ; i < AlgorithmData.salt_size ; i++) { tmp[i] = salt[i] ; } } void *MHashKeyGen::s_malloc (size_t size) { void *retval = NULL ; if ((retval = malloc (size)) == NULL) { throw SteghideError (_("could not allocate memory.")) ; } return retval ; } steghide-0.5.1/src/AuData.h0000644000076400001440000000400107735577225011107 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_AUDATA_H #define SH_AUDATA_H #include "BinaryIO.h" #include "AudioData.h" // AuMuLawAudioData typedef AudioDataImpl AuMuLawAudioData ; inline BYTE AuMuLawAudioData::readValue (BinaryIO* io) const { return (io->read8()) ; } inline void AuMuLawAudioData::writeValue (BinaryIO* io, BYTE v) const { io->write8(v) ; } // AuPCM8AudioData typedef AudioDataImpl AuPCM8AudioData ; inline SBYTE AuPCM8AudioData::readValue (BinaryIO* io) const { return ((SBYTE) io->read8()) ; } inline void AuPCM8AudioData::writeValue (BinaryIO* io, SBYTE v) const { io->write8((BYTE) v) ; } // AuPCM16AudioData typedef AudioDataImpl AuPCM16AudioData ; inline SWORD16 AuPCM16AudioData::readValue (BinaryIO* io) const { return ((SWORD16) io->read16_be()) ; } inline void AuPCM16AudioData::writeValue (BinaryIO* io, SWORD16 v) const { io->write16_be((UWORD16) v) ; } // AuPCM32AudioData typedef AudioDataImpl AuPCM32AudioData ; inline SWORD32 AuPCM32AudioData::readValue (BinaryIO* io) const { return ((SWORD32) io->read32_be()) ; } inline void AuPCM32AudioData::writeValue (BinaryIO* io, SWORD32 v) const { io->write32_be((UWORD32) v) ; } #endif // ndef SH_AUDATA_H steghide-0.5.1/src/main.cc0000644000076400001440000000646507741746245011047 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include "common.h" #include "Session.h" #include "SteghideError.h" #ifdef WIN32 // locale support on Windows #include typedef struct struct_LCIDENTRY { LCID localeID ; char language[3] ; } LCIDENTRY ; LCIDENTRY LCIDTable[] = { // french { 0x040c, "fr" }, // France { 0x080c, "fr" }, // Belgium { 0x0c0c, "fr" }, // Canada { 0x100c, "fr" }, // Switzerland { 0x140c, "fr" }, // Luxembourg { 0x180c, "fr" }, // Monaco // german { 0x0407, "de" }, // Germany { 0x0807, "de" }, // Switzerland { 0x0c07, "de" }, // Austria { 0x1007, "de" }, // Luxembourg { 0x1407, "de" }, // Liechtenstein // spanish { 0x040a, "es" }, // Spain - Traditional { 0x080a, "es" }, // Mexico { 0x0c0a, "es" }, // Spain - Modern Sort { 0x100a, "es" }, // Guatemala { 0x140a, "es" }, // Costa Rica { 0x180a, "es" }, // Panama { 0x1c0a, "es" }, // Dominican Republic { 0x200a, "es" }, // Venezuela { 0x240a, "es" }, // Colombia { 0x280a, "es" }, // Peru { 0x2c0a, "es" }, // Argentinia { 0x300a, "es" }, // Ecuador { 0x340a, "es" }, // Chile { 0x380a, "es" }, // Uruguay { 0x3c0a, "es" }, // Paraguay { 0x400a, "es" }, // Bolivia { 0x440a, "es" }, // El Salvador { 0x480a, "es" }, // Honduras { 0x4c0a, "es" }, // Nicaragua { 0x500a, "es" }, // Puerto Rico // romanian { 0x0418, "ro" }, // Romanian { 0x0818, "ro" }, // Romanian (Moldova) // end of LCIDTable { 0x0000, "__" } } ; #undef LOCALEDIR #define LOCALEDIR "./locale/" #endif // WIN32 static void gettext_init (void) ; int main (int argc, char *argv[]) { try { gettext_init() ; Args = Arguments (argc, argv) ; Args.parse() ; Session s ; s.run() ; } catch (SteghideError& e) { e.printMessage() ; exit(EXIT_FAILURE) ; } exit(EXIT_SUCCESS) ; } static void gettext_init (void) { #ifndef DEBUG /* initialize gettext */ setlocale (LC_ALL, "") ; bindtextdomain (PACKAGE, LOCALEDIR) ; bind_textdomain_codeset (PACKAGE, "ISO-8859-1") ; textdomain (PACKAGE) ; #ifdef WIN32 /* using the Windows API to find out which language should be used (as there is no environment variable indicating the language) */ { LCID localeID = GetThreadLocale () ; int i = 0 ; while (LCIDTable[i].localeID != 0x0000) { if (localeID == LCIDTable[i].localeID) { setenv ("LANG", LCIDTable[i].language, 1) ; /* Make Change known (see gettext manual) */ { extern int _nl_msg_cat_cntr ; ++_nl_msg_cat_cntr; } break ; } i++ ; } } #endif // ndef WIN32 #endif // ndef DEBUG } steghide-0.5.1/src/SteghideError.cc0000644000076400001440000000250707735577226012666 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "SteghideError.h" #include "common.h" SteghideError::SteghideError (void) : MessageBase(_("error, exiting. (no error message defined).")) { } SteghideError::SteghideError(std::string msg) : MessageBase(msg) { } SteghideError::SteghideError (const char *msgfmt, ...) : MessageBase() { va_list ap ; va_start (ap, msgfmt) ; setMessage (vcompose (msgfmt, ap)) ; va_end (ap) ; } void SteghideError::printMessage () const { std::cerr << "steghide: " << getMessage() << std::endl ; } steghide-0.5.1/src/Arguments.h0000644000076400001440000001042207742072355011711 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_ARGUMENTS_H #define SH_ARGUMENTS_H #include #include #include "Arg.h" // to include DEBUG if defined #ifdef HAVE_CONFIG_H #include "config.h" #endif /** * \class Arguments * \brief parsing and data representation of command-line arguments **/ class Arguments { public: Arguments (void) {} ; /** * initialize this Arguments object with argc and argv **/ Arguments (int argc, char *argv[]) ; /** * parse Argc and Argv filling the Arg* member variable for later access **/ void parse (void) ; /** * is standard input used ? - according to the given arguments **/ bool stdin_isused (void) const ; /// the command to be executed in this session ArgCommand Command ; /// the name of the command to be executed in this session (as supplied by the user) std::string CommandString ; /// the embed file name, "" if stdin ArgString EmbFn ; /// the extract file name, "" if stdout ArgString ExtFn ; /// the cover file name, "" if stdin ArgString CvrFn ; /// the stego file name, "" if stdout/stdin ArgString StgFn ; ArgString Passphrase ; ArgBool Checksum ; ArgInt Compression ; ArgBool EmbedEmbFn ; ArgEncAlgo EncAlgo ; ArgEncMode EncMode ; ArgULong Radius ; ArgFloat Goal ; ArgBool Force ; ArgVerbosity Verbosity ; ArgDebugCommand DebugCommand ; ArgBool Check ; ArgStringList FileList ; ArgUInt DebugLevel ; ArgUInt GmlGraphRecDepth ; ArgUInt GmlStartVertex ; std::string getPassphrase (bool doublecheck = false) ; private: typedef std::vector::const_iterator ArgIt ; static const int NoCompression = 0 ; static const EncryptionAlgorithm Default_EncAlgo ; static const EncryptionMode Default_EncMode ; static const bool Default_Checksum = true ; static const int Default_Compression = 9 ; // slowest, but smallest static const bool Default_EmbedEmbFn = true ; static const bool Default_Force = false ; static const VERBOSITY Default_Verbosity = NORMAL ; static const unsigned long Default_Radius = 0 ; // there is no default radius for all file formats static const unsigned int Max_Algorithm = 3 ; static const float Default_Goal = 100.0 ; static const DEBUGCOMMAND Default_DebugCommand = NONE ; static const bool Default_Check = false ; static const unsigned int Default_DebugLevel = 0 ; static const unsigned int Default_GmlGraphRecDepth = 0 ; static const unsigned int Default_GmlStartVertex = 0 ; /** * parse the command * * Note: parse_Command is the only parse_* function that requires curarg to be a command. * (because the command is the only argument with a fixed position). **/ void parse_Command (ArgIt& curarg) ; /** * test if curarg points to an emb filename argument and if yes: parse it * \return true iff one or more arguments have been parsed **/ bool parse_EmbFn (ArgIt& curarg) ; bool parse_ExtFn (ArgIt& curarg) ; bool parse_CvrFn (ArgIt& curarg) ; bool parse_StgFn (ArgIt& curarg) ; bool parse_Passphrase (ArgIt& curarg) ; bool parse_Checksum (ArgIt& curarg) ; bool parse_Compression (ArgIt& curarg) ; bool parse_EmbedEmbFn (ArgIt& curarg) ; bool parse_Encryption (ArgIt& curarg) ; bool parse_Radius (ArgIt& curarg) ; bool parse_Goal (ArgIt& curarg) ; bool parse_Force (ArgIt& curarg) ; bool parse_Verbosity (ArgIt& curarg) ; bool parse_Debug (ArgIt& curarg) ; void setDefaults (void) ; std::vector TheArguments ; } ; // gcc does not support the export keyword #include "Arg.cc" #endif /* ndef SH_ARGUMENTS_H */ steghide-0.5.1/src/MHashPP.h0000644000076400001440000000460707735577226011225 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_MHASHPP_H #define SH_MHASHPP_H #include #include "common.h" class BitString ; class MHashPP { public: enum Command { endhash } ; MHashPP (void) ; MHashPP (hashid a) ; void init (hashid a) ; const std::vector& end (void) ; /** * feed the std::string v to the hashing algorithm * \param v the std::string to be feeded to the hashing algorithm (without '\0' at the end) **/ MHashPP& operator<< (std::string v) ; /** * feed the BitString v to the hashing algorithm * \param v the BitString to be feeded to the hashing algorithm (v.getLength() % 8 == 0 must hold) **/ MHashPP& operator<< (BitString v) ; /** * feed the byte v to the hashing algorithm * \param v the byte to be feeded to the hashing algorithm **/ MHashPP& operator<< (BYTE v) ; /** * interpret the command c * \param c a command (member of MHashPP::Command) **/ MHashPP& operator<< (Command c) ; /** * get the hash bits * \return the hash value of the data that has been passed via << **/ BitString getHashBits (void) ; const std::vector& getHashBytes (void) ; /** * get the hash size * \return the size of the value returned by getHashBits in bytes **/ unsigned int getHashSize (void) ; private: /// true iff HashD contains a legal hash descriptor and data can be passed via << bool hashing ; MHASH HashD ; /// true iff HashBytes contains a valid hash value bool HashBytesValid ; std::vector HashBytes ; std::string getAlgorithmName (void) ; static std::string getAlgorithmName (hashid id) ; } ; #endif // ndef SH_MHASHPP_H steghide-0.5.1/src/JpegSampleValue.h0000644000076400001440000000252607735577226013007 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_JPEGSAMPLE_H #define SH_JPEGSAMPLE_H #include "SampleValue.h" class JpegSampleValue : public SampleValue { public: JpegSampleValue (int c) ; SampleValue* getNearestTargetSampleValue (EmbValue t) const ; UWORD32 calcDistance (const SampleValue *s) const ; std::string getName (void) const ; SWORD16 getDctCoeff (void) const { return DctCoeff ; } ; static EmbValue calcEValue (SWORD16 dctc) { return (((dctc >= 0) ? dctc : -dctc) % 2) ; } ; private: SWORD16 DctCoeff ; } ; #endif // ndef SH_JPEGSAMPLE_H steghide-0.5.1/src/AuFile.h0000644000076400001440000000436707735577225011134 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_AUFILE_H #define SH_AUFILE_H #include #include "AudioData.h" #include "CvrStgFile.h" class BinaryIO ; /** * \class AuFile * \brief a CvrStgFile in Sun .au format **/ class AuFile : public CvrStgFile { public: AuFile (BinaryIO *io) ; ~AuFile (void) ; void read (BinaryIO *io) ; void write (void) ; std::list getProperties (void) const ; std::vector getMatchingAlgorithms (Graph* g, Matching* m) const ; unsigned long getNumSamples (void) const { return Data->getNumSamples() ; } ; void replaceSample (const SamplePos pos, const SampleValue* s) { return Data->replaceSample(pos, s) ; } ; SampleValue* getSampleValue (SamplePos pos) const { return Data->getSampleValue(pos) ; } ; private: enum ENCODING { MULAW8 = 1, PCM8 = 2, PCM16 = 3 } ; class AuHeader { public: char id[4] ; UWORD32 offset ; UWORD32 size ; ENCODING encoding ; UWORD32 samplerate ; UWORD32 channels ; static const UWORD32 SizeUnknown = 0xFFFFFFFF ; static const unsigned short HeaderSize = 24 ; unsigned short getBytesPerSample (void) const ; } ; static const UWORD32 Radius_MuLaw8 = 1 ; static const UWORD32 Radius_PCM8 = 1 ; static const UWORD32 Radius_PCM16 = 20 ; static const unsigned short SamplesPerVertex = 2 ; static const EmbValue EmbValueModulus = 2 ; AuHeader Header ; std::vector Infofield ; AudioData* Data ; } ; #endif /* ndef SH_AUFILE_H */ steghide-0.5.1/src/CvrStgFile.cc0000644000076400001440000001221307737767716012132 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include "DFSAPHeuristic.h" #include "AuFile.h" #include "AUtils.h" #include "BmpFile.h" #include "CvrStgFile.h" #include "JpegFile.h" #include "SampleValue.h" #include "SampleValueAdjacencyList.h" #include "Utils.h" #include "WavFile.h" #include "WKSConstructionHeuristic.h" #include "common.h" #include "error.h" #include "msg.h" CvrStgFile::CvrStgFile () : BinIO(NULL), SamplesPerVertex(0), Radius(0), EmbValueModulus(0) { Globs.TheCvrStgFile = this ; } CvrStgFile::~CvrStgFile (void) { if (BinIO != NULL) { delete BinIO ; } } void CvrStgFile::setRadius (UWORD32 r) { if (Args.Radius.is_set()) { Radius = Args.Radius.getValue() ; } else { Radius = r ; } } void CvrStgFile::read (BinaryIO *io) { setBinIO (io) ; } void CvrStgFile::write (void) { } void CvrStgFile::transform (const std::string& stgfn) { delete BinIO ; BinIO = NULL ; BinIO = new BinaryIO (stgfn, BinaryIO::WRITE) ; } std::vector CvrStgFile::calcSVAdjacencyLists (const std::vector& svs) const { EmbValue m = getEmbValueModulus() ; std::vector lists (m) ; for (EmbValue i = 0 ; i < m ; i++) { lists[i] = new SampleValueAdjacencyList (svs.size()) ; } for (SampleValueLabel i = 0 ; i < svs.size() ; i++) { // to be integrated into lists SampleValueAdjacencyList* sval = lists[svs[i]->getEmbeddedValue()] ; for (SampleValueLabel j = 0 ; j < svs.size() ; j++) { // line where integration should happen if ((svs[i]->isNeighbour(svs[j])) && (i != j)) { (*sval)[svs[j]].push_back (svs[i]) ; } } } for (EmbValue i = 0 ; i < m ; i++) { lists[i]->sort() ; } return lists ; } std::vector CvrStgFile::getMatchingAlgorithms (Graph* g, Matching* m) const { std::vector retval ; retval.push_back (new WKSConstructionHeuristic (g, m)) ; retval.push_back (new DFSAPHeuristic (g, m)) ; return retval ; } EmbValue CvrStgFile::getEmbeddedValue (const SamplePos pos) const { SampleValue* sv = getSampleValue(pos) ; EmbValue retval = sv->getEmbeddedValue() ; delete sv ; return retval ; } unsigned long CvrStgFile::getCapacity () const { float maxnvertices = getNumSamples() / getSamplesPerVertex() ; float maxnbits = maxnvertices * log2(getEmbValueModulus()) ; return ((unsigned long) (maxnbits / 8)) ; } std::string CvrStgFile::getHRCapacity () const { return Utils::formatHRSize (getCapacity()) ; } #ifdef DEBUG std::map* CvrStgFile::getFrequencies () { unsigned long n = getNumSamples() ; std::map* table = new std::map () ; for (unsigned long pos = 0 ; pos < n ; pos++) { SampleValue *sv = getSampleValue (pos) ; (*table)[sv->getKey()]++ ; delete sv ; } return table ; } void CvrStgFile::printFrequencies (const std::map& freqs) { for (std::map::const_iterator fit = freqs.begin() ; fit != freqs.end() ; fit++) { std::cout << fit->first << ": " << fit->second << std::endl ; } } #endif // def DEBUG CvrStgFile::FILEFORMAT CvrStgFile::guessff (BinaryIO *io) { char buf[4] = { '\0', '\0', '\0', '\0' } ; FILEFORMAT retval = UNKNOWN ; for (unsigned int i = 0 ; i < 2 ; i++) { buf[i] = (char) io->read8() ; } if (strncmp ("BM", buf, 2) == 0) { retval = BMP ; } else if ((unsigned char) buf[0] == 0xFF && (unsigned char) buf[1] == 0xD8) { retval = JPEG ; } else { for (unsigned int i = 2 ; i < 4 ; i++) { buf[i] = (char) io->read8() ; } if (strncmp (".snd", buf, 4) == 0) { retval = AU ; } else if (strncmp ("RIFF", buf, 4) == 0) { retval = WAV ; } } return retval ; } CvrStgFile* CvrStgFile::readFile (const std::string& fn) { BinaryIO *BinIO = new BinaryIO (fn, BinaryIO::READ) ; CvrStgFile *file = NULL ; switch (guessff (BinIO)) { case UNKNOWN: { throw UnSupFileFormat (BinIO) ; break ; } case BMP: { file = new BmpFile (BinIO) ; break ; } case WAV: { file = new WavFile (BinIO) ; break ; } case AU: { file = new AuFile (BinIO) ; break ; } case JPEG: { #ifdef USE_LIBJPEG file = new JpegFile (BinIO) ; #else throw SteghideError (_("can not read input file. steghide has been compiled without support for jpeg files.")) ; #endif break ; } default: { myassert(0) ; break ; } } return file ; } steghide-0.5.1/src/SMDConstructionHeuristic.h0000644000076400001440000000321507735577226014675 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_SMDCONSTRUCTIONHEURISTIC_H #define SH_SMDCONSTRUCTIONHEURISTIC_H #include "MatchingAlgorithm.h" #include "Vertex.h" #include "common.h" /** * \class SMDConstructionHeuristic * \brief an implementation of the "static minimum degree" heuristic for contructing a matching **/ class SMDConstructionHeuristic : public MatchingAlgorithm { public: SMDConstructionHeuristic (Graph* g, Matching* m, float goal = 100.0) ; virtual ~SMDConstructionHeuristic (void) {} ; const char* getName (void) const { return "Static Minimum Degree Construction Heuristic" ; } ; void run (void) ; private: class SmallerVertexDegree { public: bool operator() (const Vertex* v1, const Vertex* v2) { return (v1->getDegree() < v2->getDegree()) ; } ; } ; std::vector Vertices ; } ; #endif // ndef SH_SMDCONSTRUCTIONHEURISTIC_H steghide-0.5.1/src/BmpRGBSampleValue.cc0000644000076400001440000001120707735577226013325 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "BmpRGBSampleValue.h" BmpRGBSampleValue::BmpRGBSampleValue (BYTE r, BYTE g, BYTE b) : BmpSampleValue(), Color(r, g, b) { Key = calcKey (Color) ; EValue = calcEValue (Color) ; } BmpRGBSampleValue::BmpRGBSampleValue (RGBTriple t) : BmpSampleValue(), Color(t) { Key = calcKey (Color) ; EValue = calcEValue (Color) ; } UWORD32 BmpRGBSampleValue::calcDistance (const SampleValue *s) const { const BmpRGBSampleValue *sample = (const BmpRGBSampleValue*) s ; /* If s is not a BmpRGBSampleValue then we get into real trouble here. But calcDistance is called very often, a dynamic_cast costs a lot of time and it does not make sense to pass anything but a BmpRGBSampleValue as s anyway. */ int dr = (int) Color.Red - (int) sample->Color.Red ; int dg = (int) Color.Green - (int) sample->Color.Green ; int db = (int) Color.Blue - (int) sample->Color.Blue ; return (UWORD32) (dr*dr + dg*dg + db*db) ; } SampleValue *BmpRGBSampleValue::getNearestTargetSampleValue (EmbValue t) const { std::vector candidates ; BYTE cube[3][2] ; cube[RED][UP] = Color.Red ; cube[RED][DOWN] = Color.Red ; cube[GREEN][UP] = Color.Green ; cube[GREEN][DOWN] = Color.Green ; cube[BLUE][UP] = Color.Blue ; cube[BLUE][DOWN] = Color.Blue ; do { cube[RED][UP] = plus(cube[RED][UP], 1) ; cube[RED][DOWN] = minus(cube[RED][DOWN], 1) ; cube[GREEN][UP] = plus(cube[GREEN][UP], 1) ; cube[GREEN][DOWN] = minus(cube[GREEN][DOWN], 1) ; cube[BLUE][UP] = plus(cube[BLUE][UP], 1) ; cube[BLUE][DOWN] = minus(cube[BLUE][DOWN], 1) ; addNTSVCandidates (candidates, cube, RED, UP, GREEN, BLUE, t) ; addNTSVCandidates (candidates, cube, RED, DOWN, GREEN, BLUE, t) ; addNTSVCandidates (candidates, cube, GREEN, UP, RED, BLUE, t) ; addNTSVCandidates (candidates, cube, GREEN, DOWN, RED, BLUE, t) ; addNTSVCandidates (candidates, cube, BLUE, UP, RED, GREEN, t) ; addNTSVCandidates (candidates, cube, BLUE, DOWN, RED, GREEN, t) ; } while (candidates.empty()) ; // calculate minimal distance UWORD32 mindist = UWORD32_MAX ; for (std::vector::const_iterator cit = candidates.begin() ; cit != candidates.end() ; cit++) { UWORD32 curdist = Color.calcDistance(*cit) ; if (curdist < mindist) { mindist = curdist ; } } // choose only from those with the minimal distance std::vector finalcandidates ; for (std::vector::const_iterator cit = candidates.begin() ; cit != candidates.end() ; cit++) { if (Color.calcDistance(*cit) == mindist) { finalcandidates.push_back(*cit) ; } } unsigned int rnd = (unsigned int) RndSrc.getValue (finalcandidates.size()) ; return ((SampleValue*) new BmpRGBSampleValue (finalcandidates[rnd])) ; } void BmpRGBSampleValue::addNTSVCandidates (std::vector& cands, const BYTE cube[3][2], COLOR fc, DIRECTION fd, COLOR i1, COLOR i2, EmbValue t) const { for (BYTE value1 = cube[i1][DOWN] ; value1 < cube[i1][UP] ; value1++) { for (BYTE value2 = cube[i2][DOWN] ; value2 < cube[i2][UP] ; value2++) { // create an RGBTriple BYTE color[3] ; color[fc] = cube[fc][fd] ; color[i1] = value1 ; color[i2] = value2 ; RGBTriple rgb (color[RED], color[GREEN], color[BLUE]) ; if (calcEValue (rgb) == t) { // add rgb to candidates... bool found = false ; for (std::vector::const_iterator cit = cands.begin() ; cit != cands.end() ; cit++) { if (*cit == rgb) { found = true ; } } if (!found) { cands.push_back (rgb) ; } } } } } std::string BmpRGBSampleValue::getName () const { char buf[128] ; sprintf (buf, "r%ug%ub%u", getRed(), getGreen(), getBlue()) ; return std::string (buf) ; } BYTE BmpRGBSampleValue::minus (BYTE a, BYTE b) const { BYTE retval = 0 ; if (a > b) { retval = a - b ; } return retval ; } BYTE BmpRGBSampleValue::plus (BYTE a, BYTE b) const { unsigned int sum = a + b ; return ((sum <= 255) ? sum : 255) ; } steghide-0.5.1/src/error.h0000644000076400001440000000414507735577226011113 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_ERROR_H #define SH_ERROR_H #include #include #include "SteghideError.h" class BinaryIO ; class ArgError : public SteghideError { public: ArgError (const char *msgfmt, ...) ; void printMessage (void) const ; } ; class BinaryInputError : public SteghideError { public: enum TYPE { FILE_ERR, FILE_EOF, STDIN_ERR, STDIN_EOF } ; BinaryInputError (std::string fn, FILE* s) ; TYPE getType (void) ; protected: void setType (TYPE t) ; private: TYPE type ; } ; class BinaryOutputError : public SteghideError { public: enum TYPE { FILE_ERR, STDOUT_ERR } ; BinaryOutputError (std::string fn) ; TYPE getType (void) ; protected: void setType (TYPE t) ; private: TYPE type ; } ; class UnSupFileFormat : public SteghideError { public: UnSupFileFormat (BinaryIO *io) ; } ; class NotImplementedError : public SteghideError { public: NotImplementedError (const char* msgfmt, ...) ; void printMessage (void) const ; } ; /** * \class CorruptDataError * \brief is thrown as exception when corrupt data is encountered during extraction * * A possible cause of this exception being thrown is a wrong password. **/ class CorruptDataError : public SteghideError { public: CorruptDataError (const char* msgfmt, ...) ; void printMessage (void) const ; } ; #endif steghide-0.5.1/src/DMDConstructionHeuristic.cc0000644000076400001440000000415207735577226015015 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "DMDConstructionHeuristic.h" #include "Edge.h" #include "Graph.h" #include "Matching.h" #include "Vertex.h" DMDConstructionHeuristic::DMDConstructionHeuristic (Graph* g, Matching* m, float goal) : MatchingAlgorithm (g, m, goal) { AvailableVertices = std::vector (g->getNumVertices()) ; for (VertexLabel l = 0 ; l < g->getNumVertices() ; l++) { AvailableVertices[l] = g->getVertex(l) ; } } void DMDConstructionHeuristic::run (void) { VertexLabel mdi = MinDegNotFound ; while ((mdi = findMinDegIndex (AvailableVertices)) != MinDegNotFound) { Vertex* v1 = AvailableVertices[mdi] ; v1->updateShortestEdge() ; Edge* e = v1->getShortestEdge() ; Vertex* v2 = e->getOtherVertex(v1) ; TheMatching->addEdge(*e) ; v1->markDeleted() ; v2->markDeleted() ; AvailableVertices[v1->getLabel()] = NULL ; AvailableVertices[v2->getLabel()] = NULL ; } TheGraph->unmarkDeletedAllVertices() ; } VertexLabel DMDConstructionHeuristic::findMinDegIndex (const std::vector& vertices) { VertexLabel mdi = MinDegNotFound ; UWORD32 mindeg = UWORD32_MAX ; for (VertexLabel l = 0 ; l < vertices.size() ; l++) { if (vertices[l] != NULL) { UWORD32 curdeg = vertices[l]->getDegree() ; if (0 < curdeg && curdeg < mindeg) { mdi = l ; mindeg = curdeg ; } } } return mdi ; } steghide-0.5.1/src/EdgeIterator.cc0000644000076400001440000001360007735577226012472 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "Edge.h" #include "EdgeIterator.h" #include "Graph.h" #include "SampleOccurence.h" #include "Vertex.h" #include "common.h" EdgeIterator::EdgeIterator () : SVALIndices(NULL) { SVALIndices = new unsigned long[Globs.TheCvrStgFile->getSamplesPerVertex()] ; } EdgeIterator::EdgeIterator (Vertex *v, ITERATIONMODE m) { SVALIndices = new unsigned long[Globs.TheCvrStgFile->getSamplesPerVertex()] ; reset(v, m) ; } EdgeIterator::EdgeIterator (const EdgeIterator& eit) { CurrentEdge = eit.CurrentEdge ; Mode = eit.Mode ; SVALIndices = new unsigned long[Globs.TheCvrStgFile->getSamplesPerVertex()] ; for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { SVALIndices[i] = eit.SVALIndices[i] ; } Finished = eit.Finished ; SampleOccurenceIt = eit.SampleOccurenceIt ; } EdgeIterator::~EdgeIterator () { delete[] SVALIndices ; } void EdgeIterator::operator++ () { myassert (!Finished) ; Vertex* srcv = CurrentEdge.getVertex1() ; unsigned short srcidx = CurrentEdge.getIndex1() ; switch (Mode) { case SAMPLEOCCURENCE: { SampleValue* srcsv = srcv->getSampleValue(srcidx) ; SampleValue* destsv = (*(Globs.TheGraph->SVALists[srcv->getTargetValue(srcidx)]))[srcsv][SVALIndices[srcidx]] ; bool cont = false ; do { SampleOccurenceIt++ ; cont = false ; if (SampleOccurenceIt != Globs.TheGraph->SampleOccurences[destsv->getLabel()].end()) { if ((srcsv->getEmbeddedValue() != SampleOccurenceIt->getVertex()->getTargetValue(SampleOccurenceIt->getIndex())) || (SampleOccurenceIt->getVertex()->getLabel() == srcv->getLabel())) { cont = true ; } } } while (cont) ; if (SampleOccurenceIt == Globs.TheGraph->SampleOccurences[destsv->getLabel()].end()) { // search new destination sample value SVALIndices[srcidx]++ ; findNextEdge() ; } break ; } case SAMPLEVALUE: { SVALIndices[srcidx]++ ; findNextEdge() ; break ; } } // increment EdgeIndex while checking that it has not become too high if (++EdgeIndex >= MaxNumEdges) { Finished = true ; } if (!Finished) { CurrentEdge.set2 (SampleOccurenceIt->getVertex(), SampleOccurenceIt->getIndex()) ; } } void EdgeIterator::reset (ITERATIONMODE m) { Mode = m ; Finished = false ; for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { SVALIndices[i] = 0 ; } findNextEdge() ; EdgeIndex = 0 ; if (!Finished) { CurrentEdge.set2 (SampleOccurenceIt->getVertex(), SampleOccurenceIt->getIndex()) ; } } void EdgeIterator::reset (Vertex* v, ITERATIONMODE m) { CurrentEdge.setVertex1 (v) ; reset(m) ; } void EdgeIterator::findNextEdge () { UWORD32 mindist = UWORD32_MAX ; for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { Vertex* srcv = CurrentEdge.getVertex1() ; SampleValue* srcsv = srcv->getSampleValue(i) ; SampleValue* destsv = NULL ; std::list::const_iterator soccit_candidate ; // increment SVALIndices[i] until it points to a valid destination sample value while (SVALIndices[i] < (*(Globs.TheGraph->SVALists[srcv->getTargetValue(i)]))[srcsv].size()) { destsv = (*(Globs.TheGraph->SVALists[srcv->getTargetValue(i)]))[srcsv][SVALIndices[i]] ; // look for a sample occurence of destsv - thereby setting soccit_candidate bool found = false ; const std::list& socc = Globs.TheGraph->SampleOccurences[destsv->getLabel()] ; soccit_candidate = socc.begin() ; while (!found && soccit_candidate != socc.end()) { if ((soccit_candidate->getVertex()->getLabel() == srcv->getLabel()) || (srcsv->getEmbeddedValue() != soccit_candidate->getVertex()->getTargetValue(soccit_candidate->getIndex()))) { soccit_candidate++ ; } else { found = true ; } } if (found) { break ; } else { SVALIndices[i]++ ; } } // test if the destination sample value leads to edge with (until now) minimal distance - thereby setting CurrentEdge.Index1 and SampleOccurenceIt if (SVALIndices[i] < (*(Globs.TheGraph->SVALists[srcv->getTargetValue(i)]))[srcsv].size()) { UWORD32 thisdist = srcsv->calcDistance(destsv) ; if (thisdist < mindist) { mindist = thisdist ; CurrentEdge.setIndex1(i) ; SampleOccurenceIt = soccit_candidate ; } } } if (mindist == UWORD32_MAX) { // no edge has been found Finished = true ; } } #ifdef DEBUG void EdgeIterator::print (unsigned short spc) const { char* space = new char[spc + 1] ; for (unsigned short i = 0 ; i < spc ; i++) { space[i] = ' ' ; } space[spc] = '\0' ; std::cerr << space << "Current Edge:" << std::endl ; CurrentEdge.print(spc + 1) ; std::cerr << space << "SampleOccurenceIt: <" << SampleOccurenceIt->getVertex()->getLabel() << "," << SampleOccurenceIt->getIndex() << ">" << std::endl ; std::cerr << space << "Finished: " << Finished << std::endl ; std::cerr << space << "EdgeIndex: " << EdgeIndex << std::endl ; for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { std::cerr << space << "SVALIndices[" << i << "]: " << SVALIndices[i] << std::endl ; } } #endif UWORD32 EdgeIterator::MaxNumEdges = UWORD32_MAX ; steghide-0.5.1/src/Globals.h0000644000076400001440000000500007735577226011334 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_GLOBALS_H #define SH_GLOBALS_H #include class CvrStgFile ; class Graph ; /** * \class Globals * \brief some useful pointers that should be global * * This class provides some useful global variables. They are not static, * instead there exists a global Globs object to make it easy to use * different Globals objects during one execution (this is necessary for * some unit-tests). * * The Graph constructor as well as the CvrStgFile constructor write itself * into the Globs object. Doing this so early is necessary because the * construction of a Graph or CvrStgFile object might already need a correctly * set Globs object. * * During one "normal" (i.e. non-unit-test) execution of steghide only one * Globals object will be used, namely the one created in main(), filled in * the Graph and the CvrStgFile constructor and stored at the Globs pointer. * * The main purpose of making these variables global is to save memory in * classes that are small but used in large numbers (e.g. *SampleValue,...). * Using static pointers in these classed would be too chaotic to reset for * the unit tests and non-static pointers would need too much memory. **/ class Globals { public: Globals (CvrStgFile* f = NULL, Graph* g = NULL) : TheCvrStgFile(f), TheGraph(g) {} ; /// the cover-/stego- file that is operated on (set in CvrStgFile::CvrStgFile) CvrStgFile* TheCvrStgFile ; /// the graph that is built upon the cover-/stego-file (set in Graph::Graph) Graph* TheGraph ; void operator= (const Globals& g) { TheCvrStgFile = g.TheCvrStgFile ; TheGraph = g.TheGraph ; } void reset (void) { TheCvrStgFile = NULL ; TheGraph = NULL ; } } ; #endif // ndef SH_GLOBALS_H steghide-0.5.1/src/Terminal.h0000644000076400001440000000243307735577226011533 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_TERMINAL_H #define SH_TERMINAL_H #include "common.h" #if HAVE_TERMIOS_H #include #endif /** * \class Terminal * \brief provides some terminal access **/ class Terminal { public: Terminal (void) ; void EchoOff (void) ; void SingleKeyOn (void) ; void reset (void) ; private: #if HAVE_TERMIOS_H /// contains the attributes of the terminal when this object was constructed struct termios InitAttr ; #endif } ; #endif // ndef SH_TERMINAL_H steghide-0.5.1/src/ColorPalette.h0000644000076400001440000000312107735577226012350 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_COLORPALETTE_H #define SH_COLORPALETTE_H #include #include "RGBTriple.h" #include "common.h" /** * \class ColorPalette * \brief a color palette * * This class is essentially a vector with * some wrappers for exisiting methods. **/ class ColorPalette : public std::vector { public: /** * get the size, i.e. the number of entries of this color palette **/ unsigned int getSize (void) const { return size() ; } ; /** * add (a copy of) rgb to the end of this color palette **/ void addEntry (RGBTriple rgb) { push_back (rgb) ; } ; /** * add the color r/g/b to the end of this color palette **/ void addEntry (BYTE r, BYTE g, BYTE b) { push_back (RGBTriple (r, g, b)) ; } ; } ; #endif // ndef SH_COLORPALETTE_H steghide-0.5.1/src/RGBTriple.h0000644000076400001440000000316507735577226011555 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_RGBTRIPLE_H #define SH_RGBTRIPLE_H #include "common.h" class RGBTriple { public: RGBTriple (void) : Red(0), Green(0), Blue(0) {} ; RGBTriple (BYTE r, BYTE g, BYTE b) : Red(r), Green(g), Blue(b) {} ; /** * get the squared distance in the RGB cube between this triple and the triple t * \param t another RGB triple * \return the square of the euclidean distance between this and t **/ UWORD32 calcDistance (const RGBTriple& t) const ; /** * returns true iff this triple and t are equal (i.e. have the same rgb values) **/ bool operator== (const RGBTriple& t) const ; /** * return true iff this triple and t are not equal (i.e. have different rgb values) **/ bool operator!= (const RGBTriple& t) const ; BYTE Red ; BYTE Green ; BYTE Blue ; } ; #endif // ndef SH_RGBTRIPLE_H steghide-0.5.1/src/EmbData.cc0000644000076400001440000002226407736274437011416 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "AUtils.h" #include "BinaryIO.h" #include "BitString.h" #include "EmbData.h" #include "error.h" #include "MCryptPP.h" #include "MHashPP.h" #include "common.h" EmbData::EmbData (MODE m, std::string pp, std::string fn) : Mode(m), Passphrase(pp), FileName(fn) { if (m == EXTRACT) { NumBitsNeeded = NumBitsRequested = NBitsMagic ; Version = CodeVersion ; State = READ_MAGIC ; Reservoir = BitString() ; } } bool EmbData::finished () { myassert (Mode == EXTRACT) ; return (State == END) ; } unsigned long EmbData::getNumBitsRequested () { myassert (Mode == EXTRACT) ; return NumBitsRequested ; } void EmbData::addBits (BitString addbits) { myassert (Mode == EXTRACT) ; #ifdef DEBUG printDebug (1, "\nEmbData::addBits called with") ; printDebug (1, " addbits:") ; addbits.printDebug (1, 2) ; printDebug (1, " Reservoir:") ; Reservoir.printDebug (1, 2) ; #endif Reservoir.append (addbits) ; BitString bits ; if (Reservoir.getLength() >= NumBitsNeeded) { bits = Reservoir.cutBits (0, NumBitsNeeded) ; // take exactly the first NumBitsNeeded bits from Reservoir | addbits } else { // Reservoir.getLength() < NumBitsNeeded myassert(false) ; } #ifdef DEBUG printDebug (1, "bits is now:") ; bits.printDebug (1, 2) ; #endif switch (State) { case READ_MAGIC: { #ifdef DEBUG printDebug (1, "in the READ_MAGIC state") ; #endif if (bits.getValue(0, NBitsMagic) == Magic) { NumBitsNeeded = 1 ; NumBitsRequested = AUtils::bminus (NumBitsNeeded, Reservoir.getLength()) ; State = READ_VERSION ; } else { throw SteghideError (_("could not extract any data with that passphrase!")) ; } break ; } case READ_VERSION: { #ifdef DEBUG printDebug (1, "in the READ_VERSION state") ; #endif if (bits[0] == true) { Version++ ; NumBitsNeeded = AUtils::bminus ((UWORD32) 1, Reservoir.getLength()) ; } else { if (Version > CodeVersion) { throw CorruptDataError (_("attempting to read an embedding of version %d but steghide %s only supports embeddings of version %d."), Version, VERSION, CodeVersion) ; } NumBitsNeeded = EncryptionAlgorithm::IRep_size + EncryptionMode::IRep_size ; NumBitsRequested = AUtils::bminus (NumBitsNeeded, Reservoir.getLength()) ; State = READ_ENCINFO ; } break ; } case READ_ENCINFO: { #ifdef DEBUG printDebug (1, "in the READ_ENCINFO state") ; #endif unsigned int algo = (unsigned int) bits.getValue (0, EncryptionAlgorithm::IRep_size) ; if (EncryptionAlgorithm::isValidIntegerRep (algo)) { EncAlgo.setValue ((EncryptionAlgorithm::IRep) algo) ; } unsigned int mode = (unsigned int) bits.getValue (EncryptionAlgorithm::IRep_size, EncryptionMode::IRep_size) ; if (EncryptionMode::isValidIntegerRep (mode)) { EncMode.setValue ((EncryptionMode::IRep) mode) ; } NumBitsNeeded = NBitsNPlainBits ; NumBitsRequested = AUtils::bminus (NumBitsNeeded, Reservoir.getLength()) ; State = READ_NPLAINBITS ; #ifndef USE_LIBMCRYPT if (EncAlgo.getIntegerRep() != EncryptionAlgorithm::NONE) { throw SteghideError (_( "The embedded data is encrypted but steghide has been compiled without encryption\n" "support. To be able to read the embedded data, you have to install libmcrypt\n" "(http://mcrypt.sourceforge.net/) and recompile steghide.")) ; } #endif break ; } case READ_NPLAINBITS: { #ifdef DEBUG printDebug (1, "in the READ_NPLAINBITS state") ; #endif NPlainBits = bits.getValue (0, NBitsNPlainBits) ; #ifdef USE_LIBMCRYPT NumBitsNeeded = (UWORD32) MCryptPP::getEncryptedSize (EncAlgo, EncMode, NPlainBits) ; #else NumBitsNeeded = NPlainBits ; #endif NumBitsRequested = AUtils::bminus (NumBitsNeeded, Reservoir.getLength()) ; State = READ_ENCRYPTED ; break ; } case READ_ENCRYPTED: { #ifdef DEBUG printDebug (1, "in the READ_ENCRYPTED state") ; #endif BitString plain ; #ifdef USE_LIBMCRYPT if (EncAlgo.getIntegerRep() == EncryptionAlgorithm::NONE) { plain = bits ; } else { MCryptPP crypto (EncAlgo, EncMode) ; plain = crypto.decrypt (bits, Passphrase) ; } #else plain = bits ; #endif plain.truncate (0, NPlainBits) ; // cut off random padding used to achieve full number of encryption blocks unsigned long pos = 0 ; // read Compression (and uncompress) Compression = ((plain[pos++]) ? 9 : 0) ; // to make compression contain a value that makes sense #ifdef DEBUG printDebug (2, " compression: %d\n", plain[pos - 1]) ; #endif if (Compression > 0) { UWORD32 NUncompressedBits = plain.getValue (pos, NBitsNUncompressedBits) ; #ifdef DEBUG printDebug (2, " nuncobits: %lu\n", NUncompressedBits) ; #endif pos += NBitsNUncompressedBits ; plain.truncate (pos, plain.getLength()) ; pos = 0 ; plain.uncompress (NUncompressedBits) ; } // read Checksum Checksum = plain[pos++] ; #ifdef DEBUG printDebug (2, " checksum: %d\n", plain[pos - 1]) ; #endif if (Checksum) { CRC32 = plain.getValue (pos, NBitsCrc32) ; #ifdef DEBUG printDebug (2, " crc32: 0x%x\n", CRC32) ; #endif pos += NBitsCrc32 ; } // read filename char curchar = '\0' ; FileName = "" ; do { curchar = (char) plain.getValue (pos, 8) ; if (curchar != '\0') { FileName += curchar ; } pos += 8 ; } while (curchar != '\0') ; // extract data if ((plain.getLength() - pos) % 8 != 0) { throw CorruptDataError (_("the embedded data has an invalid length.")) ; } const unsigned long extdatalen = (plain.getLength() - pos) / 8 ; Data.resize (extdatalen) ; for (unsigned int i = 0 ; i < extdatalen ; i++) { Data[i] = ((BYTE) plain.getValue (pos, 8)) ; pos += 8 ; } NumBitsNeeded = 0 ; NumBitsRequested = 0 ; State = END ; break ; } case END: default: { myassert (0) ; break ; } } } bool EmbData::checksumOK (void) const { // test if checksum is ok bool ok = true ; if (Checksum) { MHashPP hash (MHASH_CRC32) ; for (std::vector::const_iterator i = Data.begin() ; i != Data.end() ; i++) { hash << *i ; } hash << MHashPP::endhash ; unsigned long calccrc32 = hash.getHashBits().getValue(0, NBitsCrc32) ; if (calccrc32 == CRC32) { ok = true ; } else { ok = false ; } } return ok ; } void EmbData::setEncAlgo (EncryptionAlgorithm a) { EncAlgo = a ; } EncryptionAlgorithm EmbData::getEncAlgo () const { return EncAlgo ; } void EmbData::setEncMode (EncryptionMode m) { EncMode = m ; } EncryptionMode EmbData::getEncMode () const { return EncMode ; } void EmbData::setCompression (int c) { Compression = c ; } int EmbData::getCompression (void) const { return Compression ; } void EmbData::setChecksum (bool c) { Checksum = c ; } bool EmbData::getChecksum (void) const { return Checksum ; } BitString EmbData::getBitString () { myassert (Mode == EMBED) ; // assembling data that can be compressed BitString compr ; compr.append (Checksum) ; if (Checksum) { MHashPP hash (MHASH_CRC32) ; for (std::vector::iterator i = Data.begin() ; i != Data.end() ; i++) { hash << *i ; } hash << MHashPP::endhash ; compr.append (hash.getHashBits()) ; } compr.append (stripDir (FileName)) ; compr.append ((BYTE) 0, 8) ; // end of fileame compr.append (Data) ; // assembling data that can be encrypted BitString plain ; plain.append ((Compression > 0) ? true : false) ; if (Compression > 0) { plain.append (compr.getLength(), NBitsNUncompressedBits) ; compr.compress (Compression) ; } plain.append (compr) ; // put it all together BitString main ; main.append(Magic, NBitsMagic) ; for (unsigned short i = 0 ; i < CodeVersion ; i++) { main.append(true) ; } main.append(false) ; // end of version main.append((UWORD16) EncAlgo.getIntegerRep(), EncryptionAlgorithm::IRep_size) ; main.append((UWORD16) EncMode.getIntegerRep(), EncryptionMode::IRep_size) ; main.append(plain.getLength(), NBitsNPlainBits) ; #ifdef USE_LIBMCRYPT if (EncAlgo.getIntegerRep() != EncryptionAlgorithm::NONE) { MCryptPP crypto (EncAlgo, EncMode) ; plain = crypto.encrypt (plain, Passphrase) ; } #else myassert (EncAlgo.getIntegerRep() == EncryptionAlgorithm::NONE) ; #endif main.append (plain) ; return main ; } std::string EmbData::stripDir (std::string s) { unsigned int start = 0 ; if ((start = s.find_last_of ("/\\")) == std::string::npos) { start = 0 ; } else { start += 1 ; } return s.substr (start, std::string::npos) ; } steghide-0.5.1/src/WavChunkHeader.h0000644000076400001440000000250107735577226012613 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_WAVCHUNKHEADER_H #define SH_WAVCHUNKHEADER_H #include "common.h" class BinaryIO ; class WavChunkHeader { public: WavChunkHeader (void) {} ; WavChunkHeader (char *id, UWORD32 len) ; WavChunkHeader (BinaryIO *io) ; void read (BinaryIO *io) ; void write (BinaryIO *io) const ; UWORD32 getChunkLength (void) const { return ChunkLength ; } ; const char *getChunkId (void) const { return ChunkId ; } ; private: char ChunkId[4] ; UWORD32 ChunkLength ; } ; #endif // ndef SH_WAVCHUNKHEADER_H steghide-0.5.1/src/common.h0000644000076400001440000000556207735577226011256 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_COMMON_H #define SH_COMMON_H // // this file contains some definitions that are/can be used throughout the whole program // // // include config.h #ifdef HAVE_CONFIG_H #include "config.h" #endif // // generic type definitions #ifdef HAVE_CONFIG_H typedef TYPE_UWORD32 UWORD32 ; typedef TYPE_UWORD16 UWORD16 ; typedef TYPE_BYTE BYTE ; typedef TYPE_SWORD32 SWORD32 ; typedef TYPE_SWORD16 SWORD16 ; typedef TYPE_SBYTE SBYTE ; #else // use types that are at least the correct size typedef unsigned long UWORD32 ; typedef unsigned short UWORD16 ; typedef unsigned char BYTE ; typedef long SWORD32 ; typedef short SWORD16 ; typedef char SBYTE ; #endif #define UWORD32_MAX 0xFFFFFFFFUL #define UWORD16_MAX 0xFFFF #define BYTE_MAX 0xFF #define SWORD32_MIN -2147483647 - 1 // to avoid a gcc warning (caused by an overflow) #define SWORD32_MAX 2147483647 #define SWORD16_MIN -32768 #define SWORD16_MAX 32767 #define SBYTE_MIN -128 #define SBYTE_MAX 127 // // specialised type definitions typedef bool BIT ; typedef BYTE EmbValue ; typedef UWORD32 SamplePos ; typedef UWORD32 VertexLabel ; typedef UWORD32 SampleValueLabel ; typedef UWORD32 SampleKey ; #define SAMPLEKEY_MAX UWORD32_MAX #define VERTEXLABEL_MAX UWORD32_MAX // // gettext support #include "gettext.h" #define _(S) gettext (S) // // global variables #include "Globals.h" extern Globals Globs ; // // every class should (be able to) do assertions // (myassert(expr) is more verbose than the standard C assert) #include "AssertionFailed.h" #define myassert(expr) if (!(expr)) throw AssertionFailed (__FILE__, __LINE__) // // every class can have debugging output #include // for verbose testing output #if DEBUG #define RUNDEBUGLEVEL(LEVEL) ((LEVEL) <= Args.DebugLevel.getValue()) extern void printDebug (unsigned short level, const char *msgfmt, ...) ; #endif // // every class has access to the command line arguments #include "Arguments.h" extern Arguments Args ; // // every class has access to random data #include "RandomSource.h" extern RandomSource RndSrc ; #endif // ndef SH_COMMON_H steghide-0.5.1/src/WavFormatChunk.cc0000644000076400001440000000500507735577226013013 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "error.h" #include "BinaryIO.h" #include "WavChunkHeader.h" #include "WavFormatChunk.h" void WavFormatChunk::read (BinaryIO *io) { FormatTag = io->read16_le() ; if (FormatTag != FormatPCM) { if (io->is_std()) { throw NotImplementedError (_("the wav file from standard input has a format that is not supported (FormatTag: 0x%X)."), FormatTag) ; } else { throw NotImplementedError (_("the wav file \"%s\" has a format that is not supported (FormatTag: 0x%X)."), io->getName().c_str(), FormatTag) ; } } Channels = io->read16_le() ; SamplesPerSec = io->read32_le() ; AvgBytesPerSec = io->read32_le() ; BlockAlign = io->read16_le() ; BitsPerSample = io->read16_le() ; if (ChunkHeader->getChunkLength() == 16) { AdditionalSize = 0 ; } else { AdditionalSize = io->read16_le() ; if (AdditionalSize != 0) { if (io->is_std()) { throw SteghideError (_("the wav file from standard input does not have pcm format (header too long).")) ; } else { throw SteghideError (_("the wav file \"%s\" does not have pcm format (header too long)."), io->getName().c_str()) ; } } if (ChunkHeader->getChunkLength() != 18) { if (io->is_std()) { throw SteghideError (_("the wav file from standard input is corrupted.")) ; } else { throw SteghideError (_("the wav file \"%s\" is corrupted."), io->getName().c_str()) ; } } } } void WavFormatChunk::write (BinaryIO *io) { ChunkHeader->write (io) ; io->write16_le (FormatTag) ; io->write16_le (Channels) ; io->write32_le (SamplesPerSec) ; io->write32_le (AvgBytesPerSec) ; io->write16_le (BlockAlign) ; io->write16_le (BitsPerSample) ; if (ChunkHeader->getChunkLength() == 18) { io->write16_le (AdditionalSize) ; } } steghide-0.5.1/src/DFSAPHeuristic.cc0000644000076400001440000001657407735577226012646 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "DFSAPHeuristic.h" #include "Edge.h" #include "EdgeIterator.h" #include "Graph.h" #include "Matching.h" #include "common.h" DFSAPHeuristic::DFSAPHeuristic (Graph* g, Matching* m, float goal, UWORD32 mne, EdgeIterator::ITERATIONMODE mo) : MatchingAlgorithm (g, m, goal) { unsigned long numvertices = g->getNumVertices() ; TimeCounter = 0 ; TimeCounters = new UWORD32[numvertices] ; VertexOnPath = new bool[numvertices] ; EdgeIterators = new EdgeIterator[numvertices] ; for (VertexLabel l = 0 ; l < numvertices ; l++) { TimeCounters[l] = 0 ; VertexOnPath[l] = false ; EdgeIterators[l].reset (g->getVertex(l), mo) ; } EdgeIterator::setMaxNumEdges (mne) ; #ifdef DEBUG NSuccessful = 0 ; NUnsuccessful = 0 ; NEdgesSuccessful = 0 ; NEdgesUnsuccessful = 0 ; SuccessString = "" ; #endif } DFSAPHeuristic::~DFSAPHeuristic () { delete[] EdgeIterators ; delete[] TimeCounters ; delete[] VertexOnPath ; } void DFSAPHeuristic::reset (UWORD32 mne, EdgeIterator::ITERATIONMODE mo) { EdgeIterator::setMaxNumEdges (mne) ; unsigned long numvertices = TheGraph->getNumVertices() ; TimeCounter = 0 ; for (VertexLabel l = 0 ; l < numvertices ; l++) { VertexOnPath[l] = false ; TimeCounters[l] = 0 ; EdgeIterators[l].reset(mo) ; } } void DFSAPHeuristic::run () { const Edge** path = new const Edge*[TheGraph->getNumVertices()] ; const std::list ExposedVertices = TheMatching->getExposedVertices() ; for (std::list::const_iterator expv = ExposedVertices.begin() ; (expv != ExposedVertices.end()) && (TheMatching->getCardinality() < CardinalityGoal) ; expv++) { if (TheMatching->isExposed (*expv)) { unsigned long pathlength = searchAugmentingPath (*expv, path) ; #ifdef DEBUG if (pathlength == 0) { printDebug (5, "DFSAPHeuristic: could not find augmenting path for vertex %lu", (*expv)->getLabel()) ; } else { if (RUNDEBUGLEVEL(5)) { std::cerr << "DFSAPHeuristic: found augmenting path for vertex " << (*expv)->getLabel() << ": " ; for (unsigned long i = 0 ; i < pathlength ; i++) { std::cerr << path[i]->getVertex1()->getLabel() << "-" << path[i]->getVertex2()->getLabel() ; if (i != pathlength - 1) { std::cerr << ", " ; } } std::cerr << std::endl ; } } #endif if (pathlength > 0) { TheMatching->augment ((const Edge**) path, pathlength) ; } } } delete[] path ; } #ifdef DEBUG #define pushOnPath(EDGE) \ printDebug (6, "DFSAPHeuristic: pushing edge on path: %lu - %lu", EDGE->getVertex1()->getLabel(), EDGE->getVertex2()->getLabel()) ; \ path[pathlen] = EDGE ; \ pathlen++ ; \ VertexOnPath[EDGE->getVertex1()->getLabel()] = true ; \ VertexOnPath[EDGE->getVertex2()->getLabel()] = true ; \ NEdgesPushed++ ; #else #define pushOnPath(EDGE) \ path[pathlen] = EDGE ; \ pathlen++ ; \ VertexOnPath[EDGE->getVertex1()->getLabel()] = true ; \ VertexOnPath[EDGE->getVertex2()->getLabel()] = true ; #endif unsigned long DFSAPHeuristic::searchAugmentingPath (Vertex *v0, const Edge** path) { #ifdef DEBUG printDebug (5, "DFSAPHeuristic: searching augmenting path for vertex with label %lu", v0->getLabel()) ; unsigned long long NEdgesPushed = 0 ; #endif TimeCounter++ ; unsigned long pathlen = 0 ; const Edge* e = NULL ; while ((e = getNextEdge(v0)) != NULL) { pushOnPath(e) ; Vertex *w = e->getOtherVertex (v0) ; if (TheMatching->isExposed(w)) { #ifdef DEBUG SuccessString += "+" ; NSuccessful++ ; NEdgesSuccessful += NEdgesPushed ; #endif return pathlen ; } // add matched edge markVisited (w) ; e = TheMatching->getMatchingEdge (w) ; // w is matched (because not exposed) Vertex *w_next = e->getOtherVertex (w) ; pushOnPath(e) ; while (pathlen > 0) { const Edge* e_next = getNextEdge (w_next) ; if (e_next != NULL) { // found next edge pushOnPath(e_next) ; w = e_next->getOtherVertex (w_next) ; if (TheMatching->isExposed(w)) { #ifdef DEBUG SuccessString += "+" ; NSuccessful++ ; NEdgesSuccessful += NEdgesPushed ; #endif return pathlen ; } // add matched edge markVisited (w) ; e = TheMatching->getMatchingEdge (w) ; // w is matched (because not exposed) w_next = e->getOtherVertex (w) ; pushOnPath(e) ; } else { // could not find next edge #ifdef DEBUG printDebug (6, "DFSAPHeuristic: could not find next edge from vertex with label %lu", w_next->getLabel()) ; printDebug (6, "DFSAPHeuristic: popping edge %lu - %lu from path", path[pathlen - 1]->getVertex1()->getLabel(), path[pathlen - 1]->getVertex2()->getLabel()) ; printDebug (6, "DFSAPHeuristic: popping edge %lu - %lu from path", path[pathlen - 2]->getVertex1()->getLabel(), path[pathlen - 2]->getVertex2()->getLabel()) ; #endif VertexOnPath[e->getVertex1()->getLabel()] = false ; VertexOnPath[e->getVertex2()->getLabel()] = false ; // matched edge: pop from path myassert (path[pathlen - 1] == e) ; pathlen-- ; // unmatched edge: pop from path and delete (has been created only for path) myassert (!TheMatching->includesEdge(path[pathlen - 1])) ; pathlen-- ; // set w,e,w_next to complete backtracking step if (pathlen > 0) { e = path[pathlen - 1] ; const Edge* before_e = path[pathlen - 2] ; if (before_e->contains (e->getVertex1())) { w = e->getVertex1() ; w_next = e->getVertex2() ; } else if (before_e->contains (e->getVertex2())) { w = e->getVertex2() ; w_next = e->getVertex1() ; } else { myassert(false) ; } } } } } #ifdef DEBUG SuccessString += "-" ; NUnsuccessful++ ; NEdgesUnsuccessful += NEdgesPushed ; #endif return pathlen ; } const Edge* DFSAPHeuristic::getNextEdge (Vertex *v) { if (isVisited(v)) { if (EdgeIterators[v->getLabel()].isFinished()) { return NULL ; } ++(EdgeIterators[v->getLabel()]) ; } else { EdgeIterators[v->getLabel()].reset() ; markVisited(v) ; } const Edge* e = NULL ; bool found = false ; do { if (EdgeIterators[v->getLabel()].isFinished()) { // no more unexamined edges for this vertex #ifdef DEBUG printDebug (7, "DFSAPHeuristic::getNextEdge: no more unexamined edges for vertex %lu", v->getLabel()) ; #endif found = true ; } else { VertexLabel pvlbl = EdgeIterators[v->getLabel()].getPartnerVertexLabel() ; if (!(VertexOnPath[pvlbl] && isVisited(pvlbl))) { // edge is admissible e = *EdgeIterators[v->getLabel()] ; found = true ; #ifdef DEBUG printDebug (7, "DFSAPHeuristic::getNextEdge: admissible edge for vertex %lu goes to vertex %lu", v->getLabel(), pvlbl) ; #endif } else { ++(EdgeIterators[v->getLabel()]) ; } } } while (!found) ; return e ; } steghide-0.5.1/src/BmpSampleValue.h0000644000076400001440000000272407735577226012640 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BMPSAMPLE_H #define SH_BMPSAMPLE_H #include "SampleValue.h" #include "common.h" /** * \class BmpSampleValue * \brief an (abstract) sample value in a bmp file **/ class BmpSampleValue : public SampleValue { public: BmpSampleValue (void) : SampleValue() {} ; virtual UWORD32 calcDistance (const SampleValue *s) const ; /** * get the red color component **/ virtual unsigned char getRed (void) const = 0 ; /** * get the green color component **/ virtual unsigned char getGreen (void) const = 0 ; /** * get the blue color component **/ virtual unsigned char getBlue (void) const = 0 ; } ; #endif // ndef SH_BMPSAMPLE_H steghide-0.5.1/src/Makefile.am0000644000076400001440000000405007735606521011627 if USE_INTLDIR AM_CPPFLAGS = -I../intl -DLOCALEDIR=\"$(localedir)\" else AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" endif bin_PROGRAMS = steghide noinst_HEADERS = \ AUtils.h Arg.h Arguments.h AssertionFailed.h AuData.h AuFile.h \ AuSampleValues.h AudioData.h AudioSampleValue.h DFSAPHeuristic.h BFSAPHeuristic.h \ BinaryIO.h BitString.h BmpFile.h BmpPaletteSampleValue.h BmpRGBSampleValue.h \ BmpSampleValue.h ColorPalette.h WKSConstructionHeuristic.h CvrStgFile.h \ CvrStgObject.h Edge.h EdgeIterator.h DMDConstructionHeuristic.h \ EmbData.h Embedder.h EncryptionAlgorithm.h EncryptionMode.h Extractor.h \ Globals.h Graph.h JpegFile.h JpegSampleValue.h MCryptPP.h MHashKeyGen.h \ MHashPP.h Matching.h MatchingAlgorithm.h ProgressOutput.h PseudoRandomSource.h \ RGBTriple.h RandomSource.h SampleOccurence.h SampleValue.h \ SampleValueAdjacencyList.h Selector.h Session.h SteghideError.h Terminal.h \ Utils.h Vertex.h WavChunk.h WavChunkHeader.h WavChunkUnused.h WavFile.h \ WavFormatChunk.h WavPCMSampleValue.h common.h error.h msg.h wrapper_hash_map.h \ wrapper_hash_set.h SMDConstructionHeuristic.h gettext.h steghide_SOURCES = \ Arg.cc Arguments.cc AssertionFailed.cc AuFile.cc AuSampleValues.cc \ DFSAPHeuristic.cc BFSAPHeuristic.cc BinaryIO.cc BitString.cc BmpFile.cc \ BmpPaletteSampleValue.cc BmpRGBSampleValue.cc BmpSampleValue.cc \ WKSConstructionHeuristic.cc DMDConstructionHeuristic.cc CvrStgFile.cc \ Edge.cc EdgeIterator.cc EmbData.cc Embedder.cc \ EncryptionAlgorithm.cc EncryptionMode.cc Extractor.cc Graph.cc JpegFile.cc \ JpegSampleValue.cc MCryptPP.cc MHashKeyGen.cc MHashPP.cc Matching.cc \ MatchingAlgorithm.cc ProgressOutput.cc PseudoRandomSource.cc RGBTriple.cc \ RandomSource.cc SampleValue.cc SampleValueAdjacencyList.cc Selector.cc \ Session.cc SteghideError.cc Terminal.cc Utils.cc Vertex.cc WavChunk.cc \ WavChunkHeader.cc WavChunkUnused.cc WavFile.cc WavFormatChunk.cc \ WavPCMSampleValue.cc error.cc main.cc msg.cc SMDConstructionHeuristic.cc LIBS = @LIBINTL@ @LIBS@ localedir = $(datadir)/locale LIBTOOL = $(SHELL) libtool MAINTAINERCLEANFILES = Makefile.in steghide-0.5.1/src/Makefile.in0000644000076400001440000005620307743177331011650 # Makefile.in generated by automake 1.7.2 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBINTL@ @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_INTLDIR_FALSE = @USE_INTLDIR_FALSE@ USE_INTLDIR_TRUE = @USE_INTLDIR_TRUE@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_cv_prog_doxygen = @ac_cv_prog_doxygen@ ac_cv_prog_perl = @ac_cv_prog_perl@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ @USE_INTLDIR_FALSE@AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" @USE_INTLDIR_TRUE@AM_CPPFLAGS = -I../intl -DLOCALEDIR=\"$(localedir)\" bin_PROGRAMS = steghide noinst_HEADERS = \ AUtils.h Arg.h Arguments.h AssertionFailed.h AuData.h AuFile.h \ AuSampleValues.h AudioData.h AudioSampleValue.h DFSAPHeuristic.h BFSAPHeuristic.h \ BinaryIO.h BitString.h BmpFile.h BmpPaletteSampleValue.h BmpRGBSampleValue.h \ BmpSampleValue.h ColorPalette.h WKSConstructionHeuristic.h CvrStgFile.h \ CvrStgObject.h Edge.h EdgeIterator.h DMDConstructionHeuristic.h \ EmbData.h Embedder.h EncryptionAlgorithm.h EncryptionMode.h Extractor.h \ Globals.h Graph.h JpegFile.h JpegSampleValue.h MCryptPP.h MHashKeyGen.h \ MHashPP.h Matching.h MatchingAlgorithm.h ProgressOutput.h PseudoRandomSource.h \ RGBTriple.h RandomSource.h SampleOccurence.h SampleValue.h \ SampleValueAdjacencyList.h Selector.h Session.h SteghideError.h Terminal.h \ Utils.h Vertex.h WavChunk.h WavChunkHeader.h WavChunkUnused.h WavFile.h \ WavFormatChunk.h WavPCMSampleValue.h common.h error.h msg.h wrapper_hash_map.h \ wrapper_hash_set.h SMDConstructionHeuristic.h gettext.h steghide_SOURCES = \ Arg.cc Arguments.cc AssertionFailed.cc AuFile.cc AuSampleValues.cc \ DFSAPHeuristic.cc BFSAPHeuristic.cc BinaryIO.cc BitString.cc BmpFile.cc \ BmpPaletteSampleValue.cc BmpRGBSampleValue.cc BmpSampleValue.cc \ WKSConstructionHeuristic.cc DMDConstructionHeuristic.cc CvrStgFile.cc \ Edge.cc EdgeIterator.cc EmbData.cc Embedder.cc \ EncryptionAlgorithm.cc EncryptionMode.cc Extractor.cc Graph.cc JpegFile.cc \ JpegSampleValue.cc MCryptPP.cc MHashKeyGen.cc MHashPP.cc Matching.cc \ MatchingAlgorithm.cc ProgressOutput.cc PseudoRandomSource.cc RGBTriple.cc \ RandomSource.cc SampleValue.cc SampleValueAdjacencyList.cc Selector.cc \ Session.cc SteghideError.cc Terminal.cc Utils.cc Vertex.cc WavChunk.cc \ WavChunkHeader.cc WavChunkUnused.cc WavFile.cc WavFormatChunk.cc \ WavPCMSampleValue.cc error.cc main.cc msg.cc SMDConstructionHeuristic.cc localedir = $(datadir)/locale LIBTOOL = $(SHELL) libtool MAINTAINERCLEANFILES = Makefile.in subdir = src mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = bin_PROGRAMS = steghide$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am_steghide_OBJECTS = Arg.$(OBJEXT) Arguments.$(OBJEXT) \ AssertionFailed.$(OBJEXT) AuFile.$(OBJEXT) \ AuSampleValues.$(OBJEXT) DFSAPHeuristic.$(OBJEXT) \ BFSAPHeuristic.$(OBJEXT) BinaryIO.$(OBJEXT) BitString.$(OBJEXT) \ BmpFile.$(OBJEXT) BmpPaletteSampleValue.$(OBJEXT) \ BmpRGBSampleValue.$(OBJEXT) BmpSampleValue.$(OBJEXT) \ WKSConstructionHeuristic.$(OBJEXT) \ DMDConstructionHeuristic.$(OBJEXT) CvrStgFile.$(OBJEXT) \ Edge.$(OBJEXT) EdgeIterator.$(OBJEXT) EmbData.$(OBJEXT) \ Embedder.$(OBJEXT) EncryptionAlgorithm.$(OBJEXT) \ EncryptionMode.$(OBJEXT) Extractor.$(OBJEXT) Graph.$(OBJEXT) \ JpegFile.$(OBJEXT) JpegSampleValue.$(OBJEXT) MCryptPP.$(OBJEXT) \ MHashKeyGen.$(OBJEXT) MHashPP.$(OBJEXT) Matching.$(OBJEXT) \ MatchingAlgorithm.$(OBJEXT) ProgressOutput.$(OBJEXT) \ PseudoRandomSource.$(OBJEXT) RGBTriple.$(OBJEXT) \ RandomSource.$(OBJEXT) SampleValue.$(OBJEXT) \ SampleValueAdjacencyList.$(OBJEXT) Selector.$(OBJEXT) \ Session.$(OBJEXT) SteghideError.$(OBJEXT) Terminal.$(OBJEXT) \ Utils.$(OBJEXT) Vertex.$(OBJEXT) WavChunk.$(OBJEXT) \ WavChunkHeader.$(OBJEXT) WavChunkUnused.$(OBJEXT) \ WavFile.$(OBJEXT) WavFormatChunk.$(OBJEXT) \ WavPCMSampleValue.$(OBJEXT) error.$(OBJEXT) main.$(OBJEXT) \ msg.$(OBJEXT) SMDConstructionHeuristic.$(OBJEXT) steghide_OBJECTS = $(am_steghide_OBJECTS) steghide_LDADD = $(LDADD) steghide_DEPENDENCIES = steghide_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/Arg.Po ./$(DEPDIR)/Arguments.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/AssertionFailed.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/AuFile.Po ./$(DEPDIR)/AuSampleValues.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BFSAPHeuristic.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BinaryIO.Po ./$(DEPDIR)/BitString.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BmpFile.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BmpPaletteSampleValue.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BmpRGBSampleValue.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BmpSampleValue.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/CvrStgFile.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/DFSAPHeuristic.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/DMDConstructionHeuristic.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/Edge.Po ./$(DEPDIR)/EdgeIterator.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/EmbData.Po ./$(DEPDIR)/Embedder.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/EncryptionAlgorithm.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/EncryptionMode.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/Extractor.Po ./$(DEPDIR)/Graph.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/JpegFile.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/JpegSampleValue.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/MCryptPP.Po ./$(DEPDIR)/MHashKeyGen.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/MHashPP.Po ./$(DEPDIR)/Matching.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/MatchingAlgorithm.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/ProgressOutput.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/PseudoRandomSource.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/RGBTriple.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/RandomSource.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/SMDConstructionHeuristic.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/SampleValue.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/SampleValueAdjacencyList.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/Selector.Po ./$(DEPDIR)/Session.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/SteghideError.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/Terminal.Po ./$(DEPDIR)/Utils.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/Vertex.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/WKSConstructionHeuristic.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/WavChunk.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/WavChunkHeader.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/WavChunkUnused.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/WavFile.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/WavFormatChunk.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/WavPCMSampleValue.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/error.Po ./$(DEPDIR)/main.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/msg.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(steghide_SOURCES) HEADERS = $(noinst_HEADERS) DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in SOURCES = $(steghide_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done steghide$(EXEEXT): $(steghide_OBJECTS) $(steghide_DEPENDENCIES) @rm -f steghide$(EXEEXT) $(CXXLINK) $(steghide_LDFLAGS) $(steghide_OBJECTS) $(steghide_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Arg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Arguments.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AssertionFailed.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AuFile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AuSampleValues.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BFSAPHeuristic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BinaryIO.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BitString.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BmpFile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BmpPaletteSampleValue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BmpRGBSampleValue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BmpSampleValue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CvrStgFile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DFSAPHeuristic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DMDConstructionHeuristic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Edge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EdgeIterator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EmbData.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Embedder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EncryptionAlgorithm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EncryptionMode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Extractor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Graph.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/JpegFile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/JpegSampleValue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MCryptPP.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MHashKeyGen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MHashPP.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Matching.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MatchingAlgorithm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ProgressOutput.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PseudoRandomSource.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RGBTriple.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RandomSource.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SMDConstructionHeuristic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SampleValue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SampleValueAdjacencyList.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Selector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Session.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SteghideError.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Terminal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Vertex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WKSConstructionHeuristic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WavChunk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WavChunkHeader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WavChunkUnused.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WavFile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WavFormatChunk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WavPCMSampleValue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg.Po@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCXX_TRUE@ fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ @am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCXX_TRUE@ fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` .cc.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCXX_TRUE@ fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-depend distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: steghide-0.5.1/src/Edge.cc0000644000076400001440000001047307735577226010765 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "Edge.h" #include "SampleValue.h" #include "Vertex.h" #include "common.h" Edge::Edge (Vertex *v1, unsigned short idx1, Vertex *v2, unsigned short idx2) : Vertex1(v1), Index1(idx1), Vertex2(v2), Index2(idx2), Weight(UWORD32_MAX) { myassert (v1->getLabel() != v2->getLabel()) ; } Edge::Edge (const Edge& e) { Vertex1 = e.Vertex1 ; Index1 = e.Index1 ; Vertex2 = e.Vertex2 ; Index2 = e.Index2 ; Weight = e.Weight ; } UWORD32 Edge::getWeight () { if (Weight == UWORD32_MAX) { Weight = Vertex1->getSampleValue(Index1)->calcDistance(Vertex2->getSampleValue(Index2)) ; } return Weight ; } void Edge::set (Vertex* v1, unsigned short idx1, Vertex* v2, unsigned short idx2) { Vertex1 = v1 ; Index1 = idx1 ; Vertex2 = v2 ; Index2 = idx2 ; Weight = UWORD32_MAX ; } void Edge::set1 (Vertex* v1, unsigned short idx1) { Vertex1 = v1 ; Index1 = idx1 ; Weight = UWORD32_MAX ; } void Edge::set2 (Vertex* v2, unsigned short idx2) { Vertex2 = v2 ; Index2 = idx2 ; Weight = UWORD32_MAX ; } bool Edge::operator== (const Edge& e) const { if ((Vertex1->getLabel() == e.Vertex1->getLabel()) && (Vertex2->getLabel() == e.Vertex2->getLabel()) && (Index1 == e.Index1) && (Index2 == e.Index2)) { return true ; } if ((Vertex1->getLabel() == e.Vertex2->getLabel()) && (Vertex2->getLabel() == e.Vertex1->getLabel()) && (Index1 == e.Index2) && (Index2 == e.Index1)) { return true ; } return false ; } bool Edge::operator!= (const Edge& e) const { return (!operator==(e)) ; } void Edge::swap (void) { Vertex* v_tmp = Vertex1 ; Vertex1 = Vertex2 ; Vertex2 = v_tmp ; unsigned short idx_tmp = Index1 ; Index1 = Index2 ; Index2 = idx_tmp ; } bool Edge::contains (const Vertex* v) const { return ((v->getLabel() == Vertex1->getLabel()) || (v->getLabel() == Vertex2->getLabel())) ; } Vertex *Edge::getOtherVertex (const Vertex *v) const { Vertex *retval = NULL ; if (v->getLabel() == Vertex1->getLabel()) { retval = Vertex2 ; } else if (v->getLabel() == Vertex2->getLabel()) { retval = Vertex1 ; } else { myassert (0) ; } return retval ; } SamplePos Edge::getSamplePos (Vertex *v) const { SamplePos retval = 0 ; if (v->getLabel() == Vertex1->getLabel()) { retval = Vertex1->getSamplePos (Index1) ; } else if (v->getLabel() == Vertex2->getLabel()) { retval = Vertex2->getSamplePos (Index2) ; } else { myassert (0) ; } return retval ; } SampleValue *Edge::getOriginalSampleValue (Vertex *v) const { unsigned short index = 0 ; if (v->getLabel() == Vertex1->getLabel()) { index = Index1 ; } else if (v->getLabel() == Vertex2->getLabel()) { index = Index2 ; } else { myassert (0) ; } return v->getSampleValue (index) ; } SampleValue *Edge::getReplacingSampleValue (Vertex *v) const { SampleValue *retval = NULL ; if (v->getLabel() == Vertex1->getLabel()) { retval = Vertex2->getSampleValue (Index2) ; } else if (v->getLabel() == Vertex2->getLabel()) { retval = Vertex1->getSampleValue (Index1) ; } else { myassert (0) ; } return retval ; } void Edge::print (unsigned short spc) const { char* space = new char[spc + 1] ; for (unsigned short i = 0 ; i < spc ; i++) { space[i] = ' ' ; } space[spc] = '\0' ; std::cerr << space << "Edge:" << std::endl ; Vertex1->print (spc + 1) ; std::cerr << space << " Index1: " << Index1 << std::endl ; Vertex2->print (spc + 1) ; std::cerr << space << " Index2: " << Index2 << std::endl ; std::cerr << space << " Weight: " ; if (Weight == UWORD32_MAX) { std::cerr << "not calculated" ; } else { std::cerr << Weight ; } std::cerr << std::endl ; } steghide-0.5.1/src/Arguments.cc0000644000076400001440000005222007742072460012046 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include "MCryptPP.h" #include "Terminal.h" #include "common.h" #include "error.h" #include "msg.h" // the global Arguments object Arguments Args ; Arguments::Arguments (int argc, char* argv[]) { bool delete_next = false ; for (int i = 1 ; i < argc ; ++i) { TheArguments.push_back (std::string(argv[i])) ; if (delete_next) { // overwrite passphrase in argv in order to avoid that it can be read with the ps command unsigned int len = strlen(argv[i]) ; for (unsigned int j = 0 ; j < len ; j++) { argv[i][j] = ' ' ; } delete_next = false ; } if (std::string(argv[i]) == "-p" || std::string(argv[i]) == "--passphrase") { delete_next = true ; } } } void Arguments::parse () { // if there are no arguments -> show help if (TheArguments.empty()) { Command.setValue (SHOWHELP) ; return ; } ArgIt curarg = TheArguments.begin() ; parse_Command (curarg) ; // parse rest of arguments while (curarg != TheArguments.end()) { if (parse_EmbFn(curarg)) continue ; if (parse_ExtFn(curarg)) continue ; if (parse_CvrFn(curarg)) continue ; if (parse_StgFn(curarg)) continue ; if (parse_Passphrase(curarg)) continue ; if (parse_Checksum(curarg)) continue ; if (parse_Compression(curarg)) continue ; if (parse_EmbedEmbFn(curarg)) continue ; if (parse_Encryption(curarg)) continue ; if (parse_Radius(curarg)) continue ; if (parse_Goal(curarg)) continue ; if (parse_Force(curarg)) continue ; if (parse_Verbosity(curarg)) continue ; if (parse_Debug(curarg)) continue ; // TODO - rename Debug -> Undocumented throw ArgError (_("unknown argument \"%s\"."), curarg->c_str()) ; } // (command-specific) argument post-processing if (Command.getValue() == EMBED) { if ((CvrFn.getValue() == "") && (EmbFn.getValue() == "")) { throw ArgError (_("standard input cannot be used for cover data AND data to be embedded.")) ; } if (!StgFn.is_set() && CvrFn.is_set()) { StgFn.setValue (CvrFn.getValue()) ; Force.setValue (true) ; } } if (Command.getValue() == EMBED || Command.getValue() == EXTRACT) { if (!Passphrase.is_set()) { // prompt for passphrase if (Command.getValue() == EMBED) { if ((CvrFn.getValue() == "") || (EmbFn.getValue() == "")) { throw ArgError (_("if standard input is used, the passphrase must be specified on the command line.")) ; } Passphrase.setValue (getPassphrase (true)) ; } else if (Command.getValue() == EXTRACT) { if (StgFn.getValue() == "") { throw ArgError (_("if standard input is used, the passphrase must be specified on the command line.")) ; } Passphrase.setValue (getPassphrase()) ; } } } } void Arguments::parse_Command (ArgIt& curarg) { CommandString = *curarg ; if (*curarg == "embed" || *curarg == "--embed") { Command.setValue (EMBED) ; setDefaults () ; ++curarg ; } else if (*curarg == "extract" || *curarg == "--extract") { Command.setValue (EXTRACT) ; setDefaults () ; ++curarg ; } else if (*curarg == "info" || *curarg == "--info") { Command.setValue (INFO) ; setDefaults() ; ++curarg ; if (curarg == TheArguments.end()) { throw ArgError (_("you have to suppy a filename to the \"%s\" command."), CommandString.c_str()) ; } else { parse_Passphrase (curarg) ; // try: maybe -p is first argument if (*curarg == "-") { CvrFn.setValue ("") ; } else { CvrFn.setValue (*curarg) ; } ++curarg ; if (curarg != TheArguments.end()) { parse_Passphrase (curarg) ; } } } else if (*curarg == "encinfo" || *curarg == "--encinfo") { Command.setValue (ENCINFO) ; if (TheArguments.size() > 1) { throw ArgError (_("you cannot use arguments with the \"%s\" command."), CommandString.c_str()) ; } ++curarg ; } else if (*curarg == "version" || *curarg == "--version") { Command.setValue (SHOWVERSION) ; if (TheArguments.size() > 1) { throw ArgError (_("you cannot use arguments with the \"%s\" command."), CommandString.c_str()) ; } ++curarg ; } else if (*curarg == "license" || *curarg == "--license") { Command.setValue (SHOWLICENSE) ; if (TheArguments.size() > 1) { throw ArgError (_("you cannot use arguments with the \"%s\" command."), CommandString.c_str()) ; } ++curarg ; } else if (*curarg == "help" || *curarg == "--help") { Command.setValue (SHOWHELP) ; if (TheArguments.size() > 1) { throw ArgError (_("you cannot use arguments with the \"%s\" command."), CommandString.c_str()) ; } ++curarg ; } #ifdef DEBUG else if (*curarg == "printfreqs" || *curarg == "--printfreqs") { Command.setValue (PRINTFREQS) ; std::list flist ; while ((++curarg) != TheArguments.end()) { flist.push_back (*curarg) ; } FileList.setValue (flist) ; } #endif else { throw ArgError (_("unknown command \"%s\"."), CommandString.c_str()) ; } } bool Arguments::parse_EmbFn (ArgIt& curarg) { bool found = false ; if (*curarg == "-ef" || *curarg == "--embedfile") { if (Command.getValue() != EMBED) { throw ArgError (_("the argument \"%s\" can only be used with the \"%s\" command."), curarg->c_str(), "embed") ; } if (EmbFn.is_set()) { throw ArgError (_("the \"%s\" argument can be used only once."), (curarg - 1)->c_str()) ; } if (++curarg == TheArguments.end()) { throw ArgError (_("the \"%s\" argument must be followed by the embed file name."), (curarg - 1)->c_str()) ; } if (*curarg == "-") { EmbFn.setValue ("") ; } else { EmbFn.setValue (*curarg) ; } found = true ; curarg++ ; } return found ; } bool Arguments::parse_ExtFn (ArgIt& curarg) { bool found = false ; if (*curarg == "-xf" || *curarg == "--extractfile") { if (Command.getValue() != EXTRACT) { throw ArgError (_("the argument \"%s\" can only be used with the \"%s\" command."), curarg->c_str(), "extract") ; } if (ExtFn.is_set()) { throw ArgError (_("the \"%s\" argument can be used only once."), (curarg - 1)->c_str()) ; } if (++curarg == TheArguments.end()) { throw ArgError (_("the \"%s\" argument must be followed by the extract file name."), (curarg - 1)->c_str()) ; } if (*curarg == "-") { ExtFn.setValue ("") ; } else { ExtFn.setValue (*curarg) ; } found = true ; curarg++ ; } return found ; } bool Arguments::parse_CvrFn (ArgIt& curarg) { bool found = false ; if (*curarg == "-cf" || *curarg == "--coverfile") { if (Command.getValue() != EMBED) { throw ArgError (_("the argument \"%s\" can only be used with the \"%s\" command."), curarg->c_str(), "embed") ; } if (CvrFn.is_set()) { throw ArgError (_("the cover file name argument can be used only once.")) ; } if (++curarg == TheArguments.end()) { throw ArgError (_("the \"%s\" argument must be followed by the cover file name."), (curarg - 1)->c_str()) ; } if (*curarg == "-") { CvrFn.setValue ("") ; } else { CvrFn.setValue (*curarg) ; } found = true ; curarg++ ; } return found ; } bool Arguments::parse_StgFn (ArgIt& curarg) { bool found = false ; if (*curarg == "-sf" || *curarg == "--stegofile") { if (Command.getValue() != EMBED && Command.getValue() != EXTRACT) { throw ArgError (_("the argument \"%s\" can only be used with the \"%s\" and \"%s\" commands."), curarg->c_str(), "embed", "extract") ; } if (StgFn.is_set()) { throw ArgError (_("the \"%s\" argument can be used only once."), (curarg - 1)->c_str()) ; } if (++curarg == TheArguments.end()) { throw ArgError (_("the \"%s\" argument must be followed by the stego file name."), (curarg - 1)->c_str()) ; } if (*curarg == "-") { StgFn.setValue ("") ; } else { StgFn.setValue (*curarg) ; } found = true ; curarg++ ; } return found ; } bool Arguments::parse_Passphrase (ArgIt& curarg) { bool found = false ; if (*curarg == "-p" || *curarg == "--passphrase") { if (Passphrase.is_set()) { throw ArgError (_("the passphrase argument can be used only once.")) ; } if (++curarg == TheArguments.end()) { throw ArgError (_("the \"%s\" argument must be followed by the passphrase."), (curarg - 1)->c_str()); } Passphrase.setValue (*curarg) ; found = true ; curarg++ ; } return found ; } bool Arguments::parse_Checksum (ArgIt& curarg) { bool found = false ; if (*curarg == "-K" || *curarg == "--nochecksum") { if (Command.getValue() != EMBED) { throw ArgError (_("the argument \"%s\" can only be used with the \"%s\" command."), curarg->c_str(), "embed") ; } if (Checksum.is_set()) { throw ArgError (_("the checksum argument can be used only once.")) ; } Checksum.setValue (false) ; found = true ; curarg++ ; } return found ; } bool Arguments::parse_Compression (ArgIt& curarg) { bool found = false ; if (*curarg == "-z" || *curarg == "--compress") { if (Command.getValue() != EMBED) { throw ArgError (_("the argument \"%s\" can only be used with the \"embed\" command."), curarg->c_str()) ; } if (Compression.is_set()) { throw ArgError (_("the compression argument can be used only once.")) ; } if (++curarg == TheArguments.end()) { throw ArgError (_("the \"%s\" argument must be followed by the compression level."), (curarg - 1)->c_str()) ; } int tmp = 0 ; sscanf (curarg->c_str(), "%d", &tmp) ; if (tmp < 1 || tmp > 9) { throw ArgError (_("\"%s\" is not a valid compression level."), curarg->c_str()) ; } Compression.setValue (tmp) ; found = true ; curarg++ ; } else if (*curarg == "-Z" || *curarg == "--dontcompress") { if (Command.getValue() != EMBED) { throw ArgError (_("the argument \"%s\" can only be used with the \"%s\" command."), curarg->c_str(), "embed") ; } if (Compression.is_set()) { throw ArgError (_("the compression argument can be used only once.")) ; } Compression.setValue (NoCompression) ; found = true ; curarg++ ; } return found ; } bool Arguments::parse_EmbedEmbFn (ArgIt& curarg) { bool found = false ; if (*curarg == "-N" || *curarg == "--dontembedname") { if (Command.getValue() != EMBED) { throw ArgError (_("the argument \"%s\" can only be used with the \"embed\" command."), curarg->c_str()) ; } if (EmbedEmbFn.is_set()) { throw ArgError (_("the file name embedding argument can be used only once.")) ; } EmbedEmbFn.setValue (false) ; found = true ; curarg++ ; } return found ; } bool Arguments::parse_Encryption (ArgIt& curarg) { bool found = false ; if (*curarg == "-e" || *curarg == "--encryption") { if (Command.getValue() != EMBED) { throw ArgError (_("the argument \"%s\" can only be used with the \"%s\" command."), curarg->c_str(), "embed") ; } if (EncAlgo.is_set() || EncMode.is_set()) { throw ArgError (_("the encryption argument can be used only once.")) ; } if (++curarg == TheArguments.end()) { throw ArgError (_("the \"%s\" argument must be followed by encryption parameters."), (curarg - 1)->c_str()) ; } std::string s1, s2 ; if ((*curarg)[0] == '-') { throw ArgError (_("the \"%s\" argument must be followed by encryption parameters."), (curarg - 1)->c_str()) ; } else { s1 = *curarg ; if (curarg + 1 == TheArguments.end()) { s2 = "" ; } else { if ((*(curarg + 1))[0] == '-') { s2 = "" ; } else { ++curarg ; // set to second encryption specifier s2 = *curarg ; } } } if (s1 == "none" && s2 == "") { EncAlgo.setValue (s1) ; } #ifdef USE_LIBMCRYPT else { bool s1_isalgo = false, s1_ismode = false ; bool s2_isalgo = false, s2_ismode = false ; if (s1 != "") { s1_isalgo = EncryptionAlgorithm::isValidStringRep (s1) ; s1_ismode = EncryptionMode::isValidStringRep (s1) ; myassert (!(s1_isalgo && s1_ismode)) ; if (!(s1_isalgo || s1_ismode)) { throw SteghideError (_("\"%s\" is neither an algorithm nor a mode supported by libmcrypt."), s1.c_str()) ; } } if (s2 != "") { s2_isalgo = EncryptionAlgorithm::isValidStringRep (s2) ; s2_ismode = EncryptionMode::isValidStringRep (s2) ; myassert (!(s2_isalgo && s2_ismode)) ; if (!(s2_isalgo || s2_ismode)) { throw SteghideError (_("\"%s\" is neither an algorithm nor a mode supported by libmcrypt."), s2.c_str()) ; } } if (s1_isalgo && s2_isalgo) { throw SteghideError (_("\"%s\" and \"%s\" are both libmcrypt algorithms. please specify only one."), s1.c_str(), s2.c_str()) ; } if (s1_ismode && s2_ismode) { throw SteghideError (_("\"%s\" and \"%s\" are both libmcrypt modes. please specify only one."), s1.c_str(), s2.c_str()) ; } if (s1_isalgo) { EncAlgo.setValue (s1) ; } if (s1_ismode) { EncMode.setValue (s1) ; } if (s2_isalgo) { EncAlgo.setValue (s2) ; } if (s2_ismode) { EncMode.setValue (s2) ; } if (!MCryptPP::AlgoSupportsMode (EncAlgo.getValue(), EncMode.getValue())) { throw SteghideError (_("the encryption algorithm \"%s\" can not be used with the mode \"%s\"."), EncAlgo.getValue().getStringRep().c_str(), EncMode.getValue().getStringRep().c_str()) ; } } #else else { throw SteghideError (_("steghide has been compiled without support for encryption.")) ; } #endif // def USE_LIBMCRYPT found = true ; curarg++ ; } return found ; } bool Arguments::parse_Radius (ArgIt& curarg) { bool found = false ; if (*curarg == "-r" || *curarg == "--radius") { if (Command.getValue() != EMBED) { throw ArgError (_("the argument \"%s\" can only be used with the \"%s\" command."), curarg->c_str(), "embed") ; } if (Radius.is_set()) { throw ArgError (_("the radius argument can be used only once.")) ; } if (++curarg == TheArguments.end()) { throw ArgError (_("the \"%s\" argument must be followed by the neighbourhood radius."), (curarg - 1)->c_str()) ; } unsigned long tmp = 0 ; sscanf (curarg->c_str(), "%lu", &tmp) ; Radius.setValue (tmp) ; found = true ; curarg++ ; } return found ; } bool Arguments::parse_Goal (ArgIt& curarg) { bool found = false ; if (*curarg == "-g" || *curarg == "--goal") { if (Command.getValue() != EMBED) { throw ArgError (_("the argument \"%s\" can only be used with the \"%s\" command."), curarg->c_str(), "embed") ; } if (Goal.is_set()) { throw ArgError (_("the goal argument can be used only once.")) ; } if (++curarg == TheArguments.end()) { throw ArgError (_("the \"%s\" argument must be followed by a number between 0 and 100."), (curarg - 1)->c_str()) ; } float tmp = 0 ; sscanf (curarg->c_str(), "%f", &tmp) ; if (tmp < 0 || tmp > 100) { throw ArgError (_("the \"%s\" argument must be followed by a number between 0 and 100."), (curarg - 1)->c_str()) ; } Goal.setValue (tmp) ; found = true ; curarg++ ; } return found ; } bool Arguments::parse_Force (ArgIt& curarg) { bool found = false ; if (*curarg == "-f" || *curarg == "--force") { if (Command.getValue() != EMBED && Command.getValue() != EXTRACT) { throw ArgError (_("the argument \"%s\" can only be used with the \"%s\" and \"%s\" commands."), curarg->c_str(), "embed", "extract") ; } if (Force.is_set()) { throw ArgError (_("the force argument can be used only once.")) ; } Force.setValue (true); found = true ; curarg++ ; } return found ; } bool Arguments::parse_Verbosity (ArgIt& curarg) { bool found = false ; if (*curarg == "-q" || *curarg == "--quiet") { found = true ; if (Command.getValue() != EMBED && Command.getValue() != EXTRACT) { throw ArgError (_("the argument \"%s\" can only be used with the \"%s\" and \"%s\" commands."), curarg->c_str(), "embed", "extract") ; } if (Verbosity.is_set()) { throw ArgError (_("the \"%s\" argument cannot be used here because the verbosity has already been set."), curarg->c_str()) ; } Verbosity.setValue (QUIET) ; curarg++ ; } else if (*curarg == "-v" || *curarg == "--verbose") { found = true ; if (Command.getValue() != EMBED && Command.getValue() != EXTRACT) { throw ArgError (_("the argument \"%s\" can only be used with the \"%s\" and \"%s\" commands."), curarg->c_str(), "embed", "extract") ; } if (Verbosity.is_set()) { throw ArgError (_("the \"%s\" argument cannot be used here because the verbosity has already been set."), curarg->c_str()) ; } Verbosity.setValue (VERBOSE) ; curarg++ ; } return found ; } bool Arguments::parse_Debug (ArgIt& curarg) { bool found = false ; if (*curarg == "--printgraph") { if (DebugCommand.is_set()) { throw SteghideError (_("you cannot use more than one debug command at a time.")) ; } DebugCommand.setValue (PRINTGRAPH) ; found = true ; curarg++ ; } else if (*curarg == "--printgmlgraph") { if (DebugCommand.is_set()) { throw SteghideError (_("you cannot use more than one debug command at a time.")) ; } DebugCommand.setValue (PRINTGMLGRAPH) ; found = true ; curarg++ ; } else if (*curarg == "--printgmlvertex") { if (DebugCommand.is_set()) { throw SteghideError (_("you cannot use more than one debug command at a time.")) ; } DebugCommand.setValue (PRINTGMLVERTEX) ; curarg++ ; int tmp = 0 ; sscanf (curarg->c_str(), "%d", &tmp) ; GmlGraphRecDepth.setValue (tmp) ; curarg++ ; sscanf (curarg->c_str(), "%d", &tmp) ; GmlStartVertex.setValue (tmp) ; found = true ; curarg++ ; } else if (*curarg == "--printstats") { if (DebugCommand.is_set()) { throw SteghideError (_("you cannot use more than one debug command at a time.")) ; } if (Verbosity.is_set()) { throw ArgError (_("the \"%s\" argument cannot be used here because the verbosity has already been set."), curarg->c_str()) ; } Verbosity.setValue (STATS) ; found = true ; ++curarg ; } else if (*curarg == "--debuglevel") { if (DebugLevel.is_set()) { throw ArgError (_("the debug level argument can be used only once.")) ; } if (++curarg == TheArguments.end()) { throw ArgError (_("the \"%s\" argument must be followed by the debug level."), (curarg - 1)->c_str()) ; } unsigned int tmp = 0 ; sscanf (curarg->c_str(), "%u", &tmp) ; DebugLevel.setValue (tmp) ; found = true ; ++curarg ; } else if (*curarg == "--check") { // TODO usual error checking (omitted due to message freeze) Check.setValue (true) ; found = true ; ++curarg ; } return found ; } std::string Arguments::getPassphrase (bool doublecheck) { int c = EOF ; #ifndef HAVE_TERMIOS_H Warning w (_("unknown terminal. the passphrase you type now will be visible.")) ; w.printMessage() ; #endif std::cerr << _("Enter passphrase: ") ; Terminal term ; term.EchoOff() ; std::string s1 = "" ; while ((c = std::cin.get()) != '\n') { s1 += c ; } term.reset() ; std::cerr << std::endl ; if (doublecheck) { std::cerr << _("Re-Enter passphrase: ") ; term.EchoOff() ; std::string s2 = "" ; while ((c = std::cin.get()) != '\n') { s2 += c ; } term.reset() ; std::cerr << std::endl ; if (s1 != s2) { throw SteghideError (_("the passphrases do not match.")) ; } } return s1 ; } bool Arguments::stdin_isused () const { bool retval = false ; if (Command.getValue() == EMBED && (EmbFn.getValue() == "" || CvrFn.getValue() == "")) { retval = true ; } else if (Command.getValue() == EXTRACT && StgFn.getValue() == "") { retval = true ; } else if (Command.getValue() == INFO && CvrFn.getValue() == "") { retval = true ; } return retval ; } void Arguments::setDefaults (void) { myassert (Command.is_set()) ; EmbFn.setValue ("", false) ; CvrFn.setValue ("", false) ; EncAlgo.setValue (Default_EncAlgo, false) ; EncMode.setValue (Default_EncMode, false) ; Checksum.setValue (Default_Checksum, false) ; Compression.setValue (Default_Compression, false) ; EmbedEmbFn.setValue (Default_EmbedEmbFn, false) ; ExtFn.setValue ("", false) ; Passphrase.setValue ("", false) ; StgFn.setValue ("", false) ; Force.setValue (Default_Force, false) ; Verbosity.setValue (Default_Verbosity, false) ; Radius.setValue (Default_Radius, false) ; Goal.setValue (Default_Goal, false) ; Check.setValue (Default_Check, false) ; DebugCommand.setValue (Default_DebugCommand, false) ; DebugLevel.setValue (Default_DebugLevel, false) ; GmlGraphRecDepth.setValue (Default_GmlGraphRecDepth, false) ; GmlStartVertex.setValue (Default_GmlStartVertex, false) ; } #ifdef USE_LIBMCRYPT const EncryptionAlgorithm Arguments::Default_EncAlgo = EncryptionAlgorithm (EncryptionAlgorithm::RIJNDAEL128) ; const EncryptionMode Arguments::Default_EncMode = EncryptionMode (EncryptionMode::CBC) ; #else const EncryptionAlgorithm Arguments::Default_EncAlgo = EncryptionAlgorithm (EncryptionAlgorithm::NONE) ; const EncryptionMode Arguments::Default_EncMode = EncryptionMode (EncryptionMode::ECB) ; // is ignored #endif steghide-0.5.1/src/MHashPP.cc0000755000076400001440000000575507737767716011402 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include "BitString.h" #include "common.h" #include "error.h" #include "MHashPP.h" MHashPP::MHashPP () { hashing = false ; HashBytesValid = false ; } MHashPP::MHashPP (hashid id) { init (id) ; } void MHashPP::init (hashid id) { if ((HashD = mhash_init (id)) == MHASH_FAILED) { throw SteghideError (_("could not initialize libmhash %s algorithm."), getAlgorithmName(id).c_str()) ; } hashing = true ; HashBytesValid = false ; } const std::vector& MHashPP::end () { myassert (hashing) ; unsigned int n = getHashSize() ; HashBytes = std::vector (n) ; BYTE hash[n] ; mhash_deinit (HashD, hash) ; hashing = false ; for (unsigned int i = 0 ; i < n ; i++) { HashBytes[i] = hash[i] ; } HashBytesValid = true ; return HashBytes ; } unsigned int MHashPP::getHashSize (void) { myassert (hashing) ; return ((unsigned int) mhash_get_block_size (mhash_get_mhash_algo (HashD))) ; } MHashPP& MHashPP::operator<< (std::string v) { myassert (hashing) ; mhash (HashD, v.data(), v.size()) ; return *this ; } MHashPP& MHashPP::operator<< (BitString v) { myassert (hashing) ; myassert (v.getLength() % 8 == 0) ; unsigned long n = v.getLength() / 8 ; for (unsigned int i = 0 ; i < n ; i++) { (*this) << (BYTE) v.getValue (8 * i, 8) ; } return *this ; } MHashPP& MHashPP::operator<< (BYTE v) { myassert (hashing) ; mhash (HashD, &v, 1) ; return *this ; } MHashPP& MHashPP::operator<< (MHashPP::Command c) { switch (c) { case endhash: HashBytes = end() ; break ; default: myassert (0) ; break ; } return *this ; } std::string MHashPP::getAlgorithmName () { myassert (hashing) ; return getAlgorithmName (mhash_get_mhash_algo (HashD)) ; } std::string MHashPP::getAlgorithmName (hashid id) { char *name = mhash_get_hash_name (id) ; std::string retval ; if (name == NULL) { retval = std::string ("") ; } else { retval = std::string (name) ; } free (name) ; return retval ; } BitString MHashPP::getHashBits () { myassert (HashBytesValid) ; return BitString (HashBytes) ; } const std::vector& MHashPP::getHashBytes() { myassert (HashBytesValid) ; return HashBytes ; } steghide-0.5.1/src/Vertex.cc0000644000076400001440000001456207735577226011401 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "AUtils.h" #include "Edge.h" #include "EdgeIterator.h" #include "Graph.h" #include "Vertex.h" #include "common.h" Vertex::Vertex (VertexLabel l, SamplePos* sposs, SampleValue** svalues, EmbValue t) { setLabel (l) ; SamplePositions = sposs ; SampleValues = svalues ; SampleOccurenceIts = new std::list::iterator[Globs.TheCvrStgFile->getSamplesPerVertex()] ; ShortestEdge = NULL ; valid = true ; // calculate sample target values... TargetValues = new EmbValue[Globs.TheCvrStgFile->getSamplesPerVertex()] ; EmbValue msum = 0 ; for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { // fill TargetValues with source values temporarily TargetValues[i] = SampleValues[i]->getEmbeddedValue() ; msum = (msum + TargetValues[i]) % Globs.TheCvrStgFile->getEmbValueModulus() ; } // ...by solving msum + d = t (mod m)... if (t < msum) { t += Globs.TheCvrStgFile->getEmbValueModulus() ; } EmbValue d = t - msum ; // ...and adding d to source values to produce target values for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { TargetValues[i] = (TargetValues[i] + d) % Globs.TheCvrStgFile->getEmbValueModulus() ; } // calculate SelfDegree SelfDegree = 0 ; for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { for (unsigned short j = i + 1 ; j < Globs.TheCvrStgFile->getSamplesPerVertex() ; j++) { if (SampleValues[i]->isNeighbour(SampleValues[j])) { if (TargetValues[i] == SampleValues[j]->getEmbeddedValue() && TargetValues[j] == SampleValues[i]->getEmbeddedValue()) { SelfDegree += 2 ; // 2 because i->j and j->i would be counted otherwise } } } } } Vertex::~Vertex () { delete[] TargetValues ; delete[] SampleOccurenceIts ; delete[] SamplePositions ; delete[] SampleValues ; delete ShortestEdge ; } void Vertex::markDeleted () { #ifdef DEBUG printDebug (2, "marking vertex with label %lu as deleted.", getLabel()) ; #endif if (valid) { // decrement neighbour degrees for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { std::vector& potneighs = (*(Globs.TheGraph->SVALists[TargetValues[i]]))[SampleValues[i]] ; for (std::vector::iterator svit = potneighs.begin() ; svit != potneighs.end() ; svit++) { (*svit)->decNumEdges (SampleValues[i]->getEmbeddedValue()) ; } } // delete from sample occurences in graph for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { SampleOccurenceIts[i] = Globs.TheGraph->markDeletedSampleOccurence (SampleOccurenceIts[i]) ; } valid = false ; } } void Vertex::unmarkDeleted () { #ifdef DEBUG printDebug (2, "unmarking deletion of vertex with label %lu.", getLabel()) ; #endif if (!valid) { // increment neighbour degrees for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { std::vector& potneighs = (*(Globs.TheGraph->SVALists[TargetValues[i]]))[SampleValues[i]] ; for (std::vector::iterator svit = potneighs.begin() ; svit != potneighs.end() ; svit++) { (*svit)->incNumEdges (SampleValues[i]->getEmbeddedValue()) ; } } // undelete into sample occurences in graph for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { SampleOccurenceIts[i] = Globs.TheGraph->unmarkDeletedSampleOccurence (SampleOccurenceIts[i]) ; } valid = true ; } } void Vertex::updateShortestEdge () { #ifdef DEBUG printDebug (3, "updating shorted edge for vertex with label %lu", getLabel()) ; #endif delete ShortestEdge ; if (getDegree() == 0) { ShortestEdge = NULL ; } else { EdgeIterator edgeit (this) ; ShortestEdge = new Edge (**edgeit) ; } } EmbValue Vertex::getEmbeddedValue () const { EmbValue retval = 0 ; for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { retval = (retval + SampleValues[i]->getEmbeddedValue()) % Globs.TheCvrStgFile->getEmbValueModulus() ; } return retval ; } #define BMINUS(A,B) ((A > B) ? (A - B) : (0)) UWORD32 Vertex::getDegree () const { UWORD32 degree = 0 ; for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { degree += SampleValues[i]->getNumEdges(TargetValues[i]) ; } return BMINUS(degree, SelfDegree) ; } void Vertex::print (unsigned short spc) const { char* space = new char[spc + 1] ; for (unsigned short i = 0 ; i < spc ; i++) { space[i] = ' ' ; } space[spc] = '\0' ; std::cerr << space << "Vertex:" << std::endl ; std::cerr << space << " Label: " << getLabel() << std::endl ; for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { std::cerr << space << " SamplePosition: " << getSamplePos(i) << std::endl ; getSampleValue(i)->print (spc + 1) ; std::cerr << space << " Target Value: " << (unsigned int) getTargetValue(i) << std::endl ; } std::cerr << space << " ShortestEdge:" << std::endl ; if (ShortestEdge) { ShortestEdge->print(spc + 2) ; } else { std::cerr << space << " NULL" << std::endl ; } std::cerr << space << " SelfDegree: " << SelfDegree << std::endl ; std::cerr << space << " getDegree(): " << getDegree() << std::endl ; } void Vertex::printEdges() const { std::cerr << "edges of vertex with label " << getLabel() << std::endl ; EdgeIterator edgeit (Globs.TheGraph->getVertex(getLabel())) ; while (*edgeit != NULL) { Edge* e = new Edge (**edgeit) ; std::cerr << " label of other vertex: " << e->getOtherVertex(this)->getLabel() << std::endl ; std::cerr << " weight: " << e->getWeight() << std::endl ; delete e ; ++edgeit ; } } steghide-0.5.1/src/BmpFile.cc0000644000076400001440000005604707735577226011446 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include "AUtils.h" #include "BFSAPHeuristic.h" #include "ColorPalette.h" #include "CvrStgFile.h" #include "DFSAPHeuristic.h" #include "DMDConstructionHeuristic.h" #include "BmpFile.h" #include "BmpPaletteSampleValue.h" #include "BmpRGBSampleValue.h" #include "SampleValueAdjacencyList.h" #include "SMDConstructionHeuristic.h" #include "WKSConstructionHeuristic.h" #include "common.h" #include "error.h" BmpFile::BmpFile (BinaryIO *io) : CvrStgFile() { read (io) ; } BmpFile::~BmpFile () { delete Palette ; } BmpFile::SUBFORMAT BmpFile::getSubformat () const { return subformat ; } void BmpFile::read (BinaryIO *io) { CvrStgFile::read (io) ; Palette = NULL ; readheaders() ; readdata() ; } void BmpFile::write () { CvrStgFile::write() ; writeheaders() ; writedata() ; } std::list BmpFile::getProperties () const { std::list retval ; // format std::string formatstring ; switch (getSubformat()) { case WIN: formatstring = _("Windows 3.x bitmap") ; break ; case OS2: formatstring = _("OS/2 1.x bitmap") ; break ; } retval.push_back (CvrStgFile::Property (_("format"), formatstring)) ; return retval ; } std::vector BmpFile::getMatchingAlgorithms (Graph* g, Matching* m) const { std::vector retval ; if (getBitCount() == 24) { retval.push_back (new SMDConstructionHeuristic (g, m)) ; } else { retval.push_back (new SMDConstructionHeuristic (g, m)) ; } return retval ; } unsigned long BmpFile::getNumSamples() const { unsigned long retval = 0 ; switch (getSubformat()) { case WIN: { retval = bmih.biWidth * bmih.biHeight ; break ; } case OS2: { retval = bmch.bcWidth * bmch.bcHeight ; break ; } } return retval ; } void BmpFile::replaceSample (const SamplePos pos, const SampleValue* s) { unsigned long index = 0 ; unsigned short firstbit = 0 ; calcIndex (pos, &index, &firstbit) ; unsigned short bitcount = getBitCount() ; switch (bitcount) { case 1: case 4: case 8: { const BmpPaletteSampleValue* sample = dynamic_cast (s) ; myassert (sample) ; for (unsigned short i = 0 ; i < bitcount ; i++) { BitmapData[index] = BitmapData[index] & (~(1 << (firstbit + i))) ; BitmapData[index] = BitmapData[index] | ((sample->getIndex() & (1 << i)) << firstbit) ; } break ; } case 24: { const BmpRGBSampleValue* sample = dynamic_cast (s) ; myassert (sample) ; BitmapData[index] = sample->getBlue() ; BitmapData[index + 1] = sample->getGreen() ; BitmapData[index + 2] = sample->getRed() ; break ; } } } SampleValue *BmpFile::getSampleValue (SamplePos pos) const { unsigned long index = 0 ; unsigned short firstbit = 0 ; calcIndex (pos, &index, &firstbit) ; unsigned short bitcount = getBitCount() ; SampleValue *retval = NULL ; switch (bitcount) { case 1: case 4: case 8: { BYTE idx_pal = 0 ; for (unsigned short i = 0 ; i < bitcount ; i++) { idx_pal |= ((BitmapData[index] & (1 << (firstbit + i))) >> firstbit) ; } retval = (SampleValue*) new BmpPaletteSampleValue (idx_pal) ; break ; } case 24: { retval = (SampleValue*) new BmpRGBSampleValue (BitmapData[index + 2], BitmapData[index + 1], BitmapData[index]) ; break ; } } return retval ; } std::vector BmpFile::calcSVAdjacencyLists (const std::vector& svs) const { if (getBitCount() == 24) { EmbValue m = getEmbValueModulus() ; UWORD32 r = getRadius() ; // create svalists std::vector lists (m) ; for (EmbValue i = 0 ; i < m ; i++) { lists[i] = new SampleValueAdjacencyList (svs.size()) ; } // redmap contains all sample values in a 3-dimensional RGB-tree typedef std::map BlueMap ; typedef std::map GreenMap ; typedef std::map RedMap ; RedMap redmap ; for (std::vector::const_iterator svit = svs.begin() ; svit != svs.end() ; svit++) { BmpRGBSampleValue* rgbsv = (BmpRGBSampleValue*) (*svit) ; redmap[rgbsv->getRed()][rgbsv->getGreen()][rgbsv->getBlue()] = rgbsv ; } // create hemisphere matrix (will contain a discrete hemisphere with radius getRadius()) unsigned short r_eucl = (unsigned short) sqrt (r) ; // the euclidean radius (not squared) - rounded to next lower natural number short hemisphere[2 * r_eucl + 1][2 * r_eucl + 1] ; for (short dr = -r_eucl ; dr <= r_eucl ; dr++) { for (short dg = -r_eucl ; dg <= r_eucl ; dg++) { short db_sq = r_eucl*r_eucl - dr*dr - dg*dg ; if (db_sq >= 0) { // round hemishpere points to next lower natural numbers hemisphere[dr + r_eucl][dg + r_eucl] = (short) sqrt (db_sq) ; } else { hemisphere[dr + r_eucl][dg + r_eucl] = -1 ; } } } // // fill adjacency lists // // create reservoir - for every i reservoir[i] contains the sample values that are neighbourss of // the sample value with label i and have a lower label (and have already been found) // This is necessary to use collapsing trees together with bucket sort (without huge increase in memory usage) std::vector reservoir[svs.size()] ; // neighbours sorted by distance (for the current source sample value) std::vector neighbours_byd[r + 1] ; for (std::vector::const_iterator srcsvit = svs.begin() ; srcsvit != svs.end() ; srcsvit++) { BmpRGBSampleValue* srcsv = (BmpRGBSampleValue*) (*srcsvit) ; // sort reservoir into neighbours_byd for (std::vector::const_iterator it = reservoir[srcsv->getLabel()].begin() ; it != reservoir[srcsv->getLabel()].end() ; it++) { neighbours_byd[srcsv->calcDistance(*it)].push_back (*it) ; } unsigned short r_abs_start = AUtils::bminus (srcsv->getRed(), r_eucl) ; unsigned short r_abs_end = AUtils::bplus (srcsv->getRed(), r_eucl) ; unsigned short g_abs_start = AUtils::bminus (srcsv->getGreen(), r_eucl) ; unsigned short g_abs_end = AUtils::bplus (srcsv->getGreen(), r_eucl) ; RedMap::iterator rit = redmap.lower_bound (r_abs_start) ; while ((rit != redmap.end()) && (rit->first <= r_abs_end)) { GreenMap& greenmap = rit->second ; if (greenmap.empty()) { RedMap::iterator delme = rit ; rit++ ; redmap.erase (delme) ; } else { GreenMap::iterator git = greenmap.lower_bound (g_abs_start) ; while ((git != greenmap.end()) && (git->first <= g_abs_end)) { unsigned short red_index = (rit->first - srcsv->getRed()) + r_eucl ; unsigned short green_index = (git->first - srcsv->getGreen()) + r_eucl ; short delta_b = hemisphere[red_index][green_index] ; if (delta_b < 0) { // this blue map has no sample values in sphere git++ ; } else { BlueMap& bluemap = git->second ; if (bluemap.empty()) { GreenMap::iterator delme = git ; git++ ; greenmap.erase (delme) ; } else { unsigned short b_abs_start = AUtils::bminus (srcsv->getBlue(), delta_b) ; unsigned short b_abs_end = AUtils::bplus (srcsv->getBlue(), delta_b) ; BlueMap::iterator bit = bluemap.lower_bound (b_abs_start) ; while ((bit != bluemap.end()) && (bit->first <= b_abs_end)) { if (srcsv->getLabel() < bit->second->getLabel()) { neighbours_byd[srcsv->calcDistance(bit->second)].push_back (bit->second) ; reservoir[bit->second->getLabel()].push_back (srcsv) ; bit++ ; } else { BlueMap::iterator delme = bit ; bit++ ; bluemap.erase (delme) ; } } git++ ; } } } // end of git loop rit++ ; } } // end of rit loop for (unsigned short d = 0 ; d <= r ; d++) { if (!neighbours_byd[d].empty()) { for (std::vector::const_iterator it = neighbours_byd[d].begin() ; it != neighbours_byd[d].end() ; it++) { (*(lists[(*it)->getEmbeddedValue()]))[srcsv].push_back (*it) ; } neighbours_byd[d].clear() ; } } } // end of svs for loop return lists ; } else { return CvrStgFile::calcSVAdjacencyLists(svs) ; } } void BmpFile::calcIndex (SamplePos pos, unsigned long* index, unsigned short* firstbit) const { unsigned long width = getWidth(), bitcount = getBitCount() ; unsigned long bytesperline_nonpadded = 0 ; if (width * bitcount % 8 == 0) { bytesperline_nonpadded = (width * bitcount) / 8 ; } else { bytesperline_nonpadded = (width * bitcount) / 8 + 1 ; } unsigned long row = pos / width ; pos = pos % width ; unsigned long column = 0 ; switch (bitcount) { case 1: case 4: case 8: { unsigned short samplesperbyte = 8 / bitcount ; column = pos / samplesperbyte ; // to account for the order pixels are stored in one byte: *firstbit = (samplesperbyte - (pos % samplesperbyte) - 1) * bitcount ; myassert (*firstbit < 8) ; } break ; case 24: column = pos * 3 ; *firstbit = 0 ; break ; default: myassert(false) ; break ; } *index = bytesperline_nonpadded * row + column ; } unsigned short BmpFile::getBitCount() const { unsigned short retval = 0 ; switch (getSubformat()) { case WIN: { retval = bmih.biBitCount ; break ; } case OS2: { retval = bmch.bcBitCount ; break ; } } myassert (retval == 1 || retval == 4 || retval == 8 || retval == 24) ; return retval ; } unsigned long BmpFile::getWidth() const { unsigned long retval = 0 ; switch (getSubformat()) { case WIN: retval = bmih.biWidth ; break ; case OS2: retval = bmch.bcWidth ; break ; } return retval ; } unsigned long BmpFile::getHeight() const { unsigned long retval = 0 ; switch (getSubformat()) { case WIN: { retval = bmih.biHeight ; break ; } case OS2: { retval = bmch.bcHeight ; break ; } } return retval ; } ColorPalette *BmpFile::getPalette() const { myassert (getBitCount() != 24) ; myassert (Palette) ; return Palette ; } /* reads the headers of a bmp file from disk */ void BmpFile::readheaders () { try { bmfh.bfType = IdBm ; bmfh.bfSize = getBinIO()->read32_le() ; bmfh.bfReserved1 = getBinIO()->read16_le() ; bmfh.bfReserved2 = getBinIO()->read16_le() ; bmfh.bfOffBits = getBinIO()->read32_le() ; unsigned long tmpSize = getBinIO()->read32_le() ; switch (tmpSize) { case SizeBMINFOHEADER: { // this file is in the Windows bmp format subformat = WIN ; bmpwin_readheaders () ; break ; } case SizeBMCOREHEADER: { // this file is in the OS/2 bmp format subformat = OS2 ; bmpos2_readheaders () ; break ; } default: { if (getBinIO()->is_std()) { throw NotImplementedError (_("the bmp data from standard input has a format that is not supported (biSize: %lu)."), tmpSize) ; } else { throw NotImplementedError (_("the bmp file \"%s\" has a format that is not supported (biSize: %lu)."), getBinIO()->getName().c_str(), tmpSize) ; } break ; } } } catch (BinaryInputError e) { switch (e.getType()) { case BinaryInputError::FILE_ERR: { throw SteghideError (_("an error occured while reading the bmp headers from the file \"%s\"."), getBinIO()->getName().c_str()) ; break ; } case BinaryInputError::FILE_EOF: { throw SteghideError (_("premature end of file \"%s\" while reading bmp headers."), getBinIO()->getName().c_str()) ; break ; } case BinaryInputError::STDIN_ERR: { throw SteghideError (_("an error occured while reading the bmp headers from standard input.")) ; break ; } case BinaryInputError::STDIN_EOF: { throw SteghideError (_("premature end of data from standard input while reading bmp headers.")) ; break ; } } } } void BmpFile::bmpwin_readheaders () { bmih.biSize = SizeBMINFOHEADER ; bmih.biWidth = getBinIO()->read32_le () ; bmih.biHeight = getBinIO()->read32_le () ; bmih.biPlanes = getBinIO()->read16_le () ; myassert (bmih.biPlanes == 1) ; bmih.biBitCount = getBinIO()->read16_le () ; switch (bmih.biBitCount) { case 1: setSamplesPerVertex (SamplesPerVertex_SmallPalette) ; setEmbValueModulus (EmbValueModulus_SmallPalette) ; setRadius (Radius_Palette) ; break ; case 4: setSamplesPerVertex (SamplesPerVertex_SmallPalette) ; setEmbValueModulus (EmbValueModulus_SmallPalette) ; setRadius (Radius_Palette) ; break ; case 8: setSamplesPerVertex (SamplesPerVertex_LargePalette) ; setEmbValueModulus (EmbValueModulus_LargePalette) ; setRadius (Radius_Palette) ; break ; case 24: setSamplesPerVertex (SamplesPerVertex_RGB) ; setEmbValueModulus (EmbValueModulus_RGB) ; setRadius (Radius_RGB) ; break ; default: if (getBinIO()->is_std()) { throw NotImplementedError (_("the bmp data from standard input has a format that is not supported (biBitCount: %d)."), bmih.biBitCount) ; } else { throw NotImplementedError (_("the bmp file \"%s\" has a format that is not supported (biBitCount: %d)."), getBinIO()->getName().c_str(), bmih.biBitCount) ; } break ; } bmih.biCompression = getBinIO()->read32_le () ; if (bmih.biCompression != COMPRESSION_BI_RGB) { if (getBinIO()->is_std()) { throw NotImplementedError (_("the bitmap data from standard input is compressed which is not supported.")) ; } else { throw NotImplementedError (_("the bitmap data in \"%s\" is compressed which is not supported."), getBinIO()->getName().c_str()) ; } } bmih.biSizeImage = getBinIO()->read32_le () ; bmih.biXPelsPerMeter = getBinIO()->read32_le () ; bmih.biYPelsPerMeter = getBinIO()->read32_le () ; bmih.biClrUsed = getBinIO()->read32_le () ; bmih.biClrImportant = getBinIO()->read32_le () ; if (bmih.biBitCount != 24) { /* a color table exists */ Palette = new ColorPalette() ; unsigned int ncolors = 0 ; switch (bmih.biBitCount) { case 1: { if (Args.Command.getValue() == EMBED) { Warning w (_("using a black/white bitmap as cover is very insecure!")) ; w.printMessage() ; } ncolors = 2 ; break ; } case 4: { if (Args.Command.getValue() == EMBED) { Warning w (_("using a 16-color bitmap as cover is very insecure!")) ; w.printMessage() ; } ncolors = 16 ; break ; } case 8: { ncolors = 256 ; break ; } default: { myassert (0) ; break ; } } if (bmih.biClrUsed != 0) { ncolors = bmih.biClrUsed ; } for (unsigned int i = 0 ; i < ncolors ; i++) { unsigned char b = getBinIO()->read8() ; unsigned char g = getBinIO()->read8() ; unsigned char r = getBinIO()->read8() ; if (getBinIO()->read8() != 0) { Warning w (_("maybe corrupted windows bmp data (Reserved in RGBQUAD is non-zero).")) ; w.printMessage() ; } Palette->addEntry(r, g, b) ; } } } void BmpFile::bmpos2_readheaders () { bmch.bcSize = SizeBMCOREHEADER ; bmch.bcWidth = getBinIO()->read16_le () ; bmch.bcHeight = getBinIO()->read16_le () ; bmch.bcPlanes = getBinIO()->read16_le () ; myassert (bmch.bcPlanes == 1) ; bmch.bcBitCount = getBinIO()->read16_le () ; switch (bmch.bcBitCount) { case 1: setSamplesPerVertex (SamplesPerVertex_SmallPalette) ; setEmbValueModulus (EmbValueModulus_SmallPalette) ; setRadius (Radius_Palette) ; break ; case 4: setSamplesPerVertex (SamplesPerVertex_SmallPalette) ; setEmbValueModulus (EmbValueModulus_SmallPalette) ; setRadius (Radius_Palette) ; break ; case 8: setSamplesPerVertex (SamplesPerVertex_LargePalette) ; setEmbValueModulus (EmbValueModulus_LargePalette) ; setRadius (Radius_Palette) ; break ; case 24: setSamplesPerVertex (SamplesPerVertex_RGB) ; setEmbValueModulus (EmbValueModulus_RGB) ; setRadius (Radius_RGB) ; break ; default: if (getBinIO()->is_std()) { throw NotImplementedError (_("the bmp data from standard input has a format that is not supported (bcBitCount: %d)."), bmch.bcBitCount) ; } else { throw NotImplementedError (_("the bmp file \"%s\" has a format that is not supported (bcBitCount: %d)."), getBinIO()->getName().c_str(), bmch.bcBitCount) ; } break ; } if (bmch.bcBitCount != 24) { /* a color table exists */ unsigned int ncolors = 0 ; Palette = new ColorPalette() ; switch (bmch.bcBitCount) { case 1: { if (Args.Command.getValue() == EMBED) { Warning w (_("using a black/white bitmap as cover is very insecure!")) ; w.printMessage() ; } ncolors = 2 ; break ; } case 4: { if (Args.Command.getValue() == EMBED) { Warning w (_("using a 16-color bitmap as cover is very insecure!")) ; w.printMessage() ; } ncolors = 16 ; break ; } case 8: { ncolors = 256 ; break ; } default: { myassert (0) ; break ; } } for (unsigned int i = 0 ; i < ncolors ; i++) { unsigned char b = getBinIO()->read8() ; unsigned char g = getBinIO()->read8() ; unsigned char r = getBinIO()->read8() ; Palette->addEntry (r, g, b) ; } } } /* writes the headers of a bmp file to disk */ void BmpFile::writeheaders () { try { getBinIO()->write16_le (bmfh.bfType) ; getBinIO()->write32_le (bmfh.bfSize) ; getBinIO()->write16_le (bmfh.bfReserved1) ; getBinIO()->write16_le (bmfh.bfReserved2) ; getBinIO()->write32_le (bmfh.bfOffBits) ; switch (getSubformat()) { case WIN: { bmpwin_writeheaders() ; break ; } case OS2: { bmpos2_writeheaders() ; break ; } default: { myassert (0) ; break ; } } } catch (BinaryOutputError e) { switch (e.getType()) { case BinaryOutputError::FILE_ERR: { throw SteghideError (_("an error occured while writing the bmp headers to the file \"%s\"."), getBinIO()->getName().c_str()) ; break ; } case BinaryOutputError::STDOUT_ERR: { throw SteghideError (_("an error occured while writing the bmp headers to standard output.")) ; break ; } } } } void BmpFile::bmpwin_writeheaders () { getBinIO()->write32_le (bmih.biSize) ; getBinIO()->write32_le (bmih.biWidth) ; getBinIO()->write32_le (bmih.biHeight) ; getBinIO()->write16_le (bmih.biPlanes) ; getBinIO()->write16_le (bmih.biBitCount) ; getBinIO()->write32_le (bmih.biCompression) ; getBinIO()->write32_le (bmih.biSizeImage) ; getBinIO()->write32_le (bmih.biXPelsPerMeter) ; getBinIO()->write32_le (bmih.biYPelsPerMeter) ; getBinIO()->write32_le (bmih.biClrUsed) ; getBinIO()->write32_le (bmih.biClrImportant) ; if (Palette != NULL) { for (unsigned int i = 0 ; i < Palette->getSize() ; i++) { getBinIO()->write8 ((*Palette)[i].Blue) ; getBinIO()->write8 ((*Palette)[i].Green) ; getBinIO()->write8 ((*Palette)[i].Red) ; getBinIO()->write8 (0) ; } } } void BmpFile::bmpos2_writeheaders () { getBinIO()->write32_le (bmch.bcSize) ; getBinIO()->write16_le (bmch.bcWidth) ; getBinIO()->write16_le (bmch.bcHeight) ; getBinIO()->write16_le (bmch.bcPlanes) ; getBinIO()->write16_le (bmch.bcBitCount) ; if (Palette != NULL) { for (unsigned int i = 0 ; i < Palette->getSize() ; i++) { getBinIO()->write8 ((*Palette)[i].Blue) ; getBinIO()->write8 ((*Palette)[i].Green) ; getBinIO()->write8 ((*Palette)[i].Red) ; } } } /* returns the number of bytes used to store the pixel data of one scan line */ unsigned long BmpFile::calcLinelength () { unsigned long retval = 0 ; switch (getSubformat()) { case WIN: { if (bmih.biBitCount * bmih.biWidth % 8 == 0) { retval = bmih.biBitCount * bmih.biWidth / 8 ; } else { retval = (bmih.biBitCount * bmih.biWidth / 8) + 1; } break ; } case OS2: { if (bmch.bcBitCount * bmch.bcWidth % 8 == 0) { retval = bmch.bcBitCount * bmch.bcWidth / 8 ; } else { retval = (bmch.bcBitCount * bmch.bcWidth / 8) + 1; } break ; } default: { myassert (0) ; break ; } } return retval ; } /* reads a bmp file from disk into a CVRSTGFILE structure */ void BmpFile::readdata () { try { unsigned long linelength = calcLinelength () ; unsigned long height = getHeight () ; int paddinglength = 0 ; if (linelength % 4 == 0) { paddinglength = 0 ; } else { paddinglength = 4 - (linelength % 4) ; } BitmapData.resize (height * linelength) ; for (unsigned long line = 0 ; line < height ; line++) { for (unsigned long posinline = 0 ; posinline < linelength ; posinline++) { BitmapData[line * linelength + posinline] = getBinIO()->read8() ; } for (int i = 0 ; i < paddinglength ; i++) { if (getBinIO()->read8() != 0) { Warning w (_("maybe corrupted bmp data (padding byte at 0x%lx set to non-zero)."), getBinIO()->getPos() - 1) ; w.printMessage() ; } } } atend.clear() ; while (!getBinIO()->eof()) { atend.push_back (getBinIO()->read8()) ; } } catch (BinaryInputError e) { switch (e.getType()) { case BinaryInputError::FILE_ERR: { throw SteghideError (_("an error occured while reading the bmp data from the file \"%s\"."), getBinIO()->getName().c_str()) ; break ; } case BinaryInputError::FILE_EOF: { throw SteghideError (_("premature end of file \"%s\" while reading bmp data."), getBinIO()->getName().c_str()) ; break ; } case BinaryInputError::STDIN_ERR: { throw SteghideError (_("an error occured while reading the bmp data from standard input.")) ; break ; } case BinaryInputError::STDIN_EOF: { throw SteghideError (_("premature end of bmp data from standard input.")) ; break ; } } } } void BmpFile::writedata () { try { unsigned long linelength = calcLinelength () ; unsigned long height = getHeight () ; unsigned int paddinglength = 0 ; if (linelength % 4 == 0) { paddinglength = 0 ; } else { paddinglength = 4 - (linelength % 4) ; } for (unsigned long line = 0 ; line < height ; line++) { for (unsigned long posinline = 0 ; posinline < linelength ; posinline++) { getBinIO()->write8 (BitmapData[line * linelength + posinline]) ; } // write padding bytes for (unsigned int i = 0 ; i < paddinglength ; i++) { getBinIO()->write8 (0) ; } } for (std::vector::iterator i = atend.begin() ; i != atend.end() ; i++) { getBinIO()->write8 (*i) ; } } catch (BinaryOutputError e) { switch (e.getType()) { case BinaryOutputError::FILE_ERR: { throw SteghideError (_("an error occured while writing the bitmap data to the file \"%s\"."), getBinIO()->getName().c_str()) ; break ; } case BinaryOutputError::STDOUT_ERR: { throw SteghideError (_("an error occured while writing the bitmap data to standard output.")) ; break ; } } } } steghide-0.5.1/src/BmpPaletteSampleValue.cc0000644000076400001440000000406007735577226014310 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "BmpFile.h" #include "BmpPaletteSampleValue.h" #include "ColorPalette.h" BmpPaletteSampleValue::BmpPaletteSampleValue (unsigned char i) : BmpSampleValue(), Index(i) { const BmpFile* bmpfile = dynamic_cast (Globs.TheCvrStgFile) ; myassert (bmpfile) ; Palette = bmpfile->getPalette() ; Key = ((unsigned long) getIndex() << 24) | ((unsigned long) getRed() << 16) | ((unsigned long) getGreen() << 8) | ((unsigned long) getBlue()) ; EValue = calcEValue(getIndex()) ; } SampleValue* BmpPaletteSampleValue::getNearestTargetSampleValue (EmbValue t) const { BmpPaletteSampleValue* sv_mindist = NULL ; UWORD32 mindist = UWORD32_MAX ; for (unsigned int i = 0 ; i < Palette->getSize() ; i++) { if (calcEValue(i) == t) { BmpPaletteSampleValue* destsv = new BmpPaletteSampleValue (i) ; UWORD32 curdist = calcDistance (destsv) ; if (curdist < mindist) { delete sv_mindist ; sv_mindist = destsv ; mindist = curdist ; } else { delete destsv ; } } } myassert (sv_mindist != NULL) ; return ((SampleValue*) sv_mindist) ; } std::string BmpPaletteSampleValue::getName () const { char buf[128] ; sprintf (buf, "i%ur%ug%ub%u", getIndex(), getRed(), getGreen(), getBlue()) ; return std::string (buf) ; } steghide-0.5.1/src/BmpSampleValue.cc0000644000076400001440000000264407735577226012777 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "BmpSampleValue.h" #include "common.h" UWORD32 BmpSampleValue::calcDistance (const SampleValue *s) const { const BmpSampleValue *sample = (const BmpSampleValue*) s ; /* If s is not a BmpSampleValue then we get into real trouble here. But calcDistance is called very often, a dynamic_cast costs a lot of time and it does not make sense to pass anything but a BmpSampleValue as s anyway. */ int dr = (int) getRed() - (int) sample->getRed() ; int dg = (int) getGreen() - (int) sample->getGreen() ; int db = (int) getBlue() - (int) sample->getBlue() ; return (UWORD32) (dr*dr + dg*dg + db*db) ; } steghide-0.5.1/src/MCryptPP.cc0000644000076400001440000002163607736001005011554 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #ifdef USE_LIBMCRYPT #include #include #include #include #include #include "BitString.h" #include "EncryptionAlgorithm.h" #include "EncryptionMode.h" #include "MCryptPP.h" #include "MHashKeyGen.h" #include "error.h" MCryptPP::MCryptPP () { ModuleOpen = false ; } MCryptPP::MCryptPP (EncryptionAlgorithm a, EncryptionMode m) { open (a, m) ; } MCryptPP::~MCryptPP () { if (ModuleOpen) { close() ; } } void MCryptPP::open (EncryptionAlgorithm a, EncryptionMode m) { std::string tmp1 = a.getStringRep(), tmp2 = m.getStringRep() ; char algo[tmp1.size() + 1], mode[tmp2.size() + 1] ; strcpy (algo, tmp1.c_str()) ; strcpy (mode, tmp2.c_str()) ; if ((MCryptD = mcrypt_module_open (algo, MCRYPTPP_LIBDIR, mode, MCRYPTPP_LIBDIR)) == MCRYPT_FAILED) { throw SteghideError (_("could not open libmcrypt module \"%s\",\"%s\"."), algo, mode) ; } ModuleOpen = true ; } void MCryptPP::close () { mcrypt_module_close (MCryptD) ; ModuleOpen = false ; } BitString MCryptPP::encrypt (BitString p, std::string pp) { p.padRandom (8 * mcrypt_enc_get_block_size (MCryptD)) ; // blocksize is 1 for stream algorithms std::vector ciphertext = _encrypt (p.getBytes(), pp) ; return BitString (ciphertext) ; } BitString MCryptPP::decrypt (BitString c, std::string pp) { myassert (c.getLength() % (8 * mcrypt_enc_get_block_size (MCryptD)) == 0) ; std::vector plaintext = _decrypt (c.getBytes(), pp) ; return BitString (plaintext) ; } void* MCryptPP::createKey (std::string pp) { unsigned int keysize = mcrypt_enc_get_key_size (MCryptD) ; MHashKeyGen keygen (KEYGEN_MCRYPT, MHASH_MD5, keysize) ; std::vector key = keygen.createKey (pp) ; unsigned char *retval = (unsigned char *) s_malloc (keysize) ; for (unsigned int i = 0 ; i < keysize ; i++) { retval[i] = key[i] ; } return retval ; } std::vector MCryptPP::_encrypt (std::vector p, std::string pp) { // genereate key and IV (if needed) void *key = createKey (pp) ; unsigned char *IV = NULL ; if (mcrypt_enc_mode_has_iv (MCryptD)) { unsigned int ivsize = mcrypt_enc_get_iv_size (MCryptD) ; std::vector rndIV = RndSrc.getBytes (ivsize) ; IV = (unsigned char *) s_malloc (ivsize) ; for (unsigned int i = 0 ; i < ivsize ; i++) { IV[i] = rndIV[i] ; } } // initialize libmcrypt thread unsigned int keysize = mcrypt_enc_get_key_size (MCryptD) ; int err = -1 ; if ((err = mcrypt_generic_init (MCryptD, key, keysize, IV)) < 0) { mcrypt_perror (err) ; throw SteghideError (_("could not initialize libmcrypt encryption. see above error messages if any.")) ; } // copy plaintext unsigned int plntextlen = p.size() ; myassert (plntextlen % mcrypt_enc_get_block_size (MCryptD) == 0) ; unsigned char *plntext = (unsigned char *) s_malloc (plntextlen) ; for (unsigned int i = 0 ; i < plntextlen ; i++) { plntext[i] = p[i] ; } // encrypt plaintext if (mcrypt_generic (MCryptD, plntext, plntextlen) != 0) { throw SteghideError (_("could not encrypt data.")) ; } // create the return value std::vector retval ; unsigned int i = 0 ; if (mcrypt_enc_mode_has_iv (MCryptD)) { unsigned int ivsize = mcrypt_enc_get_iv_size (MCryptD) ; retval = std::vector (ivsize + plntextlen) ; for ( ; i < ivsize ; i++) { retval[i] = IV[i] ; } } else { retval = std::vector (plntextlen) ; } for (unsigned int j = 0 ; j < plntextlen ; i++, j++) { retval[i] = plntext[j] ; } // clean up if (mcrypt_generic_deinit (MCryptD) < 0) { throw SteghideError (_("could not finish libmcrypt encryption.")) ; } free (plntext) ; free (key) ; if (mcrypt_enc_mode_has_iv (MCryptD)) { free (IV) ; } return retval ; } std::vector MCryptPP::_decrypt (std::vector c, std::string pp) { // generate key void *key = createKey (pp) ; unsigned char *IV = NULL ; unsigned int cstart = 0 ; if (mcrypt_enc_mode_has_iv (MCryptD)) { unsigned int ivsize = mcrypt_enc_get_iv_size (MCryptD) ; IV = (unsigned char *) s_malloc (ivsize) ; for (unsigned int i = 0 ; i < ivsize ; i++) { IV[i] = c[i] ; } cstart = ivsize ; } // initialize libmcrypt thread unsigned int keysize = mcrypt_enc_get_key_size (MCryptD) ; int err = -1 ; if ((err = mcrypt_generic_init (MCryptD, key, keysize, IV)) < 0) { mcrypt_perror (err) ; throw SteghideError (_("could not initialize libmcrypt decryption. see above error messages if any.")) ; } // copy ciphertext unsigned long ciphertextlen = c.size() - cstart ; myassert (ciphertextlen % mcrypt_enc_get_block_size (MCryptD) == 0) ; unsigned char *ciphertext = (unsigned char *) s_malloc (ciphertextlen) ; for (unsigned int i = 0 ; i < ciphertextlen ; i++) { ciphertext[i] = c[cstart + i] ; } // decrypt ciphertext if (mdecrypt_generic (MCryptD, ciphertext, ciphertextlen) != 0) { throw SteghideError (_("could not decrypt data.")) ; } // create return value std::vector retval (ciphertextlen) ; for (unsigned int i = 0 ; i < ciphertextlen ; i++) { retval[i] = ciphertext[i] ; } // clean up if (mcrypt_generic_deinit (MCryptD) < 0) { throw SteghideError (_("could not finish libmcrypt decryption.")) ; } free (ciphertext) ; free (key) ; if (mcrypt_enc_mode_has_iv (MCryptD)) { free (IV) ; } return retval ; } EncryptionAlgorithm MCryptPP::getAlgorithm () const { myassert (ModuleOpen) ; char *name = mcrypt_enc_get_algorithms_name (MCryptD) ; return EncryptionAlgorithm (name) ; } EncryptionMode MCryptPP::getMode () const { myassert (ModuleOpen) ; char *name = mcrypt_enc_get_modes_name (MCryptD) ; return EncryptionMode (name) ; } unsigned long MCryptPP::getEncryptedSize (EncryptionAlgorithm a, EncryptionMode m, unsigned long plnsize) { unsigned long retval = 0 ; if (a.getIntegerRep() == EncryptionAlgorithm::NONE) { retval = plnsize ; } else { std::string tmp1 = a.getStringRep(), tmp2 = m.getStringRep() ; char algo[tmp1.size() + 1], mode[tmp2.size() + 1] ; strcpy (algo, tmp1.c_str()) ; strcpy (mode, tmp2.c_str()) ; MCRYPT td ; if ((td = mcrypt_module_open (algo, MCRYPTPP_LIBDIR, mode, MCRYPTPP_LIBDIR)) == MCRYPT_FAILED) { throw SteghideError (_("could not open libmcrypt module \"%s\",\"%s\"."), algo, mode) ; } if (mcrypt_enc_mode_has_iv (td)) { retval += (8 * mcrypt_enc_get_iv_size(td)) ; } unsigned long blocks = 0 ; const unsigned long blocksize = 8 * mcrypt_enc_get_block_size(td) ; // is 1 for stream algorithms if (plnsize % blocksize == 0) { blocks = plnsize / blocksize ; } else { blocks = (plnsize / blocksize) + 1; } retval += (blocks * blocksize) ; mcrypt_module_close (td) ; } return retval ; } std::vector MCryptPP::getListAlgorithms () { int size = 0 ; char **list = mcrypt_list_algorithms (MCRYPTPP_LIBDIR, &size) ; /** * There is a bug in libmcrypt, at least in version 2.5.5 that has the * effect that the algorithm list contains every algorithm twice. **/ std::vector retval ; for (int i = 0 ; i < size ; i++) { if ((i == 0) || (strcmp(list[i], list[i - 1]) != 0)) { // workaround for the bug mentioned above retval.push_back (std::string (list[i])) ; } } mcrypt_free_p (list, size) ; return retval ; } std::vector MCryptPP::getListModes () { int size = 0 ; char **list = mcrypt_list_modes (MCRYPTPP_LIBDIR, &size) ; std::vector retval ; for (int i = 0 ; i < size ; i++) { retval.push_back (std::string (list[i])) ; } mcrypt_free_p (list, size) ; return retval ; } bool MCryptPP::AlgoSupportsMode (EncryptionAlgorithm a, EncryptionMode m) { std::string tmp1 = a.getStringRep(), tmp2 = m.getStringRep() ; char algo[tmp1.size() + 1], mode[tmp2.size() + 1] ; strcpy (algo, tmp1.c_str()) ; strcpy (mode, tmp2.c_str()) ; return (mcrypt_module_is_block_algorithm (algo, MCRYPTPP_LIBDIR) == mcrypt_module_is_block_algorithm_mode (mode, MCRYPTPP_LIBDIR)) ; } void *MCryptPP::s_malloc (size_t size) { void *retval = NULL ; if ((retval = malloc (size)) == NULL) { throw SteghideError (_("could not allocate memory.")) ; } return retval ; } #endif // def USE_LIBMCRYPT steghide-0.5.1/src/BmpRGBSampleValue.h0000644000076400001440000000521507735577226013171 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BMPRGBSAMPLEVALUE_H #define SH_BMPRGBSAMPLEVALUE_H #include "BmpSampleValue.h" #include "RGBTriple.h" #include "common.h" /** * \class BmpRGBSampleValue * \brief a sample in a bmp rgb (i.e. 24-bit) file **/ class BmpRGBSampleValue : public BmpSampleValue { public: BmpRGBSampleValue (BYTE r, BYTE g, BYTE b) ; BmpRGBSampleValue (RGBTriple t) ; UWORD32 calcDistance (const SampleValue *s) const ; SampleValue* getNearestTargetSampleValue (EmbValue t) const ; std::string getName (void) const ; BYTE getRed (void) const { return Color.Red ; } ; BYTE getGreen (void) const { return Color.Green ; } ; BYTE getBlue (void) const { return Color.Blue ; } ; private: RGBTriple Color ; UWORD32 calcKey (const RGBTriple& rgb) const { return (((UWORD32) rgb.Red << 16) | ((UWORD32) rgb.Green << 8) | ((UWORD32) rgb.Blue)) ;} ; EmbValue calcEValue (const RGBTriple& rgb) const // { /* for Modulus 8 */ return ((EmbValue) (((rgb.Red & 1) << 2) | ((rgb.Green & 1) << 1) | (rgb.Blue & 1))) ; } ; { /* for Modulus 4 */ return ((EmbValue) ((((rgb.Red & 1) ^ (rgb.Green & 1)) << 1) | ((rgb.Red & 1) ^ (rgb.Blue & 1)))) ; } ; enum COLOR { RED, GREEN, BLUE } ; enum DIRECTION { UP, DOWN } ; /** * add the BYTEs a and b * \return min(255, a + b) **/ BYTE plus (BYTE a, BYTE b) const ; /** * substract the BYTE b from the BYTE a * \return max(0, a - b) **/ BYTE minus (BYTE a, BYTE b) const ; /** * add candidates for the nearest target sample value * \param cands the candidates vector * \param cube the color values describing the current search cube * \param fc the fixed color * \param fd the fixed side of the fixed color **/ void addNTSVCandidates (std::vector& cands, const BYTE cube[3][2], COLOR fc, DIRECTION fd, COLOR i1, COLOR i2, EmbValue t) const ; } ; #endif // ndef SH_BMPRGBSAMPLEVALUE_H steghide-0.5.1/src/gettext.h0000644000076400001440000000575107735577226011452 /* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # define gettext(Msgid) ((const char *) (Msgid)) # define dgettext(Domainname, Msgid) ((const char *) (Msgid)) # define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define textdomain(Domainname) ((const char *) (Domainname)) # define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) # define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String #endif /* _LIBGETTEXT_H */ steghide-0.5.1/src/EmbData.h0000644000076400001440000000744607736016325011253 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_EMBDATA_H #define SH_EMBDATA_H #include #include #include "common.h" #include "BitString.h" #include "EncryptionAlgorithm.h" #include "EncryptionMode.h" class EmbData { public: enum MODE { EMBED, EXTRACT } ; enum STATE { READ_MAGIC, READ_VERSION, READ_ENCINFO, READ_NPLAINBITS, READ_ENCRYPTED, END } ; /** * construct a new EmbData object * \param m the mode (EMBED or EXTRACT) * \param pp the passphrase * \param fn the filename (only need for mode EMBED) **/ EmbData (MODE m, std::string pp, std::string fn = "") ; BitString getBitString (void) ; bool finished (void) ; /** * get the minimum length of the BitString that is to be passed to addBits **/ unsigned long getNumBitsRequested (void) ; void addBits (BitString addbits) ; void setEncAlgo (EncryptionAlgorithm a) ; EncryptionAlgorithm getEncAlgo (void) const ; void setEncMode (EncryptionMode m) ; EncryptionMode getEncMode (void) const ; void setCompression (int c) ; int getCompression (void) const ; void setChecksum (bool c) ; bool getChecksum (void) const ; /** * check if crc32 checksum is ok (needs filled Data and CRC32 fields) * \return true iff checksum is ok **/ bool checksumOK (void) const ; void setData (const std::vector data) { Data = data ; } ; std::vector getData (void) const { return Data ; } ; std::string getFileName (void) const { return FileName ; } ; /// the minimum size of the part of the generatred BitString that is not the data static const unsigned int MinStegoHeaderSize = 50 ; protected: std::string stripDir (std::string s) ; private: /// number of bits used to code the number of plain bits static const unsigned int NBitsNPlainBits = 32 ; /// number of bits used to code the number of uncompressed bits static const unsigned int NBitsNUncompressedBits = 32 ; /// size of a crc32 checksum in bits static const unsigned int NBitsCrc32 = 32 ; /// version of this steghide embedding (stego compatibility of EmbData) static const unsigned short CodeVersion = 0 ; /// steghide magic to recognize embedded data (the string "shm") static const UWORD32 Magic = 0x73688DUL ; /// size (in bits of Magic) static const unsigned int NBitsMagic = 24 ; MODE Mode ; STATE State ; unsigned long NPlainBits ; /// the number of bits that the caller must at least supply to addBits unsigned long NumBitsRequested ; /// exactly the number of bits that the next step will consume from Reservoir and addBits together unsigned long NumBitsNeeded ; BitString Reservoir ; std::string Passphrase ; /// version read from input bitstring unsigned short Version ; EncryptionAlgorithm EncAlgo ; EncryptionMode EncMode ; /// compression level: 0(none),1(best speed),...,9(best compression) int Compression ; /// will a checksum be embedded ? bool Checksum ; /// the checksum unsigned long CRC32 ; std::string FileName ; /// contains the actual message to be embedded std::vector Data ; } ; #endif // ndef SH_EMBDATA_H steghide-0.5.1/src/WavFormatChunk.h0000644000076400001440000000315307735577226012657 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_WAVFORMATCHUNK_H #define SH_WAVFORMATCHUNK_H #include "common.h" #include "WavChunk.h" class BinaryIO ; class WavFormatChunk : public WavChunk { public: WavFormatChunk (void) : WavChunk() {} ; WavFormatChunk (WavChunkHeader *chh) : WavChunk(chh) {} ; WavFormatChunk (WavChunkHeader *chh, BinaryIO *io) : WavChunk(chh) { read(io) ; } ; void read (BinaryIO *io) ; void write (BinaryIO *io) ; UWORD16 getFormatTag (void) const { return FormatTag ; } ; UWORD16 getBitsPerSample (void) const { return BitsPerSample ; } ; static const UWORD16 FormatPCM = 0x0001 ; private: UWORD16 FormatTag ; UWORD16 Channels ; UWORD32 SamplesPerSec ; UWORD32 AvgBytesPerSec ; UWORD16 BlockAlign ; UWORD16 BitsPerSample ; UWORD16 AdditionalSize ; } ; #endif // ndef SH_WAVCHUNKFORMAT_H steghide-0.5.1/src/msg.cc0000644000076400001440000001074407735577226010710 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include #include "common.h" #include "msg.h" #include "Terminal.h" // // class MessageBase // MessageBase::MessageBase () { setMessage (std::string(_("__no_message_defined__"))) ; setNewline (true) ; } MessageBase::MessageBase (std::string msg) { setMessage (msg) ; setNewline (true) ; } MessageBase::MessageBase (const char *msgfmt, ...) { va_list ap ; va_start (ap, msgfmt) ; setMessage (msgfmt, ap) ; va_end (ap) ; setNewline (true) ; } void MessageBase::setMessage (const char *msgfmt, ...) { va_list ap ; va_start (ap, msgfmt) ; setMessage (vcompose (msgfmt, ap)) ; va_end (ap) ; } std::string MessageBase::compose (const char *msgfmt, ...) const { va_list ap ; va_start (ap, msgfmt) ; std::string retval = vcompose (msgfmt, ap) ; va_end (ap) ; return retval ; } std::string MessageBase::vcompose (const char *msgfmt, va_list ap) const { char *str = new char[MsgMaxSize] ; vsnprintf (str, MsgMaxSize, msgfmt, ap) ; std::string retval (str) ; delete[] str ; return retval ; } // // class Message // Message::Message (const char *msgfmt, ...) : MessageBase() { va_list ap ; va_start (ap, msgfmt) ; setMessage (vcompose (msgfmt, ap)) ; va_end (ap) ; } void Message::printMessage () const { if (Args.Verbosity.getValue() == NORMAL || Args.Verbosity.getValue() == VERBOSE) { std::cerr << getMessage() << getNewline() ; } } // // class VerboseMessage // VerboseMessage::VerboseMessage (const char *msgfmt, ...) : MessageBase() { va_list ap ; va_start (ap, msgfmt) ; setMessage (vcompose (msgfmt, ap)) ; va_end (ap) ; setNewline (true) ; } void VerboseMessage::printMessage () const { if (Args.Verbosity.getValue() == VERBOSE) { std::cerr << getMessage() << getNewline() ; } } // // class Warning // Warning::Warning (const char *msgfmt, ...) : MessageBase() { va_list ap ; va_start (ap, msgfmt) ; setMessage (vcompose (msgfmt, ap)) ; va_end (ap) ; } void Warning::printMessage () const { if (Args.Verbosity.getValue() != QUIET) { std::cerr << "steghide: " << _("warning:") << " " << getMessage() << getNewline() ; } } // // class CriticalWarning // CriticalWarning::CriticalWarning (const char *msgfmt, ...) : MessageBase() { va_list ap ; va_start (ap, msgfmt) ; setMessage (vcompose (msgfmt, ap)) ; va_end (ap) ; } void CriticalWarning::printMessage () const { std::cerr << "steghide: " << _("warning:") << " " << getMessage() << getNewline() ; } // // class Question // Question::Question (void) : MessageBase() { yeschar = std::string (_("y")) ; nochar = std::string (_("n")) ; } Question::Question (std::string msg) : MessageBase (msg) { yeschar = std::string (_("y")) ; nochar = std::string (_("n")) ; } Question::Question (const char *msgfmt, ...) : MessageBase() { yeschar = std::string (_("y")) ; nochar = std::string (_("n")) ; va_list ap ; va_start (ap, msgfmt) ; setMessage (vcompose (msgfmt, ap)) ; va_end (ap) ; } void Question::printMessage () const { #ifndef HAVE_TERMIOS_H Warning w (_("unknown terminal. you might need to press after answering.")) ; w.printMessage() ; #endif std::cerr << getMessage() << " (" << yeschar << "/" << nochar << ") " ; } bool Question::getAnswer () { Terminal term ; term.SingleKeyOn() ; char input[2] ; input[0] = std::cin.get() ; input[1] = '\0' ; bool retval = (std::string (input) == yeschar) ; term.reset() ; std::cerr << std::endl ; return retval ; } // // debugging output // #ifdef DEBUG void printDebug (unsigned short level, const char *msgfmt, ...) { if (RUNDEBUGLEVEL(level)) { va_list ap ; va_start (ap, msgfmt) ; vfprintf (stderr, msgfmt, ap) ; va_end (ap) ; fprintf (stderr, "\n") ; } } #endif steghide-0.5.1/src/JpegSampleValue.cc0000644000076400001440000000501507735577226013141 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include "common.h" #include "JpegSampleValue.h" JpegSampleValue::JpegSampleValue (int c) : SampleValue(), DctCoeff (c) { Key = (UWORD32) DctCoeff ; EValue = calcEValue (DctCoeff) ; } SampleValue *JpegSampleValue::getNearestTargetSampleValue (EmbValue t) const { SWORD16 minvalue = 0, maxvalue = 0 ; if (DctCoeff > 0) { minvalue = 1 ; maxvalue = SWORD16_MAX ; } else if (DctCoeff < 0) { minvalue = SWORD16_MIN ; maxvalue = -1 ; } else { myassert(false) ; } SWORD16 dctc_up = DctCoeff, dctc_down = DctCoeff, dctc_new = 0 ; bool found = false ; do { if (dctc_up < maxvalue) { dctc_up++ ; } if (dctc_down > minvalue) { dctc_down-- ; } if (calcEValue(dctc_up) == t && calcEValue(dctc_down) == t) { if (RndSrc.getBool()) { dctc_new = dctc_up ; } else { dctc_new = dctc_down ; } found = true ; } else if (calcEValue(dctc_up) == t) { dctc_new = dctc_up ; found = true ; } else if (calcEValue(dctc_down) == t) { dctc_new = dctc_down ; found = true ; } } while (!found) ; return ((SampleValue *) new JpegSampleValue (dctc_new)) ; } UWORD32 JpegSampleValue::calcDistance (const SampleValue *s) const { const JpegSampleValue *sample = (const JpegSampleValue*) s ; /* If s is not a JpegSampleValue then we get into real trouble here. But calcDistance is called very often, a dynamic_cast costs a lot of time and it does not make sense to pass anything but a JpegSampleValue as s anyway. */ int d = DctCoeff - sample->DctCoeff ; return ((d >= 0) ? ((UWORD32) d) : ((UWORD32) -d)) ; } std::string JpegSampleValue::getName (void) const { char buf[128] ; sprintf (buf, "%d", DctCoeff) ; return std::string (buf) ; } steghide-0.5.1/src/SampleValue.h0000644000076400001440000001240607735577226012177 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_SAMPLEVALUE_H #define SH_SAMPLEVALUE_H #include #include "common.h" #include "wrapper_hash_set.h" class CvrStgFile ; /** * \class SampleValue * \brief the value of a sample in a CvrStgFile * * This is the abstract base class for all AuSampleValue, BmpSampleValue, etc. classes * * For two sample values s1 and s2: * * s1->calcDistance(s2) == s2->calcDistance(s1) is always true. * * s1->isNeighbour(s2) == s2->isNeighbour(s1) is always true. * * s1 and s2 are called opposite if s1->getBit() != s2->getBit() * * s1 and s2 are called neighbours if s1->isNeighbour(s2) is true * * s1->getKey() == s2->getKey() iff s1 == s2 * * s1 == s2 implies s1->getDistance(s2) == 0 * BUT: s1->getDistance(s2) == 0 does not imply s1 == s2 * example: 8-bit bmp palette image - same color value for two different indices * * s1 == s2 implies s1->getBit() == s2->getBit() * * s1->getDistance(s2) == 0 implies s1->getBit() == s2->getBit() * * NOTE: SampleValue and all derived classes rely on the Globals object * pointed to by the Globs pointer. This means that it must be set correctly * before using any method of a SampleValue (or derived) object. **/ class SampleValue { public: SampleValue (void) ; virtual ~SampleValue (void) ; /** * get the nearest (with the least distance to this sample value) sample value whose * embedded value equals the specified target * \param t the target embedded value * * If two or more target sample values have equal distance each of them should be * returned with equal probability. * * The returned SampleValue object should be deleted by the callser. **/ virtual SampleValue* getNearestTargetSampleValue (EmbValue t) const = 0 ; /** * calculate the distance between the sample value s and this sample value * \param s a sample value of the same type as this * \return the distance **/ virtual UWORD32 calcDistance (const SampleValue *s) const = 0 ; /** * return a short name uniquely identifying this sample value **/ virtual std::string getName (void) const = 0 ; /** * is the sample value s a neighbour of this sample value ? * \return true iff this and s are neighbours * * This is implemented as (calcDistance() <= Radius) but may be overridden by * derived classes. **/ virtual bool isNeighbour (const SampleValue* s) const ; /** * get the value that is embedded in this sample value (must be >=0 and { bool operator() (const SampleValue* s1, const SampleValue *s2) const { return (*s1 == *s2) ; } } ; struct SampleValuesLess : public std::binary_function { bool operator() (const SampleValue* s1, const SampleValue *s2) const { return (*s1 < *s2) ; } } ; struct SampleValueHash : public std::unary_function { size_t operator() (const SampleValue* s) const { sgi::hash h ; return h(s->getKey()) ; } } ; #endif // ndef SH_CVRSTGSAMPLE_H steghide-0.5.1/src/AuFile.cc0000644000076400001440000001317007735577226011263 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include #include "AuData.h" #include "AuFile.h" #include "AuSampleValues.h" #include "CvrStgFile.h" #include "CvrStgObject.h" #include "DFSAPHeuristic.h" #include "SMDConstructionHeuristic.h" #include "common.h" #include "error.h" AuFile::AuFile (BinaryIO *io) : CvrStgFile() { setSamplesPerVertex (SamplesPerVertex) ; setEmbValueModulus (EmbValueModulus) ; read (io) ; } AuFile::~AuFile (void) { delete Data ; } void AuFile::read (BinaryIO *io) { CvrStgFile::read (io) ; try { Header.id[0] = '.' ; Header.id[1] = 's' ; Header.id[2] = 'n' ; Header.id[3] = 'd' ; // read header Header.offset = getBinIO()->read32_be() ; Header.size = getBinIO()->read32_be() ; UWORD32 encoding = getBinIO()->read32_be() ; Header.samplerate = getBinIO()->read32_be() ; Header.channels = getBinIO()->read32_be() ; // read infofield unsigned long leninfofield = Header.offset - AuHeader::HeaderSize ; if (leninfofield > 0) { Infofield.resize (leninfofield) ; for (unsigned long i = 0 ; i < leninfofield ; i++) { Infofield[i] = getBinIO()->read8() ; } } // read data switch (encoding) { case MULAW8: setRadius (Radius_MuLaw8) ; Data = new AuMuLawAudioData (this) ; break ; case PCM8: setRadius (Radius_PCM8) ; Data = new AuPCM8AudioData (this) ; break ; case PCM16: setRadius (Radius_PCM16) ; Data = new AuPCM16AudioData (this) ; break ; default: if (getBinIO()->is_std()) { throw NotImplementedError (_("the au file on standard input uses the unkown encoding %d."), encoding) ; } else { throw NotImplementedError (_("the au file \"%s\" uses the unknown encoding %d."), getBinIO()->getName().c_str(), encoding) ; } break ; } ; Header.encoding = (ENCODING) encoding ; } catch (BinaryInputError e) { switch (e.getType()) { case BinaryInputError::FILE_ERR: { throw SteghideError (_("an error occured while reading the au headers from the file \"%s\"."), getBinIO()->getName().c_str()) ; break ; } case BinaryInputError::FILE_EOF: { throw SteghideError (_("premature end of file \"%s\" while reading au headers."), getBinIO()->getName().c_str()) ; break ; } case BinaryInputError::STDIN_ERR: { throw SteghideError (_("an error occured while reading the au headers from standard input.")) ; break ; } case BinaryInputError::STDIN_EOF: { throw SteghideError (_("premature end of data from standard input while reading au headers.")) ; break ; } } } // if available, use size of audio data, else read until eof unsigned long n = AudioData::NoLimit ; if (Header.size != AuHeader::SizeUnknown) { myassert (Header.size % Header.getBytesPerSample() == 0) ; n = Header.size / Header.getBytesPerSample() ; } Data->read (getBinIO(), n) ; } void AuFile::write () { CvrStgFile::write() ; try { // write header getBinIO()->write8 (Header.id[0]) ; getBinIO()->write8 (Header.id[1]) ; getBinIO()->write8 (Header.id[2]) ; getBinIO()->write8 (Header.id[3]) ; getBinIO()->write32_be (Header.offset) ; getBinIO()->write32_be (Header.size) ; getBinIO()->write32_be ((UWORD32) Header.encoding) ; getBinIO()->write32_be (Header.samplerate) ; getBinIO()->write32_be (Header.channels) ; // write infofield for (unsigned long i = 0 ; i < Infofield.size() ; i++) { getBinIO()->write8 (Infofield[i]) ; } } catch (BinaryOutputError e) { switch (e.getType()) { case BinaryOutputError::FILE_ERR: { throw SteghideError (_("an error occured while writing the au headers to the file \"%s\"."), getBinIO()->getName().c_str()) ; break ; } case BinaryOutputError::STDOUT_ERR: { throw SteghideError (_("an error occured while writing the au headers to standard output.")) ; break ; } } } Data->write (getBinIO(), AudioData::NoLimit) ; } std::list AuFile::getProperties () const { std::list retval ; // format std::string formatstring = "au audio" ; switch (Header.encoding) { case MULAW8: formatstring += _(", mu-law encoding") ; break ; case PCM8: case PCM16: formatstring += _(", PCM encoding") ; break ; } retval.push_back (CvrStgFile::Property (_("format"), formatstring)) ; return retval ; } unsigned short AuFile::AuHeader::getBytesPerSample () const { unsigned short retval = 0 ; switch (encoding) { case MULAW8: retval = 1 ; break ; case PCM8: retval = 1 ; break ; case PCM16: retval = 2 ; break ; default: myassert(0) ; break ; } return retval ; } std::vector AuFile::getMatchingAlgorithms (Graph* g, Matching* m) const { std::vector retval ; retval.push_back (new SMDConstructionHeuristic (g, m)) ; retval.push_back (new DFSAPHeuristic (g, m)) ; return retval ; } steghide-0.5.1/src/SampleValue.cc0000644000076400001440000000376607735577226012346 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include "SampleValue.h" #include "CvrStgFile.h" SampleValue::SampleValue () : Label(0) { NumEdges = new UWORD32[Globs.TheCvrStgFile->getEmbValueModulus()] ; } SampleValue::~SampleValue () { delete[] NumEdges ; } void SampleValue::incNumEdges (EmbValue t) { NumEdges[t]++ ; } void SampleValue::decNumEdges (EmbValue t) { myassert (NumEdges[t] > 0) ; NumEdges[t]-- ; } bool SampleValue::isNeighbour (const SampleValue *s) const { #ifdef DEBUG printDebug (5, "SampleValue::isNeighbour: Distance: %lu, Radius: %lu\n", calcDistance(s), Globs.TheCvrStgFile->getRadius()) ; #endif return (calcDistance (s) <= Globs.TheCvrStgFile->getRadius()) ; } void SampleValue::print (unsigned short spc) const { char* space = new char[spc + 1] ; for (unsigned short i = 0 ; i < spc ; i++) { space[i] = ' ' ; } space[spc] = '\0' ; std::cerr << space << "SampleValue:" << std::endl ; std::cerr << space << " Label: " << getLabel() << std::endl ; std::cerr << space << " Name: " << getName() << std::endl ; std::cerr << space << " Key(hex): " << std::hex << getKey() << std::dec << std::endl ; std::cerr << space << " EValue: " << (unsigned int) getEmbeddedValue() << std::endl ; } steghide-0.5.1/src/WavFile.cc0000644000076400001440000002513207735577226011454 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include "CvrStgFile.h" #include "DFSAPHeuristic.h" #include "SampleValueAdjacencyList.h" #include "SMDConstructionHeuristic.h" #include "WavFormatChunk.h" #include "WavChunkHeader.h" #include "WavChunkUnused.h" #include "WavFile.h" #include "WavPCMSampleValue.h" #include "common.h" #include "error.h" #include "msg.h" WavFile::WavFile (BinaryIO *io) : CvrStgFile() { setSamplesPerVertex (SamplesPerVertex) ; setEmbValueModulus (EmbValueModulus) ; read (io) ; } WavFile::~WavFile () { delete riffchhdr ; delete FormatChunk ; delete datachhdr ; for (std::vector::iterator i = UnusedBeforeData.begin() ; i != UnusedBeforeData.end() ; i++) { delete (*i) ; } } void WavFile::read (BinaryIO *io) { CvrStgFile::read (io) ; readheaders () ; readdata () ; } void WavFile::write () { CvrStgFile::write () ; writeheaders () ; writedata () ; } std::list WavFile::getProperties () const { std::list retval ; // format std::string formatstring = "wave audio" ; if (FormatChunk->getFormatTag() == WavFormatChunk::FormatPCM) { formatstring += ", PCM encoding" ; } retval.push_back (CvrStgFile::Property (_("format"), formatstring)) ; return retval ; } std::vector WavFile::getMatchingAlgorithms (Graph* g, Matching* m) const { std::vector retval ; retval.push_back (new SMDConstructionHeuristic (g, m)) ; retval.push_back (new DFSAPHeuristic (g, m)) ; return retval ; } unsigned long WavFile::getNumSamples() const { unsigned long retval = 0 ; if (FormatChunk->getBitsPerSample() <= 8) { retval = data_small.size() ; } else { retval = data_large.size() ; } return retval ; } void WavFile::replaceSample (const SamplePos pos, const SampleValue* s) { const WavPCMSampleValue* sample = dynamic_cast (s) ; myassert (sample != NULL) ; if (FormatChunk->getBitsPerSample() <= 8) { data_small[pos] = (unsigned char) sample->getValue() ; } else { data_large[pos] = sample->getValue() ; } } SampleValue *WavFile::getSampleValue (SamplePos pos) const { int value = 0 ; if (FormatChunk->getBitsPerSample() <= 8) { value = (int) data_small[pos] ; } else { value = data_large[pos] ; } return ((SampleValue *) new WavPCMSampleValue (value)) ; } std::vector WavFile::calcSVAdjacencyLists (const std::vector& svs) const { EmbValue m = getEmbValueModulus() ; std::vector lists (svs.size()) ; for (EmbValue i = 0 ; i < m ; i++) { lists[i] = new SampleValueAdjacencyList (svs.size()) ; } std::vector svs_sorted (svs.size()) ; for (unsigned long i = 0 ; i < svs.size() ; i++) { svs_sorted[i] = (WavPCMSampleValue*) svs[i] ; } WavPCMSmaller smaller ; sort (svs_sorted.begin(), svs_sorted.end(), smaller) ; // fill the lists int r = Globs.TheCvrStgFile->getRadius() ; unsigned long dstart = 0 ; for (unsigned long si = 0 ; si < svs_sorted.size() ; si++) { while ((dstart < svs_sorted.size()) && (svs_sorted[dstart]->getValue() < svs_sorted[si]->getValue() - r)) { dstart++ ; } // dstart is the index of the first sample in svs_sorted that is >= (svs_sorted[si]->getValue() - r) unsigned long di = dstart ; while ((di < svs_sorted.size()) && (svs_sorted[di]->getValue() <= svs_sorted[si]->getValue() + r)) { if (si != di) { (*(lists[svs_sorted[di]->getEmbeddedValue()]))[svs_sorted[si]].push_back (svs_sorted[di]) ; } di++ ; } } // sort rows for (EmbValue i = 0 ; i < m ; i++) { lists[i]->sort() ; } return lists ; } unsigned short WavFile::getBitsPerSample() const { return FormatChunk->getBitsPerSample() ; } unsigned short WavFile::getBytesPerSample() { unsigned short retval = 0 ; if (FormatChunk->getBitsPerSample() % 8 == 0) { retval = FormatChunk->getBitsPerSample() / 8 ; } else { retval = (FormatChunk->getBitsPerSample() / 8) + 1 ; } return retval ; } unsigned short WavFile::getFirstBitPosinSample() { unsigned short retval = 0 ; if (FormatChunk->getBitsPerSample() % 8 == 0) { retval = 0 ; } else { retval = 8 - (FormatChunk->getBitsPerSample() % 8) ; } return retval ; } /* reads the wav file data from disk */ void WavFile::readdata (void) { try { data_small.clear() ; data_large.clear() ; unsigned short bitspersample = FormatChunk->getBitsPerSample() ; unsigned short bytespersample = getBytesPerSample() ; unsigned short firstbitpos = getFirstBitPosinSample() ; UWORD32 mask = 0 ; for (unsigned short i = 0 ; i < bitspersample ; i++) { mask <<= 1 ; mask |= 1 ; } unsigned long readpos = 0 ; while (readpos < datachhdr->getChunkLength()) { if (bitspersample <= 8) { data_small.push_back ((getBinIO()->read8()) >> firstbitpos) ; } else { // decode two's complement UWORD32 value = (UWORD32) getBinIO()->read_le (bytespersample) ; value = value >> firstbitpos ; int sign = 0 ; if (((value & (1 << (bitspersample - 1))) >> (bitspersample - 1)) == 0) { sign = 1 ; } else { sign = -1 ; value = ~value ; value++ ; value &= mask ; } data_large.push_back (sign * ((int) value)) ; } readpos += bytespersample ; } UnusedAfterData.clear() ; while (!getBinIO()->eof()) { UnusedAfterData.push_back (getBinIO()->read8()) ; } } catch (BinaryInputError e) { switch (e.getType()) { case BinaryInputError::FILE_ERR: { throw SteghideError (_("an error occured while reading the audio data from the file \"%s\"."), getBinIO()->getName().c_str()) ; break ; } case BinaryInputError::FILE_EOF: { throw SteghideError (_("premature end of file \"%s\" while reading audio data."), getBinIO()->getName().c_str()) ; break ; } case BinaryInputError::STDIN_ERR: { throw SteghideError (_("an error occured while reading the audio data from standard input.")) ; break ; } case BinaryInputError::STDIN_EOF: { throw SteghideError (_("premature end of data from standard input while reading audio data.")) ; break ; } } } } void WavFile::writedata (void) { try { unsigned short bitspersample = FormatChunk->getBitsPerSample() ; unsigned short bytespersample = getBytesPerSample() ; unsigned short firstbitpos = getFirstBitPosinSample() ; unsigned long writepos = 0 ; while (writepos < datachhdr->getChunkLength()) { if (bitspersample <= 8) { getBinIO()->write8 (data_small[writepos] << firstbitpos) ; } else { unsigned long value = 0 ; if (data_large[writepos / bytespersample] >= 0) { value = (unsigned long) data_large[writepos / bytespersample] ; } else { value = (unsigned long) -data_large[writepos / bytespersample] ; // value is now |sample| value = ~value ; value++ ; } value <<= firstbitpos ; getBinIO()->write_le (value, bytespersample) ; } writepos += bytespersample ; } for (std::vector::const_iterator it = UnusedAfterData.begin() ; it != UnusedAfterData.end() ; it++) { getBinIO()->write8(*it) ; } } catch (BinaryOutputError e) { switch (e.getType()) { case BinaryOutputError::FILE_ERR: { throw SteghideError (_("an error occured while writing the audio data to the file \"%s\"."), getBinIO()->getName().c_str()) ; break ; } case BinaryOutputError::STDOUT_ERR: { throw SteghideError (_("an error occured while writing the audio data to standard output.")) ; break ; } } } } /* reads the headers of a wav file from disk */ void WavFile::readheaders () { try { riffchhdr = new WavChunkHeader ("RIFF", getBinIO()->read32_le()) ; for (unsigned int i = 0 ; i < 4 ; i++) { id_wave[i] = getBinIO()->read8() ; } if (strncmp (id_wave, "WAVE", 4) != 0) { throw UnSupFileFormat (getBinIO()) ; } FormatChunk = new WavFormatChunk (new WavChunkHeader (getBinIO()), getBinIO()) ; if (FormatChunk->getBitsPerSample() <= 8) { setRadius (Radius_small) ; } else { setRadius (Radius_large) ; } UnusedBeforeData.clear() ; WavChunkHeader *chhdr = new WavChunkHeader (getBinIO()) ; while (strncmp (chhdr->getChunkId(), "data", 4) != 0) { UnusedBeforeData.push_back (new WavChunkUnused (chhdr, getBinIO())) ; chhdr = new WavChunkHeader (getBinIO()) ; } datachhdr = chhdr ; } catch (BinaryInputError e) { switch (e.getType()) { case BinaryInputError::FILE_ERR: { throw SteghideError (_("an error occured while reading the wav headers from the file \"%s\"."), getBinIO()->getName().c_str()) ; break ; } case BinaryInputError::FILE_EOF: { throw SteghideError (_("premature end of file \"%s\" while reading wav headers."), getBinIO()->getName().c_str()) ; break ; } case BinaryInputError::STDIN_ERR: { throw SteghideError (_("an error occured while reading the wav headers from standard input.")) ; break ; } case BinaryInputError::STDIN_EOF: { throw SteghideError (_("premature end of data from standard input while reading wav headers.")) ; break ; } } } return ; } /* writes the headers of a wav file to disk */ void WavFile::writeheaders () { try { riffchhdr->write (getBinIO()) ; for (int i = 0 ; i < 4 ; i++) { getBinIO()->write8 (id_wave[i]) ; } FormatChunk->write (getBinIO()) ; for (std::vector::const_iterator i = UnusedBeforeData.begin() ; i != UnusedBeforeData.end() ; i++) { (*i)->write (getBinIO()) ; } datachhdr->write (getBinIO()) ; } catch (BinaryOutputError e) { switch (e.getType()) { case BinaryOutputError::FILE_ERR: { throw SteghideError (_("an error occured while writing the wav headers to the file \"%s\"."), getBinIO()->getName().c_str()) ; break ; } case BinaryOutputError::STDOUT_ERR: { throw SteghideError (_("an error occured while writing the wav headers to standard output.")) ; break ; } } } } steghide-0.5.1/src/BinaryIO.cc0000644000076400001440000001451407735577226011575 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "BinaryIO.h" #include "common.h" #include "error.h" void BinaryIO::init () { setName ("") ; setStream (NULL) ; set_open (false) ; } BinaryIO::BinaryIO (void) { init() ; } BinaryIO::BinaryIO (const std::string& fn, MODE m) { init() ; open (fn, m) ; } BinaryIO::~BinaryIO (void) { if (is_open()) { close () ; } } bool BinaryIO::Fileexists (const std::string& fn) const { bool retval = false ; FILE *fd = fopen (fn.c_str(), "r") ; if (fd != NULL) { retval = true ; fclose (fd) ; } return retval ; } void BinaryIO::checkForce (const std::string& fn) const { if (!Args.Force.getValue()) { if (Fileexists (fn)) { Question q (_("the file \"%s\" does already exist. overwrite ?"), fn.c_str()) ; q.printMessage() ; if (!q.getAnswer()) { throw SteghideError (_("did not write to file \"%s\"."), fn.c_str()) ; } } } } void BinaryIO::open (const std::string& fn, MODE m) { if (fn == "") { switch (m) { case READ: { setStream (stdin) ; break ; } case WRITE: { setStream (stdout) ; break ; } default: { myassert (0) ; break ; } } } else { FILE *s = NULL ; char *cmode ; switch (m) { case READ: { cmode = "rb" ; break ; } case WRITE: { checkForce (fn) ; cmode = "wb" ; break ; } default: { myassert(0) ; break ; } } if ((s = fopen (fn.c_str(), cmode)) == NULL) { throw SteghideError (_("could not open the file \"%s\"."), fn.c_str()) ; } setStream (s) ; } setName (fn) ; setMode (m) ; set_open (true) ; } bool BinaryIO::eof (void) const { int c = fgetc (getStream()) ; bool retval = feof (getStream()) ; ungetc (c, getStream()) ; return retval ; } void BinaryIO::close (void) { myassert (is_open()) ; if (getName() != "") { if (fclose (getStream()) == EOF) { throw SteghideError (_("could not close the file \"%s\"."), getName().c_str()) ; } } setName ("") ; setStream (NULL) ; set_open (false) ; } BYTE BinaryIO::read8 (void) { myassert (getMode() == READ) ; myassert (is_open()) ; int c = EOF ; if ((c = fgetc (getStream())) == EOF) { throw BinaryInputError (getName(), getStream()) ; } return (BYTE) c ; } UWORD16 BinaryIO::read16_le (void) { myassert (getMode() == READ) ; myassert (is_open()) ; int bytes[2] ; for (int i = 0 ; i < 2 ; i++) { if ((bytes[i] = fgetc (getStream())) == EOF) { throw BinaryInputError (getName(), getStream()) ; } } return ((bytes[1] << 8) | bytes[0]) ; } UWORD16 BinaryIO::read16_be (void) { myassert (getMode() == READ) ; myassert (is_open()) ; int bytes[2] ; for (int i = 0 ; i < 2 ; i++) { if ((bytes[i] = fgetc (getStream())) == EOF) { throw BinaryInputError (getName(), getStream()) ; } } return ((bytes[0] << 8) | bytes[1]) ; } UWORD32 BinaryIO::read32_le (void) { myassert (getMode() == READ) ; myassert (is_open()) ; int bytes[4] ; for (int i = 0 ; i < 4 ; i++) { if ((bytes[i] = fgetc (getStream())) == EOF) { throw BinaryInputError (getName(), getStream()) ; } } return ((bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0]) ; } UWORD32 BinaryIO::read32_be (void) { myassert (getMode() == READ) ; myassert (is_open()) ; int bytes[4] ; for (int i = 0 ; i < 4 ; i++) { if ((bytes[i] = fgetc (getStream())) == EOF) { throw BinaryInputError (getName(), getStream()) ; } } return ((bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3]) ; } UWORD32 BinaryIO::read_le (unsigned short n) { myassert (getMode() == READ) ; myassert (is_open()) ; myassert (n <= 4) ; UWORD32 retval = 0 ; for (unsigned short i = 0 ; i < n ; i++) { int byte = EOF ; if ((byte = fgetc (getStream())) == EOF) { throw BinaryInputError (getName(), getStream()) ; } retval |= (((BYTE) byte) << (8 * i)) ; } return retval ; } std::string BinaryIO::readstring (unsigned int len) { char retval[len + 1] ; for (unsigned int i = 0 ; i < len ; i++) { retval[i] = (char) read8() ; } retval[len] = '\0' ; return std::string (retval) ; } void BinaryIO::write8 (BYTE val) { myassert (getMode() == WRITE) ; myassert (is_open()) ; if (fputc ((int) val, getStream()) == EOF) { throw BinaryOutputError (getName()) ; } } void BinaryIO::write16_le (UWORD16 val) { myassert (getMode() == WRITE) ; myassert (is_open()) ; for (int i = 0 ; i <= 1 ; i++) { if (fputc ((val >> (8 * i)) & 0xFF, getStream()) == EOF) { throw BinaryOutputError (getName()) ; } } } void BinaryIO::write16_be (UWORD16 val) { myassert (getMode() == WRITE) ; myassert (is_open()) ; for (int i = 1 ; i >= 0 ; i--) { if (fputc ((val >> (8 * i)) & 0xFF, getStream()) == EOF) { throw BinaryOutputError (getName()) ; } } } void BinaryIO::write32_le (UWORD32 val) { myassert (getMode() == WRITE) ; myassert (is_open()) ; for (int i = 0 ; i <= 3 ; i++) { if (fputc ((val >> (8 * i)) & 0xFF, getStream()) == EOF) { throw BinaryOutputError (getName()) ; } } } void BinaryIO::write32_be (UWORD32 val) { myassert (getMode() == WRITE) ; myassert (is_open()) ; for (int i = 3 ; i >= 0 ; i--) { if (fputc ((val >> (8 * i)) & 0xFF, getStream()) == EOF) { throw BinaryOutputError (getName()) ; } } } void BinaryIO::write_le (UWORD32 val, unsigned short n) { myassert (getMode() == WRITE) ; myassert (is_open()) ; myassert (n <= 4) ; for (short i = 0 ; i < n ; i++) { if (fputc ((val >> (8 * i)) & 0xFF, getStream()) == EOF) { throw BinaryOutputError (getName()) ; } } } void BinaryIO::writestring (const std::string& s) { if (fputs (s.c_str(), getStream()) == EOF) { throw BinaryOutputError (getName()) ; } } steghide-0.5.1/src/Extractor.cc0000644000076400001440000000643607741740435012067 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "BitString.h" #include "CvrStgFile.h" #include "EmbData.h" #include "Extractor.h" #include "SampleValue.h" #include "Selector.h" #include "common.h" #include "error.h" EmbData* Extractor::extract () { VerboseMessage vrs ; if (Args.StgFn.getValue() == "") { vrs.setMessage (_("reading stego file from standard input...")) ; } else { vrs.setMessage (_("reading stego file \"%s\"..."), Args.StgFn.getValue().c_str()) ; } vrs.setNewline (false) ; vrs.printMessage() ; Globs.TheCvrStgFile = CvrStgFile::readFile (StegoFileName) ; VerboseMessage vd (_(" done")) ; vd.printMessage() ; EmbData* embdata = new EmbData (EmbData::EXTRACT, Passphrase) ; Selector sel (Globs.TheCvrStgFile->getNumSamples(), Passphrase) ; VerboseMessage ve (_("extracting data...")) ; ve.setNewline (false) ; ve.printMessage() ; unsigned long sv_idx = 0 ; while (!embdata->finished()) { unsigned short bitsperembvalue = AUtils::log2_ceil (Globs.TheCvrStgFile->getEmbValueModulus()) ; unsigned long embvaluesrequested = AUtils::div_roundup (embdata->getNumBitsRequested(), bitsperembvalue) ; if (sv_idx + (Globs.TheCvrStgFile->getSamplesPerVertex() * embvaluesrequested) >= Globs.TheCvrStgFile->getNumSamples()) { if (Globs.TheCvrStgFile->is_std()) { throw CorruptDataError (_("the stego data from standard input is too short to contain the embedded data.")) ; } else { throw CorruptDataError (_("the stego file \"%s\" is too short to contain the embedded data."), Globs.TheCvrStgFile->getName().c_str()) ; } } BitString bits (Globs.TheCvrStgFile->getEmbValueModulus()) ; for (unsigned long i = 0 ; i < embvaluesrequested ; i++) { EmbValue ev = 0 ; for (unsigned int j = 0 ; j < Globs.TheCvrStgFile->getSamplesPerVertex() ; j++, sv_idx++) { ev = (ev + Globs.TheCvrStgFile->getEmbeddedValue (sel[sv_idx])) % Globs.TheCvrStgFile->getEmbValueModulus() ; } bits.appendNAry(ev) ; } embdata->addBits (bits) ; } vd.printMessage() ; // TODO (postponed due to message freeze): rename into "verifying crc32 checksum..." VerboseMessage vc (_("checking crc32 checksum...")) ; vc.setNewline (false) ; vc.printMessage() ; if (embdata->checksumOK()) { VerboseMessage vok (_(" ok")) ; vok.printMessage() ; } else { VerboseMessage vfailed (_(" FAILED!")) ; vfailed.printMessage() ; CriticalWarning w (_("crc32 checksum failed! extracted data is probably corrupted.")) ; w.printMessage() ; } return embdata ; } steghide-0.5.1/src/Session.cc0000644000076400001440000002527307736002116011526 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include "EmbData.h" #include "Embedder.h" #include "Extractor.h" #include "CvrStgFile.h" #include "MCryptPP.h" #include "Session.h" #include "Utils.h" #include "common.h" #include "error.h" void Session::run () { switch (Args.Command.getValue()) { case EMBED: { Embedder emb ; emb.embed() ; break ; } case EXTRACT: { Extractor ext (Args.StgFn.getValue(), Args.Passphrase.getValue()) ; EmbData* embdata = ext.extract() ; // write data std::string fn ; if (Args.ExtFn.is_set()) { if (Args.ExtFn.getValue() == "") { // write extracted data to stdout fn = "" ; } else { // file name given by extracting user overrides embedded file name fn = Args.ExtFn.getValue() ; } } else { // write extracted data to file with embedded file name myassert (Args.ExtFn.getValue() == "") ; fn = embdata->getFileName() ; if (fn.length() == 0) { throw SteghideError (_("please specify a file name for the extracted data (there is no name embedded in the stego file).")) ; } } VerboseMessage vwe ; bool printdone = true ; if (fn == "") { vwe.setMessage (_("writing extracted data to standard output...")) ; printdone = false ; } else { vwe.setMessage (_("writing extracted data to \"%s\"..."), fn.c_str()) ; vwe.setNewline (false) ; } vwe.printMessage() ; BinaryIO io (fn, BinaryIO::WRITE) ; std::vector data = embdata->getData() ; for (std::vector::iterator i = data.begin() ; i != data.end() ; i++) { io.write8 (*i) ; } io.close() ; if (printdone) { VerboseMessage vdone (_(" done")) ; vdone.printMessage() ; } if (Args.Verbosity.getValue() < VERBOSE) { if (fn != "") { Message m (_("wrote extracted data to \"%s\"."), fn.c_str()) ; m.printMessage() ; } } break ; } case INFO: { printInfo() ; break ; } case ENCINFO: { printEncInfo() ; break ; } case SHOWVERSION: { printVersion() ; break ; } case SHOWLICENSE: { printLicense() ; break ; } case SHOWHELP: { printHelp() ; break ; } #ifdef DEBUG case PRINTFREQS: { printFrequencies() ; break ; } #endif default: { myassert (0) ; break ; } } } void Session::printInfo () { // if file format not supported: exception will be catched in main CvrStgFile* file = CvrStgFile::readFile (Args.CvrFn.getValue()) ; if (Args.CvrFn.getValue() == "") { printf (_("data from standard input:\n")) ; } else { printf ("\"%s\":\n", stripDir(Args.CvrFn.getValue()).c_str()) ; } std::list props = file->getProperties() ; props.push_back (CvrStgFile::Property (_("capacity"), file->getHRCapacity())) ; for (std::list::const_iterator it = props.begin() ; it != props.end() ; it++) { printf (" %s: %s\n", it->getKey().c_str(), it->getValue().c_str()) ; } bool printembinfo = Args.Passphrase.is_set() ; if (!printembinfo) { Question q (_("Try to get information about embedded data ?")) ; q.printMessage() ; printembinfo = q.getAnswer() ; } if (printembinfo) { try { std::string pp ; if (Args.Passphrase.is_set()) { pp = Args.Passphrase.getValue() ; } else { pp = Args.getPassphrase() ; // ask user for it } Extractor e (Args.CvrFn.getValue(), pp) ; EmbData* embdata = e.extract() ; if (embdata->getFileName() == "") { printf (_(" embedded data:\n")) ; } else { printf (_(" embedded file \"%s\":\n"), embdata->getFileName().c_str()) ; } printf (_(" size: %s\n"), Utils::formatHRSize(embdata->getData().size()).c_str()) ; std::string encstring ; if (embdata->getEncAlgo() == EncryptionAlgorithm(EncryptionAlgorithm::NONE)) { encstring += _("no") ; } else { encstring += embdata->getEncAlgo().getStringRep() + ", " + embdata->getEncMode().getStringRep() ; } printf (_(" encrypted: %s\n"), encstring.c_str()) ; printf (_(" compressed: %s\n"), ((embdata->getCompression() > 0) ? _("yes") : _("no"))) ; delete embdata ; } catch (CorruptDataError e) { printf (_("could not extract any data with that passphrase!\n")) ; } } } std::string Session::stripDir (std::string s) const { unsigned int start = 0 ; if ((start = s.find_last_of ("/\\")) == std::string::npos) { start = 0 ; } else { start += 1 ; } return s.substr (start, std::string::npos) ; } void Session::printEncInfo () { #ifdef USE_LIBMCRYPT std::vector algos = MCryptPP::getListAlgorithms() ; std::vector modes = MCryptPP::getListModes() ; printf (_("encryption algorithms:\n" ": ...\n")) ; for (std::vector::iterator a = algos.begin() ; a != algos.end() ; a++) { if (EncryptionAlgorithm::isValidStringRep (*a)) { // invalid if supported by libmcrypt but not by steghide, e.g. blowfish-compat std::cout << *a << ":" ; for (std::vector::iterator m = modes.begin() ; m != modes.end() ; m++) { if (EncryptionMode::isValidStringRep (*m)) { if (MCryptPP::AlgoSupportsMode (*a, *m)) { std::cout << " " << *m ; } } } std::cout << std::endl ; } } #else printf (_("steghide has been compiled without support for encryption.\n" "If you want to encrypt your data before embedding it, use an external encryption\n" "program or install libmcrypt (http://mcrypt.sourceforge.net/) and recompile steghide.\n")) ; #endif } void Session::printVersion () { std::cout << "steghide version " << VERSION << std::endl ; } void Session::printHelp () { printVersion() ; printf (_("\n" "the first argument must be one of the following:\n" " embed, --embed embed data\n" " extract, --extract extract data\n" " info, --info display information about a cover- or stego-file\n" " info display information about \n" " encinfo, --encinfo display a list of supported encryption algorithms\n" " version, --version display version information\n" " license, --license display steghide's license\n" " help, --help display this usage information\n" "\nembedding options:\n" " -ef, --embedfile select file to be embedded\n" " -ef embed the file \n" " -cf, --coverfile select cover-file\n" " -cf embed into the file \n" " -p, --passphrase specify passphrase\n" " -p use to embed data\n" " -sf, --stegofile select stego file\n" " -sf write result to instead of cover-file\n" " -e, --encryption select encryption parameters\n" " -e []|[] specify an encryption algorithm and/or mode\n" " -e none do not encrypt data before embedding\n" " -z, --compress compress data before embedding (default)\n" " -z using level (1 best speed...9 best compression)\n" " -Z, --dontcompress do not compress data before embedding\n" " -K, --nochecksum do not embed crc32 checksum of embedded data\n" " -N, --dontembedname do not embed the name of the original file\n" " -f, --force overwrite existing files\n" " -q, --quiet suppress information messages\n" " -v, --verbose display detailed information\n" "\nextracting options:\n" " -sf, --stegofile select stego file\n" " -sf extract data from \n" " -p, --passphrase specify passphrase\n" " -p use to extract data\n" " -xf, --extractfile select file name for extracted data\n" " -xf write the extracted data to \n" " -f, --force overwrite existing files\n" " -q, --quiet suppress information messages\n" " -v, --verbose display detailed information\n" "\noptions for the info command:\n" " -p, --passphrase specify passphrase\n" " -p use to get info about embedded data\n" "\nTo embed emb.txt in cvr.jpg: steghide embed -cf cvr.jpg -ef emb.txt\n" "To extract embedded data from stg.jpg: steghide extract -sf stg.jpg\n")) ; } void Session::printLicense () { printf ( "Copyright (C) 1999-2003 Stefan Hetzl \n\n" "This program is free software; you can redistribute it and/or\n" "modify it under the terms of the GNU General Public License\n" "as published by the Free Software Foundation; either version 2\n" "of the License, or (at your option) any later version.\n\n" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n\n" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n") ; } #ifdef DEBUG void Session::printFrequencies () { std::map Frequencies ; const std::list& flist = Args.FileList.getValue() ; for (std::list::const_iterator fnit = flist.begin() ; fnit != flist.end() ; fnit++) { CvrStgFile *f = CvrStgFile::readFile (*fnit) ; addFrequencies (&Frequencies, f->getFrequencies()) ; delete f ; } // get CvrStgFile in correct format to call printFrequencies CvrStgFile *f = CvrStgFile::readFile (*(Args.FileList.getValue().begin())) ; f->printFrequencies (Frequencies) ; delete f ; } void Session::addFrequencies (std::map* f1, const std::map* f2) { for (std::map::const_iterator fit = f2->begin() ; fit != f2->end() ; fit++) { (*f1)[fit->first] += fit->second ; } } #endif // def DEBUG steghide-0.5.1/src/EdgeIterator.h0000644000076400001440000001167107735577226012342 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_EDGEITERATOR_H #define SH_EDGEITERATOR_H #include #include "Edge.h" class Graph ; #include "SampleOccurence.h" class SampleValue ; class Vertex ; /** * \class EdgeIterator * \brief allows an iteration trough all edges of a vertex * * The Vertex that is the source for all edges is called "source vertex". * The order of the iteration through the edges is from the shortest to the longest edge. * If two edges have the same length they are ordered the same way as the corresponding * entries in the sample value adjacency lists (for different sample values) respectivly * the destination sample occurences in the SampleOccurences data structure (for the same * sample value). * * EdgeIterator uses an SampleOccurence::const_iterator to store information * about the current edge. Graph::(un)markDeletedSampleOccurence can invalidate * such iterators. It is therefore not a good idea to use EdgeIterators at the same * time as the Graph::(un)markDeletedSampleOccurence functionality. * * NOTE: EdgeIterator relies on the Globals object pointed to by the Globs pointer. * This means that it must be set correctly before using any method of an EdgeIterator object. **/ class EdgeIterator { public: enum ITERATIONMODE { SAMPLEOCCURENCE, // incrementing increments to next sample occurence (possibly of the same sample value) thus using every edge of the source vertex SAMPLEVALUE // incrementing increments to the next sample value thus not using all edges in general } ; /** * the default contructor - does not create a valid object **/ EdgeIterator (void) ; /** * \param v the source vertex **/ EdgeIterator (Vertex *v, ITERATIONMODE m = SAMPLEOCCURENCE) ; /** * the copy constructor **/ EdgeIterator (const EdgeIterator& eit) ; ~EdgeIterator (void) ; /** * get the current edge * \return the edge that is described by the current status of this EdgeIterator **/ const Edge* operator* (void) const { return ((Finished) ? NULL : &CurrentEdge) ; } /** * set this iterator to next edge **/ void operator++ (void) ; /** * set this iterator to first (shortest) edge of vertex v * \param v new vertex (don't change if it is NULL) **/ void reset (Vertex* v, ITERATIONMODE m = SAMPLEOCCURENCE) ; /** * reset this iterator to first (shortest) edge **/ void reset (ITERATIONMODE m = SAMPLEOCCURENCE) ; /** * \return true iff this EdgeIterator points to the end of the list of edges of SrcVertex **/ bool isFinished (void) const { return Finished ; } ; /** * get the label of the partner vertex * \return the label of the vertex that builds the edge returned by operator* together with SrcVertex **/ VertexLabel getPartnerVertexLabel (void) const { return SampleOccurenceIt->getVertex()->getLabel() ; } ; static UWORD32 getMaxNumEdges (void) { return MaxNumEdges ; } ; static void setMaxNumEdges (UWORD32 mne) { MaxNumEdges = mne ; } ; void print (unsigned short spc = 0) const ; private: /// the current edge (is returned by operator*) Edge CurrentEdge ; /// mode of iteration ITERATIONMODE Mode ; /// contains (for every sample value) an index to the current opposite neighbour unsigned long* SVALIndices ; /// the maximum number of edges the EdgeIterator should iterate through static UWORD32 MaxNumEdges ; /// the index/number of the edge that is currently returned by operator* UWORD32 EdgeIndex ; /// is true iff there are no more edges for this source vertex bool Finished ; /** * contains the iterator pointing to the sample occurence that constitutes * the edge together with SourceVertex/SourceSamleValueIndex **/ std::list::const_iterator SampleOccurenceIt ; /** * find the shortest edge, starting the search at SVOppNeighsIndices[0...k] * set the private variables accordingly * is only called to find a new destination sample value, i.e. if one of the * SVOppNeighsIndices[i] is changed **/ void findNextEdge (void) ; /** * \return true iff there is a sample with value sv that is part of an edge starting at SrcVertex **/ bool isDestSampleValueOK (const SampleValue *sv) ; } ; #endif // ndef SH_EDGEITERATOR_H steghide-0.5.1/src/AuSampleValues.cc0000644000076400001440000000256207735577226013010 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "AuSampleValues.h" // AuMuLawSampleValue const BYTE AuMuLawSampleValue::MinValue = 0 ; const BYTE AuMuLawSampleValue::MaxValue = BYTE_MAX ; // AuPCM8SampleValue const SBYTE AuPCM8SampleValue::MinValue = SBYTE_MIN ; const SBYTE AuPCM8SampleValue::MaxValue = SBYTE_MAX ; // AuPCM16SampleValue const SWORD16 AuPCM16SampleValue::MinValue = SWORD16_MIN ; const SWORD16 AuPCM16SampleValue::MaxValue = SWORD16_MAX ; // AuPCM32SampleValue const SWORD32 AuPCM32SampleValue::MinValue = SWORD32_MIN ; const SWORD32 AuPCM32SampleValue::MaxValue = SWORD32_MAX ; steghide-0.5.1/src/DFSAPHeuristic.h0000644000076400001440000000716707735577226012506 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_DFSAPHEURISTIC #define SH_DFSAPHEURISTIC #include "EdgeIterator.h" #include "MatchingAlgorithm.h" #include "Vertex.h" class Edge ; #include "Graph.h" class Matching ; /** * \class DFSAPHeuristic * \brief a matching algorithm implementing a heuristic search for augmenting paths * * This class implements the heuristic augmenting path search presented by * Rolf H. Moehring and Matthias Mueller-Hannemann in their paper: "Cardinality * Matching: Heuristic Search for Augmenting Paths". **/ class DFSAPHeuristic : public MatchingAlgorithm { public: /** * construct an DFSAPHeuristic object * \param g the graph on which this heuristic should run * \param m the matching to start with * \param goal the percentage of matched vertices that should be reached * \param mne the maximum number of edges that should be considered for every vertex * \param mo the mode for edge iteration **/ DFSAPHeuristic (Graph* g, Matching* m, float goal = 100.0, UWORD32 mne = UWORD32_MAX, EdgeIterator::ITERATIONMODE mo = EdgeIterator::SAMPLEOCCURENCE) ; virtual ~DFSAPHeuristic (void) ; const char* getName (void) const { return "DFS Augmenting Path Heuristic" ; } ; /** * reset the state of this DFSAPHeuristic, esp. the EdgeIterators * \param mne the maximum number of edges that should be considered for every vertex for now on **/ void reset (UWORD32 mne = UWORD32_MAX, EdgeIterator::ITERATIONMODE mo = EdgeIterator::SAMPLEOCCURENCE) ; void run (void) ; private: /** * \param v0 an exposed vertex * \param path an array of Edge pointers where the path will be put * \return the length of the path (the number of valid edges in path) **/ unsigned long searchAugmentingPath (Vertex* v0, const Edge** path) ; const Edge* getNextEdge (Vertex *v) ; void markVisited (Vertex *v) { TimeCounters[v->getLabel()] = TimeCounter ; } ; /** * returns true iff v has already been visited in this * iteration, i.e. in the current call of searchAugmentingPath **/ bool isVisited (Vertex *v) const { return isVisited(v->getLabel()) ; } ; bool isVisited (VertexLabel vlbl) const { return (TimeCounters[vlbl] == TimeCounter) ; } ; UWORD32 TimeCounter ; UWORD32* TimeCounters ; bool* VertexOnPath ; EdgeIterator* EdgeIterators ; #ifdef DEBUG /// the number of edges that have been examined in all successful searches unsigned long long NEdgesSuccessful ; /// the number of edges that have been examined in all unsuccessful searches unsigned long long NEdgesUnsuccessful ; /// the number of calls to searchAugmentingPath that have been sucessful unsigned long NSuccessful ; /// the number of calls to searchAugmentingPath that have been unsuccessful unsigned long NUnsuccessful ; /// string indicating if n-th search was successful std::string SuccessString ; #endif } ; #endif // ndef SH_DFSAPHEURISTIC steghide-0.5.1/src/Utils.cc0000644000076400001440000000232407735577226011215 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "Utils.h" std::string Utils::formatHRSize (unsigned long size) { float s = (float) size ; std::string unit = "Byte" ; if (s > 1024.0) { s /= 1024.0 ; unit = "KB" ; } if (s > 1024.0) { s /= 1024.0 ; unit = "MB" ; } if (s > 1024.0) { s /= 1024.0 ; unit = "GB" ; } char buf[15] ; sprintf (buf, "%.1f %s", s, unit.c_str()) ; return std::string (buf) ; } steghide-0.5.1/src/WavFile.h0000644000076400001440000000536307735577226011322 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_WAVFILE_H #define SH_WAVFILE_H #include #include "CvrStgFile.h" class BinaryIO ; class WavChunkHeader ; class WavChunkUnused ; class WavFormatChunk ; class WavFile : public CvrStgFile { public: WavFile (void) ; WavFile (BinaryIO *io) ; ~WavFile (void) ; void read (BinaryIO *io) ; void write (void) ; std::list getProperties (void) const ; unsigned long getNumSamples (void) const ; void replaceSample (const SamplePos pos, const SampleValue* s) ; SampleValue* getSampleValue (SamplePos pos) const ; std::vector calcSVAdjacencyLists (const std::vector& svs) const ; std::vector getMatchingAlgorithms (Graph* g, Matching* m) const ; unsigned short getBitsPerSample (void) const ; private: static const signed short FormatPCM = 1 ; static const unsigned short SamplesPerVertex = 2 ; static const UWORD32 Radius_small = 1 ; static const UWORD32 Radius_large = 20 ; static const EmbValue EmbValueModulus = 2 ; WavChunkHeader *riffchhdr ; char id_wave[4] ; WavFormatChunk *FormatChunk ; WavChunkHeader *datachhdr ; /// this std::vector contains the wav data if BitsPerSample <= 8 std::vector data_small ; /// this std::vector contains the wav data if BitsPerSample >8 std::vector data_large ; // it is assumed that an int can hold 32 bits std::vector UnusedBeforeData ; std::vector UnusedAfterData ; void readheaders (void) ; void readdata (void) ; void writeheaders (void) ; void writedata (void) ; void calcpos (SamplePos n, unsigned long *bytepos, unsigned short *firstbitpos) const ; /** * get the position of the first bit (of the first byte) containing the actual sample data * \return the bit position (where 0 is the lsb and 7 the msb) **/ unsigned short getFirstBitPosinSample (void) ; unsigned short getBytesPerSample (void) ; } ; #endif // ndef SH_WAVFILE_H steghide-0.5.1/src/Extractor.h0000644000076400001440000000217307735577226011734 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_EXTRACTOR_H #define SH_EXTRACTOR_H #include class Extractor { public: Extractor (std::string stgfn, std::string pp) : StegoFileName(stgfn), Passphrase(pp) {} ; EmbData* extract (void) ; private: std::string StegoFileName ; std::string Passphrase ; } ; #endif // ndef SH_EXTRACTOR_H steghide-0.5.1/src/WKSConstructionHeuristic.cc0000644000076400001440000001530107735577226015053 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "WKSConstructionHeuristic.h" #include "Edge.h" #include "Graph.h" #include "Matching.h" #include "common.h" WKSConstructionHeuristic::WKSConstructionHeuristic (Graph* g, Matching* m, float goal) : MatchingAlgorithm (g, m, goal) { unsigned long nvertices = g->getNumVertices() ; // fill the VerticesDeg1 and VerticesDegG priority queues VerticesDeg1 = std::priority_queue, LongerShortestEdge> () ; VerticesDegG = std::priority_queue, LongerShortestEdge> () ; for (VertexLabel l = 0 ; l < nvertices ; l++) { Vertex *v = g->getVertex(l) ; v->updateShortestEdge() ; UWORD32 degree = v->getDegree() ; if (degree != 0) { myassert (v->getShortestEdge() != NULL) ; if (degree == 1) { VerticesDeg1.push (v) ; } else { VerticesDegG.push (v) ; } } } } void WKSConstructionHeuristic::run () { unsigned long numDegG = 0 ; unsigned long numDeg1 = 0 ; while ((TheMatching->getCardinality() < CardinalityGoal) && !(VerticesDegG.empty() && VerticesDeg1.empty())) { Vertex *v = NULL ; // get a vertex from one of the priority queues if (!VerticesDeg1.empty()) { v = findVertexDeg1() ; if (v != NULL) { #ifdef DEBUG printDebug (5, "WKSConstructionHeuristic: vertex %lu has been chosen from VerticesDeg1.", v->getLabel()) ; #endif numDeg1++ ; } } else { v = findVertexDegG() ; if (v != NULL) { #ifdef DEBUG printDebug (5, "WKSConstructionHeuristic: vertex %lu has been chosen from VerticesDegG.", v->getLabel()) ; #endif numDegG++ ; } } if (v != NULL) { // insert v's shortest edge into matching Edge* e = v->getShortestEdge() ; Vertex* vother = e->getOtherVertex(v) ; #ifdef DEBUG printDebug (5, "WKSConstructionHeuristic: inserting edge %lu - %lu into matching", v->getLabel(), vother->getLabel()) ; #endif TheMatching->addEdge(*e) ; v->markDeleted() ; vother->markDeleted() ; checkNeighboursDeg1 (v) ; checkNeighboursDeg1 (vother) ; } } TheGraph->unmarkDeletedAllVertices() ; } void WKSConstructionHeuristic::checkNeighboursDeg1 (Vertex *v) { // for all sample values in v... for (unsigned short i = 0 ; i < Globs.TheCvrStgFile->getSamplesPerVertex() ; i++) { SampleValue* srcsv = v->getSampleValue(i) ; const std::vector& tneighbours = (*(TheGraph->SVALists[v->getTargetValue(i)]))[srcsv] ; // ...get all target neighbour sample values... for (std::vector::const_iterator tnit = tneighbours.begin() ; tnit != tneighbours.end() ; tnit++) { const std::list& soccs = TheGraph->SampleOccurences[(*tnit)->getLabel()] ; // ...and for each of them look at every sample occurence of it,... for (std::list::const_iterator soccit = soccs.begin() ; soccit != soccs.end() ; soccit++) { // ...determine wether it is in an edge with v and ... if (srcsv->getEmbeddedValue() == soccit->getVertex()->getTargetValue(soccit->getIndex())) { // ...if the corresponding vertex has degree 1: if (soccit->getVertex()->getDegree() == 1) { soccit->getVertex()->updateShortestEdge() ; VerticesDeg1.push(soccit->getVertex()) ; // move it to the Deg1 priority queue } } } } } } Vertex* WKSConstructionHeuristic::findVertexDegG () { Vertex *v = NULL ; bool usethisvertex = false ; // get the vertex that is nearest to top (with updated len of shortest edge) and has degree > 1 do { myassert (!VerticesDegG.empty()) ; v = VerticesDegG.top() ; VerticesDegG.pop() ; if ((TheMatching->isExposed(v)) && (v->getDegree() > 1)) { // implicitly delete vertices that have been moved to VerticesDeg1 or have already been matched UWORD32 weight_before = v->getShortestEdge()->getWeight() ; v->updateShortestEdge() ; if (v->getShortestEdge()->getWeight() == weight_before) { usethisvertex = true ; } else { myassert (v->getShortestEdge()->getWeight() > weight_before) ; // weight can only rise VerticesDegG.push (v) ; // push v into a position that is further away from top } } } while (!(usethisvertex || VerticesDegG.empty())) ; return (usethisvertex ? v : NULL) ; } Vertex *WKSConstructionHeuristic::findVertexDeg1 () { Vertex *v = NULL ; bool usethisvertex = false ; // get the vertex that is nearest to top and still has degree 1 do { myassert (!VerticesDeg1.empty()) ; v = VerticesDeg1.top() ; VerticesDeg1.pop() ; if ((TheMatching->isExposed(v)) && (v->getDegree() == 1)) { // implicitly delete vertices that have degree zero or have already been matched usethisvertex = true ; } } while (!(usethisvertex || VerticesDeg1.empty())) ; return (usethisvertex ? v : NULL) ; } bool WKSConstructionHeuristic::LongerShortestEdge::operator() (const Vertex* v1, const Vertex* v2) { bool retval = false ; UWORD32 deg1 = v1->getDegree() ; UWORD32 deg2 = v2->getDegree() ; if (deg1 == 0 && deg2 == 0) { retval = (v1->getLabel() > v2->getLabel()) ; } else if (deg1 == 0) { retval = true ; } else if (deg2 == 0) { retval = false ; } else { retval = v1->getShortestEdge()->getWeight() > v2->getShortestEdge()->getWeight(); } return retval ; } #ifdef DEBUG void WKSConstructionHeuristic::print (unsigned short spc) { char* space = new char[spc + 1] ; for (unsigned short i = 0 ; i < spc ; i++) { space[i] = ' ' ; } space[spc] = '\0' ; std::cerr << space << "VerticesDeg1 (top->down): " ; printPQ (VerticesDeg1) ; std::cerr << std::endl ; std::cerr << space << "VerticesDegG (top->down): " ; printPQ (VerticesDegG) ; std::cerr << std::endl ; } void WKSConstructionHeuristic::printPQ (std::priority_queue, LongerShortestEdge>& pq) { std::vector backup ; while (!pq.empty()) { Vertex *v = pq.top() ; pq.pop() ; std::cerr << v->getLabel() << ", " ; backup.push_back(v) ; } for (std::vector::const_iterator it = backup.begin() ; it != backup.end() ; it++) { pq.push (*it) ; } } #endif steghide-0.5.1/src/MatchingAlgorithm.cc0000644000076400001440000000247207735577226013522 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "Graph.h" #include "MatchingAlgorithm.h" MatchingAlgorithm::MatchingAlgorithm (Graph* g, Matching* m, float goal) : TheGraph(g), TheMatching(m) { setGoal(goal) ; } void MatchingAlgorithm::setGoal (float goal) { // if goal is 100.0 and the graph has an odd number of vertices the algorithm won't spend time // searching an edge for the last vertex as / rounds down to the next smaller integer CardinalityGoal = (unsigned long) (((float) TheGraph->getNumVertices()) * (goal / 100.0)) / 2 ; } steghide-0.5.1/src/WavPCMSampleValue.cc0000644000076400001440000000625707735577226013362 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include "common.h" #include "WavFile.h" #include "WavPCMSampleValue.h" WavPCMSampleValue::WavPCMSampleValue (int v) : SampleValue(), Value(v) { const WavFile* wavfile = dynamic_cast (Globs.TheCvrStgFile) ; myassert (wavfile != NULL) ; unsigned short samplesize = wavfile->getBitsPerSample() ; int maxvalue = 1 ; int minvalue = 1 ; if ((samplesize >= 1) && (samplesize <= 8)) { // maxvalue is 2^samplesize for (unsigned short i = 0 ; i < samplesize ; i++) { maxvalue *= 2 ; } minvalue = 0 ; } else { // maxvalue is (2^(samplesize - 1)) - 1 for (unsigned short i = 0 ; i < (samplesize - 1) ; i++) { maxvalue *= 2 ; } maxvalue-- ; // minvalue is -(2^(SampleSize - 1)) for (unsigned short i = 0 ; i < (samplesize - 1) ; i++) { minvalue *= 2 ; } minvalue = -minvalue ; } MaxValue = maxvalue ; MinValue = minvalue ; if (MinValue > Value) { std::cerr << "MinValue: " << MinValue << ", Value: " << Value << std::endl ; } myassert (MinValue <= Value) ; myassert (Value <= MaxValue) ; Key = (UWORD32) Value ; EValue = calcEValue (Value) ; } SampleValue *WavPCMSampleValue::getNearestTargetSampleValue (EmbValue t) const { int val_up = Value, val_down = Value, newval = 0 ; bool found = false ; do { if (val_up < MaxValue) { val_up++ ; } if (val_down > MinValue) { val_down-- ; } if (calcEValue(val_up) == t && calcEValue(val_down) == t) { if (RndSrc.getBool()) { newval = val_up ; } else { newval = val_down ; } found = true ; } else if (calcEValue(val_up) == t) { newval = val_up ; found = true ; } else if (calcEValue(val_down) == t) { newval = val_down ; found = true ; } } while (!found) ; return ((SampleValue *) new WavPCMSampleValue (newval)) ; } UWORD32 WavPCMSampleValue::calcDistance (const SampleValue *s) const { const WavPCMSampleValue *sample = (const WavPCMSampleValue*) s ; /* If s is not a WavPCMSampleValue then we get into real trouble here. But calcDistance is called very often, a dynamic_cast costs a lot of time and it does not make sense to pass anything but a WavPCMSampleValue as s anyway. */ int d = Value - sample->Value ; return ((d >= 0) ? ((UWORD32) d) : ((UWORD32) -d)) ; } std::string WavPCMSampleValue::getName () const { char buf[128] ; sprintf (buf, "%d", Value) ; return std::string (buf) ; } steghide-0.5.1/src/EncryptionMode.h0000644000076400001440000000406407735577226012721 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_ENCMODE_H #define SH_ENCMODE_H #include class EncryptionMode { public: /// number of bits needed to code the mode static const unsigned int IRep_size = 3 ; /// integer representation of encryption mode enum IRep { ECB = 0, CBC = 1, OFB = 2, CFB = 3, NOFB = 4, NCFB = 5, CTR = 6, STREAM = 7 } ; /** * construct a new EncryptionMode object setting Value to ECB **/ EncryptionMode (void) ; EncryptionMode (IRep irep) ; /** * construct a new EncryptionMode object from a std::string representation * \param srep a valid(!) std::string representation **/ EncryptionMode (std::string srep) ; void setValue (IRep irep) ; std::string getStringRep (void) const ; IRep getIntegerRep (void) const ; bool operator== (const EncryptionMode& mode) const { return (Value == mode.Value) ; } ; static bool isValidStringRep (std::string srep) ; static bool isValidIntegerRep (unsigned int irep) ; static std::string translate (IRep irep) ; static IRep translate (std::string srep) ; private: static const unsigned int NumValues = 8 ; IRep Value ; typedef struct struct_Translation { IRep irep ; char* srep ; } Translation ; static const Translation Translations[] ; } ; #endif // ndef SH_ENCMODE_H steghide-0.5.1/src/EncryptionAlgorithm.h0000644000076400001440000000536207735577226013765 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_ENCALGO_H #define SH_ENCALGO_H #include class EncryptionAlgorithm { public: /// number of bits needed to code the algorithm static const unsigned int IRep_size = 5 ; /// integer representation of encryption algorithm enum IRep { NONE = 0, TWOFISH = 1, RIJNDAEL128 = 2, RIJNDAEL192 = 3, RIJNDAEL256 = 4, SAFERPLUS = 5, RC2 = 6, XTEA = 7, SERPENT = 8, SAFERSK64 = 9, SAFERSK128 = 10, CAST256 = 11, LOKI97 = 12, GOST = 13, THREEWAY = 14, CAST128 = 15, BLOWFISH = 16, DES = 17, TRIPLEDES = 18, ENIGMA = 19, ARCFOUR = 20, PANAMA = 21, WAKE = 22 } ; EncryptionAlgorithm (void) ; EncryptionAlgorithm (IRep irep) ; /** * construct a new EncryptionAlgorithm object from a std::string representation * \param srep a valid(!) std::string representation **/ EncryptionAlgorithm (std::string srep) ; void setValue (IRep irep) ; std::string getStringRep (void) const ; IRep getIntegerRep (void) const ; bool operator== (const EncryptionAlgorithm& algo) const { return (Value == algo.Value) ; } ; /** * check if srep is a valid std::string representation (w.r.t the Translations array) * \param srep a std::string that maybe represents an encryption algorithm fron the Translations table * \return true iff the Translations table contains srep **/ static bool isValidStringRep (std::string srep) ; static bool isValidIntegerRep (unsigned int irep) ; /** * translate an integer representation into the corresponding std::string representation **/ static std::string translate (IRep irep) ; /** * translate a valid std::string representation into the corresponding integer representation **/ static IRep translate (std::string srep) ; private: static const unsigned int NumValues = 23 ; IRep Value ; typedef struct struct_Translation { IRep irep ; char* srep ; } Translation ; static const Translation Translations[] ; } ; #endif // ndef SH_ENCALGO_H steghide-0.5.1/src/ProgressOutput.cc0000644000076400001440000000422507741745563013142 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "ProgressOutput.h" #include "common.h" ProgressOutput::ProgressOutput () : Message("__nomessage__") { LastUpdate = time(NULL) - 1 ; // -1 to ensure that message is written first time } ProgressOutput::ProgressOutput (const std::string& m) : Message(m) { LastUpdate = time(NULL) - 1 ; // -1 to ensure that message is written first time } void ProgressOutput::setMessage (const char *msgfmt, ...) { va_list ap ; va_start (ap, msgfmt) ; setMessage (vcompose (msgfmt, ap)) ; va_end (ap) ; } std::string ProgressOutput::vcompose (const char *msgfmt, va_list ap) const { char *str = new char[200] ; vsnprintf (str, 200, msgfmt, ap) ; std::string retval (str) ; delete[] str ; return retval ; } void ProgressOutput::update (float rate) { time_t now = time(NULL) ; if (LastUpdate < now) { LastUpdate = now ; printf ("\r%s %.1f%%", Message.c_str(), 100.0 * rate) ; fflush (stdout) ; } } void ProgressOutput::done (float rate, float avgweight) const { printf ("\r%s %.1f%%", Message.c_str(), 100.0 * rate) ; if (avgweight != NoAvgWeight) { printf (" (%.1f)", avgweight) ; } printf (_(" done")) ; printf (" \n") ; // be sure to overwrite old line (even in a language with one-letter done) fflush (stdout) ; } void ProgressOutput::done () const { printf ("\r%s", Message.c_str()) ; printf (_(" done\n")) ; } steghide-0.5.1/src/PseudoRandomSource.h0000644000076400001440000000356407735577226013547 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_PSEUDORANDOMSOURCE_H #define SH_PSEUDORANDOMSOURCE_H #include "common.h" /** * \class PseudoRandomSource * \brief this class serves as a source of reproducible (pseudo-)random numbers * * To generate the random numbers, the linear congruetial method is used. * 2^32 is used as modulus. The overflow in the implementation is intended (and * controlled, as UWORD32 is used as datatype which always is 32 bits wide). **/ class PseudoRandomSource { public: /** * construct a PseudoRandomSource object * \param s the seed **/ PseudoRandomSource (UWORD32 s) : Value(s) {} ; /** * get a pseudo-random value from {0,...,n-1} * \param n the range of the random value to be returned * \return a number >= 0 and <= n - 1 * * After calling getValue, the next getValue call will use the next state * of the random number generator (analogous to the C rand() function) **/ UWORD32 getValue (UWORD32 n) ; private: static const UWORD32 A = 1367208549 ; static const UWORD32 C = 1 ; UWORD32 Value ; } ; #endif // ndef SH_PSEUDORANDOMSOURCE_H steghide-0.5.1/src/Matching.cc0000644000076400001440000002523507742076026011643 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "Edge.h" #include "Graph.h" #include "Matching.h" #include "ProgressOutput.h" #include "common.h" #include "msg.h" Matching::Matching (Graph* g, ProgressOutput* po) : TheGraph(g), PrOut(po) { unsigned long nvertices = TheGraph->getNumVertices() ; for (unsigned long i = 0 ; i < nvertices ; i++) { ExposedVertices.push_back (TheGraph->getVertex (i)) ; } VertexInformation.reserve (nvertices) ; for (std::list::iterator i = ExposedVertices.begin() ; i != ExposedVertices.end() ; i++) { VertexInformation.push_back (VertexInfo (i)) ; } Cardinality = 0 ; } Matching::~Matching () { for (std::list::iterator edgeit = MatchingEdges.begin() ; edgeit != MatchingEdges.end() ; edgeit++) { delete (*edgeit) ; } } bool Matching::includesEdge (const Edge& e) const { Vertex* v1 = e.getVertex1() ; Vertex* v2 = e.getVertex2() ; bool v1ok = false, v2ok = false ; if (VertexInformation[v1->getLabel()].isMatched()) { if (*(VertexInformation[v1->getLabel()].getMatchingEdge()) == e) { v1ok = true ; } } if (VertexInformation[v2->getLabel()].isMatched()) { if (*(VertexInformation[v2->getLabel()].getMatchingEdge()) == e) { v2ok = true ; } } return (v1ok && v2ok) ; } void Matching::addEdge (const Edge& e) { VertexLabel vlbl1 = e.getVertex1()->getLabel() ; VertexLabel vlbl2 = e.getVertex2()->getLabel() ; myassert (VertexInformation[vlbl1].isExposed()) ; myassert (VertexInformation[vlbl2].isExposed()) ; std::list::iterator edgeit = MatchingEdges.insert (MatchingEdges.end(), new Edge (e)) ; ExposedVertices.erase (VertexInformation[vlbl1].getExposedIterator()) ; ExposedVertices.erase (VertexInformation[vlbl2].getExposedIterator()) ; VertexInformation[vlbl1].setMatched (edgeit) ; VertexInformation[vlbl2].setMatched (edgeit) ; setCardinality (Cardinality + 1) ; } void Matching::removeEdge (const Edge& e) { Vertex* v1 = e.getVertex1() ; Vertex* v2 = e.getVertex2() ; VertexLabel vlbl1 = v1->getLabel() ; VertexLabel vlbl2 = v2->getLabel() ; // assert: matching contains e myassert (VertexInformation[vlbl1].isMatched()) ; myassert (VertexInformation[vlbl2].isMatched()) ; // delete e from MatchingEdges std::list::iterator eit1 = VertexInformation[vlbl1].getMatchedIterator() ; std::list::iterator eit2 = VertexInformation[vlbl2].getMatchedIterator() ; myassert (eit1 == eit2) ; delete (*eit1) ; MatchingEdges.erase (eit1) ; // add v1,v2 to ExposedVertices std::list::iterator expvit1 = ExposedVertices.insert (ExposedVertices.end(), v1) ; VertexInformation[vlbl1].setExposed (expvit1) ; std::list::iterator expvit2 = ExposedVertices.insert (ExposedVertices.end(), v2) ; VertexInformation[vlbl2].setExposed (expvit2) ; setCardinality (Cardinality - 1) ; } Matching& Matching::augment (const Edge** path, unsigned long len) { // TODO - rewrite this to use structure like: while (+--+==+ -> +==+--+); +--+ -> +==+ where == is matched edge myassert (len % 2 == 1) ; bool e_was_matched = false ; Edge *e = NULL ; Edge *e_before = NULL ; for (unsigned int i = 0 ; i < len ; i++) { // give e the correct orientation (using pointer equivalence of vertices(!)) e = new Edge (*(path[i])) ; if (e_before == NULL) { if (len > 1) { // e is the first, but not the only edge in path if ((e->getVertex1() == path[1]->getVertex1()) || (e->getVertex1() == path[1]->getVertex2())) { e->swap() ; } } } else { if (e->getVertex1() != e_before->getVertex2()) { e->swap() ; } myassert (e->getVertex1() == e_before->getVertex2()) ; } // make changes in VertexInformation, ExposedVertices and MatchingEdges if (e_was_matched) { // at the time this is called, v1 is matched with "v0" Vertex *v2 = e->getVertex2() ; VertexLabel v2lbl = v2->getLabel() ; // remove old edge from matching delete (*(VertexInformation[v2lbl].getMatchedIterator())) ; MatchingEdges.erase (VertexInformation[v2lbl].getMatchedIterator()) ; // v2 is exposed now (for one iteration) std::list::iterator expvit2 = ExposedVertices.insert (ExposedVertices.end(), v2) ; VertexInformation[v2lbl].setExposed (expvit2) ; } else { Vertex *v1 = e->getVertex1() ; Vertex *v2 = e->getVertex2() ; VertexLabel v1lbl = v1->getLabel() ; VertexLabel v2lbl = v2->getLabel() ; // v1 is no longer exposed ExposedVertices.erase (VertexInformation[v1lbl].getExposedIterator()) ; // add new edge to matching std::list::iterator edgeit = MatchingEdges.insert (MatchingEdges.end(), e) ; VertexInformation[v1lbl].setMatched (edgeit) ; VertexInformation[v2lbl].setMatched (edgeit) ; } e_was_matched = !e_was_matched ; e_before = e ; } ExposedVertices.erase (VertexInformation[e->getVertex2()->getLabel()].getExposedIterator()) ; VertexInformation[e->getVertex2()->getLabel()].setMatched (find (MatchingEdges.begin(), MatchingEdges.end(), e)) ; setCardinality (Cardinality + 1) ; return *this ; } Matching& Matching::augment (const std::vector& path) { unsigned long len = path.size() ; const Edge** p = new const Edge*[len] ; for (unsigned long i = 0 ; i < len ; i++) { p[i] = path[i] ; } return augment (p, len) ; } void Matching::printVerboseInfo (void) const { // only used for STATS output if (Args.Verbosity.getValue() == STATS) { float sumweights = 0 ; for (std::list::const_iterator it = MatchingEdges.begin() ; it != MatchingEdges.end() ; it++) { sumweights += (*it)->getWeight() ; } printf ("%.4f:%.1f:", 1.0 - (((float) (getCardinality() * 2)) / ((float) TheGraph->getNumVertices())), // percentage of unmatched vertices ((float) sumweights / (float) getCardinality()) // average edge weight ) ; } } float Matching::getMatchedRate (void) const { return (((float) (2 * Cardinality)) / ((float) TheGraph->getNumVertices())) ; } float Matching::getAvgEdgeWeight (void) const { float sumweights = 0 ; for (std::list::const_iterator it = MatchingEdges.begin() ; it != MatchingEdges.end() ; it++) { sumweights += (*it)->getWeight() ; } return (sumweights / (float) getCardinality()) ; } void Matching::setCardinality (unsigned long c) { Cardinality = c ; if (PrOut) { PrOut->update (getMatchedRate()) ; } } bool Matching::check () const { bool retval = true ; retval = check_MatchingEdges_vs_VertexInformation() && retval ; retval = check_ExposedVertices_vs_VertexInformation() && retval ; retval = check_VertexInformation_Integrity() && retval ; return retval ; } bool Matching::check_MatchingEdges_vs_VertexInformation () const { bool err = false ; // for every e = (v1,v2) in MatchingEdges: isMatched(v1) && isMatched(v2) for (std::list::const_iterator it = MatchingEdges.begin() ; it != MatchingEdges.end() ; it++) { Vertex *v1 = (*it)->getVertex1() ; Vertex *v2 = (*it)->getVertex2() ; if (VertexInformation[v1->getLabel()].isExposed() || VertexInformation[v2->getLabel()].isExposed()) { err = true ; break ; } } if (err) { std::cerr << "FAILED: There is an edge in MatchingEdges that is adjacent to a vertex marked as exposed." << std::endl ; } return !err ; } bool Matching::check_ExposedVertices_vs_VertexInformation () const { bool err = false ; // for every exposed vertex v: isExposed(v) for (std::list::const_iterator it = ExposedVertices.begin() ; it != ExposedVertices.end() ; it++) { if (VertexInformation[(*it)->getLabel()].isMatched()) { err = true ; break ; } } if (err) { std::cerr << "FAILED: There is a vertex in ExposedVertices that is marked matched." << std::endl ; } return !err ; } bool Matching::check_VertexInformation_Integrity () const { bool err_matched = false ; for (unsigned long vlbl = 0 ; vlbl < VertexInformation.size() ; vlbl++) { if (VertexInformation[vlbl].isMatched()) { Edge* e = *(VertexInformation[vlbl].getMatchedIterator()) ; if ((e->getVertex1()->getLabel() != vlbl) && (e->getVertex2()->getLabel() != vlbl)) { if (vlbl == 16) { std::cerr << "FAILED, printing edge:" << std::endl ; e->print() ; } err_matched = true ; break ; } } } if (err_matched) { std::cerr << "FAILED: There is a shortest edge that is not adjacent to its vertex." << std::endl ; } return !err_matched ; } bool Matching::check_ValidAugPath (const std::vector& path) const { // check cohesion bool cohesion = true ; std::vector vertices ; Vertex* lastvertex = NULL ; if (path[1]->contains (path[0]->getVertex1())) { vertices.push_back (path[0]->getVertex2()) ; vertices.push_back (path[0]->getVertex1()) ; lastvertex = path[0]->getVertex1() ; } else if (path[1]->contains (path[0]->getVertex2())) { vertices.push_back (path[0]->getVertex1()) ; vertices.push_back (path[0]->getVertex2()) ; lastvertex = path[0]->getVertex2() ; } else { cohesion = false ; } std::vector::const_iterator it = path.begin() ; for (it++ ; it != path.end() ; it++) { if ((*it)->getVertex1() == lastvertex) { vertices.push_back ((*it)->getVertex2()) ; lastvertex = (*it)->getVertex2() ; } else if ((*it)->getVertex2() == lastvertex) { vertices.push_back ((*it)->getVertex1()) ; lastvertex = (*it)->getVertex1() ; } else { cohesion = false ; } } myassert (vertices.size() - 1 == path.size()) ; // check that path has no loop bool hasloop = false ; unsigned long nvertices = vertices.size() ; for (unsigned long i = 0 ; i < nvertices ; i++) { for (unsigned long j = i + 1 ; j < nvertices ; j++) { if (vertices[i] == vertices[j]) { hasloop = true ; } } } // check that path is augmenting w.r.t. the matching bool isaugmenting = true ; bool shouldinclude = false ; for (std::vector::const_iterator it = path.begin() ; it != path.end() ; it++) { if (shouldinclude) { isaugmenting = includesEdge(*it) && isaugmenting ; } else { isaugmenting = !includesEdge(*it) && isaugmenting ; } shouldinclude = !shouldinclude ; } return cohesion && !hasloop && isaugmenting ; } steghide-0.5.1/src/Graph.cc0000644000076400001440000005543307742076022011151 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include #include "BitString.h" #include "CvrStgFile.h" #include "Edge.h" #include "Graph.h" #include "Selector.h" #include "Vertex.h" #include "common.h" #include "msg.h" #include "wrapper_hash_set.h" Graph::Graph (CvrStgFile *cvr, const BitString& emb, Selector& sel) { Globs.TheGraph = this ; File = cvr ; EmbValueModulus = File->getEmbValueModulus() ; SamplesPerVertex = File->getSamplesPerVertex() ; // construct sposs and tvalues std::vector sposs ; std::vector tvalues ; unsigned long n = emb.getNAryLength() ; for (unsigned long i = 0 ; i < n ; i++) { SamplePos *poss = new SamplePos[File->getSamplesPerVertex()] ; EmbValue modulosum = 0 ; for (unsigned int j = 0 ; j < File->getSamplesPerVertex() ; j++) { poss[j] = sel[(i * File->getSamplesPerVertex()) + j] ; modulosum = (modulosum + File->getEmbeddedValue(poss[j])) % File->getEmbValueModulus() ; } if (modulosum != emb.getNAry(i)) { sposs.push_back (poss) ; tvalues.push_back (emb.getNAry(i)) ; } else { delete[] poss ; } } myassert (sposs.size() == tvalues.size()) ; std::vector svalues ; // will contain pointers to unique sample value objects constructSamples (sposs, svalues) ; myassert (sposs.size() == svalues.size()) ; constructVertices (sposs, svalues, tvalues) ; constructEdges () ; } void Graph::constructSamples (const std::vector& sposs, std::vector& svalues) { const VertexLabel numvertices = sposs.size() ; svalues.resize (numvertices) ; // fill a hash table with the (unique) sample values and svalues with pointers to them sgi::hash_set SampleValues_set ; for (unsigned long i = 0 ; i < numvertices ; i++) { svalues[i] = new SampleValue*[File->getSamplesPerVertex()] ; for (unsigned short j = 0 ; j < File->getSamplesPerVertex() ; j++) { SampleValue *sv = File->getSampleValue (sposs[i][j]) ; sgi::hash_set::iterator res = SampleValues_set.find (sv) ; if (res == SampleValues_set.end()) { // sample has not been found - add it ! SampleValues_set.insert (sv) ; svalues[i][j] = sv ; } else { // sample value is already in SampleValues_set delete sv ; svalues[i][j] = *res ; } } } // move the hash_set SampleValues_set into the vector SampleValues, set sample labels SampleValues = std::vector (SampleValues_set.size()) ; unsigned long label = 0 ; for (sgi::hash_set::const_iterator i = SampleValues_set.begin() ; i != SampleValues_set.end() ; i++) { SampleValues[label] = *i ; SampleValues[label]->setLabel (label) ; label++ ; } } void Graph::constructVertices (std::vector& sposs, std::vector& svalues, const std::vector& tvalues) { const VertexLabel numvertices = sposs.size() ; Vertices = std::vector (numvertices) ; for (VertexLabel i = 0 ; i < numvertices ; i++) { Vertices[i] = new Vertex (i, sposs[i], svalues[i], tvalues[i]) ; } } void Graph::constructEdges () { // create SampleValue Adjacency Lists SVALists = File->calcSVAdjacencyLists (SampleValues) ; // allocate memory for SampleOccurences SampleOccurences = std::vector > (SampleValues.size()) ; DeletedSampleOccurences = std::vector > (SampleValues.size()) ; NumSampleOccurences = std::vector (SampleValues.size()) ; NumDeletedSampleOccurences = std::vector (SampleValues.size()) ; for (SampleValueLabel lbl = 0 ; lbl < SampleValues.size() ; lbl++) { NumSampleOccurences[lbl] = new UWORD32[EmbValueModulus] ; NumDeletedSampleOccurences[lbl] = new UWORD32[EmbValueModulus] ; for (unsigned short t = 0 ; t < EmbValueModulus ; t++) { NumSampleOccurences[lbl][t] = 0 ; NumDeletedSampleOccurences[lbl][t] = 0 ; } } // fill SampleOccurences for (std::vector::iterator vit = Vertices.begin() ; vit != Vertices.end() ; vit++) { for (unsigned short j = 0 ; j < Globs.TheCvrStgFile->getSamplesPerVertex() ; j++) { SampleOccurence occ (*vit, j) ; SampleValueLabel lbl = (*vit)->getSampleValue(j)->getLabel() ; std::list::iterator occit = SampleOccurences[lbl].insert (SampleOccurences[lbl].end(), occ) ; NumSampleOccurences[lbl][(*vit)->getTargetValue(j)]++ ; (*vit)->setSampleOccurenceIt (j, occit) ; } } // compute NumEdges for all sample values for (SampleValueLabel srclbl = 0 ; srclbl < SampleValues.size() ; srclbl++) { for (EmbValue t = 0 ; t < EmbValueModulus ; t++) { UWORD32 numedges = 0 ; for (std::vector::const_iterator destsv = (*(SVALists[t]))[srclbl].begin() ; destsv != (*(SVALists[t]))[srclbl].end() ; destsv++) { numedges += NumSampleOccurences[(*destsv)->getLabel()][SampleValues[srclbl]->getEmbeddedValue()] ; } SampleValues[srclbl]->setNumEdges(t, numedges) ; } } } Graph::~Graph() { for (std::vector::iterator i = Vertices.begin() ; i != Vertices.end() ; i++) { delete *i ; } for (std::vector::iterator svit = SampleValues.begin() ; svit != SampleValues.end() ; svit++) { delete *svit ; } for (EmbValue t = 0 ; t < EmbValueModulus ; t++) { delete SVALists[t] ; } for (SampleValueLabel lbl = 0 ; lbl < SampleValues.size() ; lbl++) { delete[] NumSampleOccurences[lbl] ; delete[] NumDeletedSampleOccurences[lbl] ; } } void Graph::unmarkDeletedAllVertices () { for (std::vector::iterator it = Vertices.begin() ; it != Vertices.end() ; it++) { (*it)->unmarkDeleted() ; } } std::list::iterator Graph::markDeletedSampleOccurence (std::list::iterator it) { Vertex *v = it->getVertex() ; unsigned short i = it->getIndex() ; SampleValueLabel lbl = v->getSampleValue(i)->getLabel() ; SampleOccurences[lbl].erase (it) ; NumSampleOccurences[lbl][v->getTargetValue(i)]-- ; NumDeletedSampleOccurences[lbl][v->getTargetValue(i)]++ ; return DeletedSampleOccurences[lbl].insert (DeletedSampleOccurences[lbl].end(), SampleOccurence (v, i)) ; } std::list::iterator Graph::unmarkDeletedSampleOccurence (std::list::iterator it) { Vertex *v = it->getVertex() ; unsigned short i = it->getIndex() ; SampleValueLabel lbl = v->getSampleValue(i)->getLabel() ; DeletedSampleOccurences[lbl].erase (it) ; NumDeletedSampleOccurences[lbl][v->getTargetValue(i)]-- ; NumSampleOccurences[lbl][v->getTargetValue(i)]++ ; return SampleOccurences[lbl].insert (SampleOccurences[lbl].end(), SampleOccurence (v, i)) ; } float Graph::getAvgVertexDegree () const { unsigned long sumdeg = 0 ; for (std::vector::const_iterator vit = Vertices.begin() ; vit != Vertices.end() ; vit++) { sumdeg += (*vit)->getDegree() ; } return ((float) sumdeg / (float) Vertices.size()) ; } void Graph::printVerboseInfo() { if (Args.Verbosity.getValue() == VERBOSE || Args.Verbosity.getValue() == STATS) { unsigned long sumdeg = 0 ; unsigned long mindeg = ULONG_MAX ; unsigned long maxdeg = 0 ; for (std::vector::iterator i = Vertices.begin() ; i != Vertices.end() ; i++) { unsigned long deg = (*i)->getDegree() ; sumdeg += deg ; if (deg < mindeg) { mindeg = deg ; } if (deg > maxdeg) { maxdeg = deg ; } } float avgdeg = ((float) sumdeg / (float) Vertices.size()) ; myassert (sumdeg % 2 == 0) ; if (Args.Verbosity.getValue() == STATS) { printf ("%lu:%lu:%lu:%lu:%lu:%.1f:", (unsigned long) SampleValues.size(), // number of distinct sample values (unsigned long) Vertices.size(), // number of vertices sumdeg / 2, // number of edges mindeg, // minimum vertex degree maxdeg, // maximum vertex degree avgdeg // average vertex degree ) ; } else { // Verbosity is VERBOSE VerboseMessage vmsg1 (_(" %lu sample values, %lu vertices, %lu edges"), SampleValues.size(), Vertices.size(), sumdeg / 2) ; vmsg1.printMessage() ; } } } bool Graph::check (bool verbose) const { bool retval = true ; retval = check_Vertices(verbose) && retval ; retval = check_SampleValues(verbose) && retval ; retval = check_SampleOccurences(verbose) && retval ; retval = check_SVALists(verbose) && retval ; return retval ; } bool Graph::check_Vertices (bool verbose) const { bool label_consistency = true ; for (unsigned long i = 0 ; i < Vertices.size() ; i++) { label_consistency = (Vertices[i]->getLabel() == i) && label_consistency ; } // check if SampleValue pointers are the same as in SampleValues data structure bool svuniqueness = true ; for (unsigned long i = 0 ; i < Vertices.size() ; i++) { for (unsigned short j = 0 ; j < File->getSamplesPerVertex() ; j++) { SampleValue* sv = Vertices[i]->getSampleValue(j) ; svuniqueness = (sv == SampleValues[sv->getLabel()]) && svuniqueness ; } } return label_consistency && svuniqueness ; } bool Graph::check_SampleValues (bool verbose) const { unsigned long n = SampleValues.size() ; bool label_consistency = true ; for (unsigned long i = 0 ; i < n ; i++) { if (SampleValues[i]->getLabel() != i) { label_consistency = false ; if (verbose) { std::cerr << "----- FAILED: check_SampleValues -----" << std::endl ; std::cerr << "SamplesValue[" << i << "]->getLabel(): " << SampleValues[i]->getLabel() << std::endl ; std::cerr << "--------------------------------------" << std::endl ; } } } bool sv_uniqueness = true ; for (unsigned long i = 0 ; i < n ; i++) { for (unsigned long j = 0 ; j < n ; j++) { if (i != j) { if (*(SampleValues[i]) == *(SampleValues[j])) { sv_uniqueness = false ; if (verbose) { std::cerr << "----- FAILED: check_SampleValues -----" << std::endl ; std::cerr << "uniqueness violated with the following two samples:" << std::endl ; SampleValues[i]->print(1) ; SampleValues[j]->print(1) ; std::cerr << "--------------------------------------" << std::endl ; } } } } } return (label_consistency && sv_uniqueness) ; } bool Graph::check_SampleOccurences (bool verbose) const { bool retval = true ; retval = check_SampleOccurences_size (verbose) && retval ; retval = check_SampleOccurences_correctness (verbose) && retval ; retval = check_SampleOccurences_completeness (verbose) && retval ; return retval ; } bool Graph::check_SampleOccurences_size (bool verbose) const { bool size = (SampleOccurences.size() == SampleValues.size()) ; if (!size && verbose) { std::cerr << std::endl << "---- FAILED: check_SampleOccurences_size ----" << std::endl ; std::cerr << "SampleOccurences.size(): " << SampleOccurences.size() << std::endl ; std::cerr << "SampleValues.size(): " << SampleValues.size() << std::endl ; std::cerr << "-------------------------------------" << std::endl ; } return size ; } bool Graph::check_SampleOccurences_correctness (bool verbose) const { bool correctness = true ; for (unsigned long lbl = 0 ; lbl < SampleValues.size() ; lbl++) { for (std::list::const_iterator socit = SampleOccurences[lbl].begin() ; socit != SampleOccurences[lbl].end() ; socit++) { Vertex *v = socit->getVertex() ; unsigned short idx = socit->getIndex() ; correctness = (v->getSampleValue(idx) == SampleValues[lbl]) && correctness ; // pointer equivalence } } return correctness ; } bool Graph::check_SampleOccurences_completeness (bool verbose) const { bool completeness = true ; for (unsigned long vlbl = 0 ; vlbl < Vertices.size() ; vlbl++) { for (unsigned short j = 0 ; j < File->getSamplesPerVertex() ; j++) { SampleOccurence soc (Vertices[vlbl], j) ; SampleValueLabel svlbl = Vertices[vlbl]->getSampleValue(j)->getLabel() ; completeness = (find(SampleOccurences[svlbl].begin(), SampleOccurences[svlbl].end(), soc) != SampleOccurences[svlbl].end()) && completeness ; } } return completeness ; } bool Graph::check_SVALists (bool verbose) const { bool retval = true ; retval = check_SVALists_size (verbose) && retval ; retval = check_SVALists_soundness (verbose) && retval ; retval = check_SVALists_sorted (verbose) && retval ; retval = check_SVALists_uniqueness (verbose) && retval ; retval = check_SVALists_completeness (verbose) && retval ; return retval ; } bool Graph::check_SVALists_size (bool verbose) const { bool size = true ; for (EmbValue i = 0 ; i < File->getEmbValueModulus() ; i++) { size = (SVALists[i]->getNumRows() == SampleValues.size()) && size ; if ((SVALists[i]->getNumRows() != SampleValues.size()) && verbose) { std::cerr << std::endl << "---- FAILED: check_SVALists_size ----" << std::endl ; std::cerr << "SVALists[" << i << "]->getNumRows(): " << SVALists[i]->getNumRows() << std::endl ; std::cerr << "SampleValues.size(): " << SampleValues.size() << std::endl ; std::cerr << "-------------------------------------" << std::endl ; } } return size ; } bool Graph::check_SVALists_soundness (bool verbose) const { unsigned long numsvs = SampleValues.size() ; // check if everything in SVALists[i][j] really is a neighbour of j and has the embedded value i bool target_ok = true ; bool neigh_ok = true ; for (EmbValue t = 0 ; t < File->getEmbValueModulus() ; t++) { for (SampleValueLabel srclbl = 0 ; srclbl < numsvs ; srclbl++) { SampleValue* srcsv = SampleValues[srclbl] ; const std::vector &row = (*(SVALists[t]))[srclbl]; for (std::vector::const_iterator destsv = row.begin() ; destsv != row.end() ; destsv++) { if ((*destsv)->getEmbeddedValue() != t) { target_ok = false ; if (verbose) { std::cerr << std::endl << "---- FAILED: check_SVALists_soundness ----" << std::endl ; std::cerr << "in SVALists[" << (int) t << "][" << srclbl << "] is a sv with getEmbeddedValue() == " << (*destsv)->getEmbeddedValue() << std::endl ; std::cerr << "-------------------------------------" << std::endl ; } } if (!srcsv->isNeighbour(*destsv)) { neigh_ok = false ; if (verbose) { std::cerr << std::endl << "---- FAILED: check_SVALists_soundness ----" << std::endl ; std::cerr << "in SVALists[" << (int) t << "][" << srclbl << "] is a sv that is not a neighbour of " << srclbl << std::endl ; std::cerr << "-------------------------------------" << std::endl ; } } } } } return target_ok && neigh_ok ; } bool Graph::check_SVALists_sorted (bool verbose) const { unsigned long numsvs = SampleValues.size() ; // check if SVALists[t][l][1...n] have increasing distance bool sorted = true ; for (EmbValue t = 0 ; t < File->getEmbValueModulus() ; t++) { for (SampleValueLabel srclbl = 0 ; srclbl < numsvs ; srclbl++) { SampleValue* srcsv = SampleValues[srclbl] ; const std::vector &row = (*(SVALists[t]))[srclbl] ; if (row.size() > 1) { for (unsigned int i = 0 ; i < (row.size() - 1) ; i++) { UWORD32 d1 = srcsv->calcDistance (row[i]) ; UWORD32 d2 = srcsv->calcDistance (row[i + 1]) ; if (!(d1 <= d2)) { sorted = false ; if (verbose) { std::cerr << std::endl << "---- FAILED: check_SVALists_sorted ----" << std::endl ; std::cerr << "source sample:" << std::endl ; srcsv->print(1) ; std::cerr << "dest sample at position " << i << ":" << std::endl ; row[i]->print(1) ; std::cerr << "dest sample at position " << i + 1 << ":" << std::endl ; row[i + 1]->print(1) ; std::cerr << "-------------------------------------" << std::endl ; } } } } } } return sorted ; } bool Graph::check_SVALists_uniqueness (bool verbose) const { // check if there is no sample value that has two entries in an SVAList bool unique = true ; for (EmbValue t = 0 ; t < File->getEmbValueModulus() ; t++) { for (SampleValueLabel srclbl = 0 ; srclbl < SampleValues.size() ; srclbl++) { for (unsigned int i = 0 ; i < (*(SVALists[t]))[srclbl].size() ; i++) { for (unsigned int j = i + 1 ; j < (*(SVALists[t]))[srclbl].size() ; j++) { if (*((*(SVALists[t]))[srclbl][i]) == *((*(SVALists[t]))[srclbl][j])) { unique = false ; if (verbose) { std::cerr << std::endl << "---- FAILED: check_SVALists_uniqueness ----" << std::endl ; std::cerr << "SVALists[" << (int) t << "][" << srclbl << "][" << i << "]->getLabel() == " << (*(SVALists[t]))[srclbl][i]->getLabel() << std::endl ; std::cerr << "SVALists[" << (int) t << "][" << srclbl << "][" << j << "]->getLabel() == " << (*(SVALists[t]))[srclbl][j]->getLabel() << std::endl ; std::cerr << "-------------------------------------" << std::endl ; } } } } } } return unique ; } bool Graph::check_SVALists_completeness (bool verbose) const { bool ok = true ; unsigned long numsvs = SampleValues.size() ; for (unsigned long i = 0 ; i < numsvs ; i++) { SampleValue *svsrc = SampleValues[i] ; for (unsigned long j = 0 ; j < numsvs ; j++) { SampleValue *svdest = SampleValues[j] ; if (svsrc->isNeighbour(svdest) && (svsrc->getLabel() != svdest->getLabel())) { // svsrc and svdest are neighbours => there must be an entry in SVALists myassert (svdest->isNeighbour (svsrc)) ; const std::vector &row = (*(SVALists[svdest->getEmbeddedValue()]))[i] ; bool found = false ; for (std::vector::const_iterator k = row.begin() ; k != row.end() ; k++) { if ((*k)->getLabel() == j) { found = true ; } } if (!found) { ok = false ; if (verbose) { std::cerr << std::endl << "---- FAILED: check_SVALists_completeness ----" << std::endl ; std::cerr << "sample values "<< svsrc->getLabel() << " and " << svdest->getLabel() << " are neighbours..." << std::endl ; std::cerr << "...but SVALists[" << (int) svdest->getEmbeddedValue() << "][" << i << "] does not contain " << j << std::endl ; std::cerr << "-------------------------------------" << std::endl ; } } } } } return ok ; } #ifdef DEBUG void Graph::print (void) const { unsigned long sumdeg = 0 ; for (std::vector::const_iterator i = Vertices.begin() ; i != Vertices.end() ; i++) { sumdeg += (*i)->getDegree() ; } myassert (sumdeg % 2 == 0) ; std::cout << Vertices.size() << " " << (sumdeg / 2) << " U" << std::endl ; for (unsigned long i = 0 ; i < Vertices.size() ; i++) { std::cout << Vertices[i]->getDegree() << " " << (i + 1) << " 0 0" << std::endl ; for (unsigned short j = 0 ; j < File->getSamplesPerVertex() ; j++) { SampleValue *srcsample = Vertices[i]->getSampleValue(j) ; EmbValue srctarget = Vertices[i]->getTargetValue(j) ; for (unsigned long k = 0 ; k != Vertices.size() ; k++) { if (i != k) { // no loops for (unsigned short l = 0 ; l < File->getSamplesPerVertex() ; l++) { SampleValue *destsample = Vertices[k]->getSampleValue(l) ; EmbValue desttarget = Vertices[k]->getTargetValue(l) ; if ((srcsample->isNeighbour(destsample)) && (srcsample->getEmbeddedValue() == desttarget) && (destsample->getEmbeddedValue() == srctarget)) { std::cout << (k + 1) << " 0" << std::endl ; } } } } } } } void Graph::print_gml (std::ostream& out) const { printPrologue_gml(out) ; srand ((unsigned int) time (NULL)) ; std::vector nodeprinted (Vertices.size()) ; std::vector edgesprinted (Vertices.size()) ; for (unsigned int i = 0 ; i < Vertices.size() ; i++) { printVertex_gml (out, Vertices[i], 1, nodeprinted, edgesprinted, false) ; } printEpilogue_gml(out) ; } void Graph::printVertex_gml (std::ostream& out, Vertex* vstart, unsigned int recdepth, std::vector& nodeprinted, std::vector& edgesprinted, bool start) const { const float width = 1300.0 ; const float height = 1000.0 ; if (!nodeprinted[vstart->getLabel()]) { out << " node [" << std::endl ; out << " id " << vstart->getLabel() << std::endl ; std::string vlabel = "" ; for (unsigned short i = 0 ; i < File->getSamplesPerVertex() ; i++) { vlabel += vstart->getSampleValue(i)->getName() ; if (i != File->getSamplesPerVertex() - 1) { vlabel += "/" ; } } out << " label \"" << vlabel << "\"" << std::endl ; out << " graphics [" << std::endl ; out << " x " << (width * (rand() / (RAND_MAX + 1.0))) << std::endl ; out << " y " << (height * (rand() / (RAND_MAX + 1.0))) << std::endl ; out << " w 10.0" << std::endl ; out << " h 10.0" << std::endl ; out << " type \"rectangle\"" << std::endl ; out << " width 1.0" << std::endl ; if (start) { out << " fill \"#00FF00\"" << std::endl ; } out << " ]" << std::endl ; out << " ]" << std::endl ; } nodeprinted[vstart->getLabel()] = true ; if (recdepth > 0) { EdgeIterator eit (vstart) ; while (!eit.isFinished()) { const Edge* e = *eit ; Vertex* vnext = e->getOtherVertex(vstart) ; if (!edgesprinted[vstart->getLabel()] && !edgesprinted[vnext->getLabel()]) { out << " edge [" << std::endl ; out << " source " << e->getVertex1()->getLabel() << std::endl ; out << " target " << e->getVertex2()->getLabel() << std::endl ; out << " label \"" ; out << e->getVertex1()->getSampleValue(e->getIndex1())->getName() << "/" ; out << e->getVertex2()->getSampleValue(e->getIndex2())->getName() << "\"" << std::endl ; out << " ]" << std::endl ; } ++eit ; } edgesprinted[vstart->getLabel()] = true ; eit.reset() ; while (!eit.isFinished()) { const Edge* e = *eit ; Vertex* vnext = e->getOtherVertex(vstart) ; printVertex_gml (out, vnext, recdepth - 1, nodeprinted, edgesprinted, false) ; ++eit ; } } } void Graph::printPrologue_gml (std::ostream& out) const { out << "graph [" << std::endl ; out << " directed 0" << std::endl ; } void Graph::printEpilogue_gml (std::ostream& out) const { out << "]" << std::endl ; } void Graph::print_Vertices (unsigned short spc) const { char* space = new char[spc + 1] ; for (unsigned short i = 0 ; i < spc ; i++) { space[i] = ' ' ; } space[spc] = '\0' ; std::cerr << space << "Vertices:" << std::endl ; for (std::vector::const_iterator vit = Vertices.begin() ; vit != Vertices.end() ; vit++) { (*vit)->print(spc + 1) ; } } #endif steghide-0.5.1/src/EncryptionAlgorithm.cc0000644000076400001440000000573007735577226014122 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include "EncryptionAlgorithm.h" EncryptionAlgorithm::EncryptionAlgorithm () { setValue (NONE) ; } EncryptionAlgorithm::EncryptionAlgorithm (EncryptionAlgorithm::IRep irep) { setValue (irep) ; } EncryptionAlgorithm::EncryptionAlgorithm (std::string srep) { setValue (translate (srep)) ; } void EncryptionAlgorithm::setValue (EncryptionAlgorithm::IRep irep) { Value = irep ; } std::string EncryptionAlgorithm::getStringRep () const { return translate(Value) ; } EncryptionAlgorithm::IRep EncryptionAlgorithm::getIntegerRep () const { return Value ; } bool EncryptionAlgorithm::isValidStringRep (std::string srep) { bool retval = false ; for (unsigned int i = 0 ; i < NumValues ; i++) { if (Translations[i].srep == srep) { retval = true ; } } return retval ; } bool EncryptionAlgorithm::isValidIntegerRep (unsigned int irep) { return (irep < NumValues) ; } std::string EncryptionAlgorithm::translate (EncryptionAlgorithm::IRep irep) { std::string retval ; bool found = false ; for (unsigned int i = 0 ; i < NumValues ; i++) { if (Translations[i].irep == irep) { retval = std::string (Translations[i].srep) ; found = true ; } } myassert (found) ; return retval ; } EncryptionAlgorithm::IRep EncryptionAlgorithm::translate (std::string srep) { IRep retval = NONE ; bool found = false ; for (unsigned int i = 0 ; i < NumValues ; i++) { if (Translations[i].srep == srep) { retval = Translations[i].irep ; found = true ; } } myassert (found) ; return retval ; } const EncryptionAlgorithm::Translation EncryptionAlgorithm::Translations[] = { { NONE, "none" }, { TWOFISH, "twofish" }, { RIJNDAEL128, "rijndael-128" }, { RIJNDAEL192, "rijndael-192" }, { RIJNDAEL256, "rijndael-256" }, { SAFERPLUS, "saferplus" }, { RC2, "rc2" }, { XTEA, "xtea" }, { SERPENT, "serpent" }, { SAFERSK64, "safer-sk64" }, { SAFERSK128, "safer-sk128" }, { CAST256, "cast-256" }, { LOKI97, "loki97" }, { GOST, "gost" }, { THREEWAY, "threeway" }, { CAST128, "cast-128" }, { BLOWFISH, "blowfish" }, { DES, "des" }, { TRIPLEDES, "tripledes" }, { ENIGMA, "enigma" }, { ARCFOUR, "arcfour" }, { PANAMA, "panama" }, { WAKE, "wake" } } ; steghide-0.5.1/src/MHashKeyGen.h0000644000076400001440000000277307735577226012072 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_MHASHKEYGEN_H #define SH_MHASHKEYGEN_H #include #include class MHashKeyGen { public: MHashKeyGen (void) ; MHashKeyGen (keygenid kgalgo, hashid halgo, unsigned int keysize) ; ~MHashKeyGen (void) ; void setKeySize (unsigned int KeySize) ; void setKeyGenAlgorithm (keygenid algo) ; void setHashAlgorithm (hashid hashalgo) ; void setHashAlgorithms (std::vector hashalgos) ; void setSalt (std::vector salt) ; std::vector createKey (std::string password) ; private: bool ready ; keygenid Algorithm ; KEYGEN AlgorithmData ; unsigned int KeySize ; void *s_malloc (size_t size) ; } ; #endif // ndef SH_MHASHKEYGEN_H steghide-0.5.1/src/BFSAPHeuristic.cc0000644000076400001440000001110607735577226012626 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "BFSAPHeuristic.h" #include "Edge.h" #include "EdgeIterator.h" #include "Graph.h" #include "Matching.h" #include "common.h" BFSAPHeuristic::BFSAPHeuristic (Graph* g, Matching* m) : MatchingAlgorithm (g, m, 100.0) { unsigned long numvertices = g->getNumVertices() ; VertexVisited = new bool[numvertices] ; BackEdge = new Edge[numvertices] ; for (VertexLabel l = 0 ; l < numvertices ; l++) { VertexVisited[l] = false ; } } BFSAPHeuristic::~BFSAPHeuristic () { delete[] VertexVisited ; delete[] BackEdge ; } void BFSAPHeuristic::run () { const Edge** path = new const Edge*[TheGraph->getNumVertices()] ; const std::list ExposedVertices = TheMatching->getExposedVertices() ; for (std::list::const_iterator expv = ExposedVertices.begin() ; (expv != ExposedVertices.end()) && (TheMatching->getCardinality() < CardinalityGoal) ; expv++) { if (TheMatching->isExposed (*expv)) { unsigned long pathlength = searchAugmentingPath (*expv, path) ; #ifdef DEBUG if (pathlength == 0) { printDebug (5, "BFSAPHeuristic: could not find augmenting path for vertex %lu", (*expv)->getLabel()) ; } else { if (RUNDEBUGLEVEL(5)) { std::cerr << "BFSAPHeuristic: found augmenting path for vertex " << (*expv)->getLabel() << ": " ; for (unsigned long i = 0 ; i < pathlength ; i++) { std::cerr << path[i]->getVertex1()->getLabel() << "-" << path[i]->getVertex2()->getLabel() ; if (i != pathlength - 1) { std::cerr << ", " ; } } std::cerr << std::endl ; } } #endif if (pathlength > 0) { TheMatching->augment ((const Edge**) path, pathlength) ; } } } delete[] path ; } unsigned long BFSAPHeuristic::searchAugmentingPath (Vertex *v0, const Edge** path) { #ifdef DEBUG printDebug (5, "BFSAPHeuristic: starting search for augmenting path from vertex %lu", v0->getLabel()) ; #endif unsigned long pathlen = 0 ; bool foundap = false ; std::list srclist ; std::list destlist ; srclist.push_back (v0) ; VertexVisited[v0->getLabel()] = true ; for (unsigned int depth = 0 ; !foundap && !srclist.empty() ; depth++) { myassert (destlist.empty()) ; // for all vertices v1 in srclist... for (std::list::const_iterator vit = srclist.begin() ; vit != srclist.end() && !foundap ; vit++) { Vertex* v1 = *vit ; #ifdef DEBUG printDebug (6, "BFSAPHeuristic: starting search iteration from vertex %lu", v1->getLabel()) ; #endif // ...iterate through all... EdgeIterator edgeit (v1) ; while (!edgeit.isFinished() && !foundap) { Edge e = **edgeit ; // ...unmatched edges of v1 if (!TheMatching->includesEdge(e)) { Vertex* v2 = e.getOtherVertex(v1) ; #ifdef DEBUG printDebug (7, "BFSAPHeuristic: examining unmatched edge %lu - %lu", v1->getLabel(), v2->getLabel()) ; #endif if (!VertexVisited[v2->getLabel()]) { // v2 is not yet visited -> visit it! VertexVisited[v2->getLabel()] = true ; BackEdge[v2->getLabel()] = e ; if (TheMatching->isExposed(v2)) { // an augmenting path has been found! foundap = true ; pathlen = 2 * depth + 1 ; // build path backwards Vertex *v = v2 ; for (int j = pathlen - 1 ; j >= 0 ; j--) { path[j] = &BackEdge[v->getLabel()] ; v = BackEdge[v->getLabel()].getOtherVertex(v) ; } } else { // continue searching Edge me = *(TheMatching->getMatchingEdge(v2)) ; Vertex* v3 = me.getOtherVertex(v2) ; BackEdge[v3->getLabel()] = me ; destlist.push_back (v3) ; // use v3 as a v1 in next iteration VertexVisited[v3->getLabel()] = true ; } } } ++edgeit ; } } if (!foundap) { // prepare for next iteration srclist.clear() ; srclist.splice (srclist.begin(), destlist) ; } } return pathlen ; } steghide-0.5.1/src/BmpPaletteSampleValue.h0000644000076400001440000000333407735577226014155 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BMPPALETTESAMPLEVALUE_H #define SH_BMPPALETTESAMPLEVALUE_H #include "BmpSampleValue.h" #include "CvrStgFile.h" #include "ColorPalette.h" #include "common.h" /** * \class BmpPaletteSampleValue * \brief a sample in a bmp palette (i.e. in a 1-,4- or 8-bit) file **/ class BmpPaletteSampleValue : public BmpSampleValue { public: BmpPaletteSampleValue (BYTE i) ; SampleValue* getNearestTargetSampleValue (EmbValue t) const ; std::string getName (void) const ; BYTE getIndex (void) const { return Index ; } ; BYTE getRed (void) const { return (*Palette)[Index].Red ; } ; BYTE getGreen (void) const { return (*Palette)[Index].Green ; } ; BYTE getBlue (void) const { return (*Palette)[Index].Blue ; } ; private: ColorPalette* Palette ; BYTE Index ; EmbValue calcEValue (BYTE idx) const { return (idx % Globs.TheCvrStgFile->getEmbValueModulus()) ; } ; } ; #endif // ndef SH_BMPPALETTESAMPLEVALUE_H steghide-0.5.1/src/Terminal.cc0000644000076400001440000000422307735577226011670 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "common.h" #include "error.h" #include "Terminal.h" #ifdef HAVE_TERMIOS_H Terminal::Terminal () { if ((tcgetattr (STDIN_FILENO, &InitAttr)) != 0) { throw SteghideError (_("could not get terminal attributes.")) ; } } void Terminal::EchoOff () { struct termios curattr ; if ((tcgetattr (STDIN_FILENO, &curattr)) != 0) { throw SteghideError (_("could not get terminal attributes.")) ; } curattr.c_lflag &= ~ECHO ; if ((tcsetattr (STDIN_FILENO, TCSAFLUSH, &curattr)) != 0) { throw SteghideError (_("could not set terminal attributes.")) ; } } void Terminal::SingleKeyOn () { struct termios curattr ; if ((tcgetattr (STDIN_FILENO, &curattr)) != 0) { throw SteghideError (_("could not get terminal attributes.")) ; } curattr.c_lflag &= ~ICANON ; curattr.c_cc[VTIME] = 0 ; curattr.c_cc[VMIN] = 1 ; if ((tcsetattr (STDIN_FILENO, TCSAFLUSH, &curattr)) != 0) { throw SteghideError (_("could not set terminal attributes.")) ; } } void Terminal::reset () { if ((tcsetattr (STDIN_FILENO, TCSANOW, &InitAttr)) != 0) { throw SteghideError (_("could not set terminal attributes.")) ; } } #else // TODO - do something that makes more sense - especially on Windows systems Terminal::Terminal() {} void Terminal::EchoOff() {} void Terminal::SingleKeyOn() {} void Terminal::reset() {} #endif // def HAVE_TERMIOS_H steghide-0.5.1/src/WavChunkUnused.h0000644000076400001440000000250507735577226012672 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_WAVCHUNKUNUSED_H #define SH_WAVCHUNKUNUSED_H #include "common.h" #include "WavChunk.h" class BinaryIO ; class WavChunkHeader ; class WavChunkUnused : public WavChunk { public: WavChunkUnused (void) : WavChunk() {} ; WavChunkUnused (WavChunkHeader *chh) : WavChunk(chh) {} ; WavChunkUnused (WavChunkHeader *chh, BinaryIO *io) : WavChunk(chh) { read(io) ; } ; void read (BinaryIO *io) ; void write (BinaryIO *io) ; private: std::vector Data ; } ; #endif // ndef SH_WAVCHUNKUNUSED_H steghide-0.5.1/src/BitString.h0000644000076400001440000002014107735577226011661 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BITSTRING_H #define SH_BITSTRING_H #include #include #include "AUtils.h" #include "common.h" /** * \class BitString * \brief a string of bits * * This class provides a way to conveniently store and * manipulate a string of bits. Various objects can be * appended to a BitString. * * For data storage a vector of BYTEs is used with little * endian bit encoding, i.e. the first bit is the least * significant bit of the first byte and so on. **/ class BitString { public: /** * construct an empty BitString **/ BitString (EmbValue arity = 2) ; /** * copy constructor **/ BitString (const BitString& bs) ; /** * construct a BitString containing l bits with value zero **/ BitString (const unsigned long l) ; /** * construct a BitString containing the data in d **/ BitString (const std::vector& d) ; /** * construct a BitString containing the characters in d as 8 bit unsigned chars **/ BitString (const std::string& d) ; void setArity (EmbValue arity) ; EmbValue getArity (void) const { return Arity ; } ; /** * get the number of bits in this BitString **/ UWORD32 getLength (void) const { return Length ; } ; /** * get the number of EmbValues in this BitString (using this BitString's arity) **/ UWORD32 getNAryLength (void) const { return AUtils::div_roundup (Length, ArityNBits) ; } ; /** * delete the contents of this Bitstring **/ BitString& clear (void) ; /** * append the bit v to this BitString **/ BitString& append (const BIT v) ; /** * append n lower order bits of v to this BitString * \param v the value to be appended * \param n the number of bits to be appended **/ BitString& append (const BYTE v, const unsigned short n = 8) ; /** * append n lower order bits of v to this BitString * \param v the value to be appended * \param n the number of bits to be appended **/ BitString& append (const UWORD16 v, const unsigned short n = 16) ; /** * append n lower order bits of v to this BitString * \param v the value to be appended * \param n the number of bits to be appended **/ BitString& append (const UWORD32 v, const unsigned short n = 32) ; /** * append the string v to this BitString **/ BitString& append (const std::string& v) ; /** * append the vector v byte-wise to this BitString **/ BitString& append (const std::vector& v) ; /** * append the BitString v to this BitString * \param v the BitString to be appended **/ BitString& append (const BitString& v) ; /** * set the p-th bit to v * \param i the index (must be < getLength()) * \param v the value **/ BitString& setBit (unsigned long i, BIT v) ; /** * get a BitString that is a part of this BitString * \param s the index of the first bit to be copied from this BitString * \param l the total number of bits to be used for the return value * \return the BitString containing of the bits [s...s+(l-1)] of this BitString **/ BitString getBits (const unsigned long s, const unsigned long l) const ; /** * cut some bits out of this BitString * \param s the index of the first bit to be removed from this BitString * \param l the total number of bits to be removed * \return the BitString containing of the bits [s...s+(l-1)] of this BitString * * After calling cutBits, this BitString consists of the bits 0,...,s-1,s+l,... . **/ BitString cutBits (const unsigned long s, const unsigned long l) ; /** * return a value composed from bits in this BitString * \param s the index of the first bit to be used for the return value * \param l the total number of bits to be used for the return value (must be <= 32) * \return the value (*this)[s],...,(*this)[s+l-1] **/ UWORD32 getValue (const unsigned long s, const unsigned short l) const ; /** * get the contents of this BitString as vector of bytes * \return the contents of this BitString as vector of bytes * * getLength() % 8 must be 0 to call this function **/ const std::vector& getBytes (void) const ; /** * truncate this BitString * \param s start * \param e end * \return this BitString modified to contain only (*this)[s]...(*this)[e - 1] **/ BitString& truncate (const unsigned long s, const unsigned long e) ; /** * pad this BitString with the value in v * \param mult this BitString is padded until size is a multiple of mult (given in bits) * \param v the value this BitString should be padded with **/ BitString& pad (const unsigned long mult, const BIT v) ; /** * pad this BitString with random data * \param mult this BitString is padded until size is a multiple of mult (given in bits) **/ BitString& padRandom (const unsigned long mult) ; /** * get an n-ary digit from this BitString * \param p the position (in the n-ary representation of this BitString) * \return the p-th n-ary digit **/ BYTE getNAry (unsigned long p) const ; /** * append an n-ary digit to this BitString * \param v the n-ary value to be appended **/ void appendNAry (BYTE v) ; #ifdef USE_ZLIB /** * compress this BitString using zlib's compress2 function * \param level the compression level (ranging from 1 (best speed) to 9 (best compression) * * As zlib operates on byte vectors and not on bit vectors, this BitString is padded * with zeros until the next byte boundary before starting the compression. **/ BitString& compress (int level) ; /** * uncompress this BitString using zlib's uncompress function * \param idestlen the length of the uncompressed data (in bits) * \return this BitString modified to contain exactly idestlen uncompressed bits * * idestlen must be the size of the uncompressed data (in bits) to make * it possible to allocate a destination buffer and to give information * about the length of the uncompressed data without padding. * * A precondition for calling this function is that this BitString actually * contains data that has been compressed by the BitString::compress function, * and especially that the Length % 8 is 0. **/ BitString& uncompress (unsigned long idestlen) ; #endif // def USE_ZLIB /** * get the value of the i-th bit **/ BIT operator[] (const unsigned long i) const ; /** * xor v with this BitString, saving the result in this Bitstring. * The result has the same length as this BitString. **/ BitString& operator^= (const BitString &v) ; /** * compare this BitString with the BitString v * \return true iff the lengths are equal and for every valid index the value is equal **/ bool operator== (const BitString& v) const ; /** * compare this BitString with the BitString v * \return true iff the lengths are not equal or there exists an index with different values **/ bool operator!= (const BitString& v) const ; void print (unsigned short spc = 0) const ; #ifdef DEBUG void printDebug (unsigned short level, unsigned short spc = 0) const ; #endif private: /// the number of bits in Data UWORD32 Length ; /// the arity that will be used for getLength/getNAry/appendNAry EmbValue Arity ; /// the number of Bits per n-ary digit (where n is Arity) unsigned short ArityNBits ; /// the actual data std::vector Data ; void _append (BIT v) ; /** * clear unused part of last byte (_append depends on this) **/ void clearUnused (void) ; } ; #endif // ndef SH_BITSTRING_H steghide-0.5.1/src/RandomSource.h0000644000076400001440000000410007735577226012352 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_RANDOMSOURCE_H #define SH_RANDOMSOURCE_H #include #include class BitString ; /** * \class RandomSource * \brief objects of this class are used as a source of random (non reproduceable) data **/ class RandomSource { public: RandomSource (void) ; ~RandomSource (void) ; /** * get a random byte * \return a random byte **/ BYTE getByte (void) ; /** * get n random bytes * \param n the number of requested random bytes * \return n random bytes **/ std::vector getBytes (unsigned int n) ; /** * get n random bits * \param n the number of requested random bits * \return a BitString containing n random bits **/ BitString getBits (unsigned int n) ; /** * get a boolean value * \return true of false with equal probability **/ bool getBool (void) ; /** * get a random value * \param n the range of the random value to be returned * \return a random number in {0,...,n-1} **/ unsigned long getValue (unsigned long n) ; private: unsigned int RandomBytePos ; BYTE RandomByte ; /** * determines the random input - is either opened file pointer to * /dev/urandom or NULL (the rand() function is then used as random source) **/ FILE *RandomInput ; } ; #endif // ndef SH_RANDOMSOURCE_H steghide-0.5.1/src/AudioData.h0000644000076400001440000001156207735577225011615 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_AUDIODATA_H #define SH_AUDIODATA_H #include #include "AudioSampleValue.h" class BinaryIO ; #include "CvrStgObject.h" /** * \class AudioData * \brief interface definition for AudioData objects. * * This class is necessary to provide one common base class for all types * of audio data, i.e. all different instances of AudioDataImpl. **/ class AudioData : public CvrStgObject { public: /// constant that can be used as parameter to read and write to indicate that there is no limit static const UWORD32 NoLimit = 0 ; virtual void read (BinaryIO* io, UWORD32 n = NoLimit) = 0 ; virtual void write (BinaryIO* io, UWORD32 n = NoLimit) = 0 ; } ; /** * \class AudioDataImpl * \brief implementation of the AudioData-Interface **/ template > class AudioDataImpl : public AudioData { public: AudioDataImpl (CvrStgFile* f) : TheCvrStgFile(f) {} ; virtual ~AudioDataImpl (void) {} ; void read (BinaryIO* io, UWORD32 n = AudioData::NoLimit) ; void write (BinaryIO* io, UWORD32 n = AudioData::NoLimit) ; unsigned long getNumSamples (void) const ; SampleValue* getSampleValue (const SamplePos pos) const ; void replaceSample (const SamplePos pos, const SampleValue* s) ; private: std::vector Data ; CvrStgFile* TheCvrStgFile ; ValueType readValue (BinaryIO* io) const ; void writeValue (BinaryIO* io, ValueType v) const ; } ; #include "error.h" template void AudioDataImpl::read (BinaryIO* io, UWORD32 n) { try { if (n == NoLimit) { Data.clear() ; while (!io->eof()) { Data.push_back (readValue(io)) ; } } else { Data.resize (n) ; for (UWORD32 i = 0 ; i < n ; i++) { Data[i] = readValue(io) ; } } } catch (BinaryInputError e) { switch (e.getType()) { case BinaryInputError::FILE_ERR: { throw SteghideError (_("an error occured while reading the audio data from the file \"%s\"."), io->getName().c_str()) ; break ; } case BinaryInputError::FILE_EOF: { throw SteghideError (_("premature end of file \"%s\" while reading audio data."), io->getName().c_str()) ; break ; } case BinaryInputError::STDIN_ERR: { throw SteghideError (_("an error occured while reading the audio data from standard input.")) ; break ; } case BinaryInputError::STDIN_EOF: { throw SteghideError (_("premature end of data from standard input while reading audio data.")) ; break ; } } } } template void AudioDataImpl::write (BinaryIO* io, UWORD32 n) { try { if (n == NoLimit) { n = Data.size() ; } for (UWORD32 i = 0 ; i < n ; i++) { writeValue (io, Data[i]) ; } } catch (BinaryOutputError e) { switch (e.getType()) { case BinaryOutputError::FILE_ERR: { throw SteghideError (_("an error occured while writing the audio data to the file \"%s\"."), io->getName().c_str()) ; break ; } case BinaryOutputError::STDOUT_ERR: { throw SteghideError (_("an error occured while writing the audio data to standard output.")) ; break ; } } } } template unsigned long AudioDataImpl::getNumSamples (void) const { return Data.size() ; } template SampleValue* AudioDataImpl::getSampleValue (const SamplePos pos) const { myassert (pos < Data.size()) ; return ((SampleValue*) new SampleValueType (Data[pos])) ; } template void AudioDataImpl::replaceSample (const SamplePos pos, const SampleValue* s) { const SampleValueType* sample = dynamic_cast (s) ; myassert (sample) ; myassert (pos < Data.size()) ; Data[pos] = sample->getValue() ; } #endif // ndef SH_AUDIODATA_H steghide-0.5.1/src/DMDConstructionHeuristic.h0000644000076400001440000000317607735577226014664 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_DMDCONSTRUCTIONHEURISTIC_H #define SH_DMDCONSTRUCTIONHEURISTIC_H #include "MatchingAlgorithm.h" class Vertex ; #include "common.h" /** * \class DMDConstructionHeuristic * \brief an implementation of the "dynamic minimum degree" heuristic for contruction a matching **/ class DMDConstructionHeuristic : public MatchingAlgorithm { public: DMDConstructionHeuristic (Graph* g, Matching* m, float goal = 100.0) ; virtual ~DMDConstructionHeuristic (void) {} ; const char* getName (void) const { return "Dynamic Minimum Degree Construction Heuristic" ; } ; void run (void) ; private: static const VertexLabel MinDegNotFound = VERTEXLABEL_MAX ; std::vector AvailableVertices ; VertexLabel findMinDegIndex (const std::vector& vertices) ; } ; #endif // ndef SH_DMDCONSTRUCTIONHEURISTIC_H steghide-0.5.1/src/BmpFile.h0000644000076400001440000001170007735577226011273 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BMPFILE_H #define SH_BMPFILE_H #include #include "CvrStgFile.h" class BinaryIO ; class ColorPalette ; class BmpFile : public CvrStgFile { public: BmpFile (void) ; BmpFile (BinaryIO *io) ; ~BmpFile (void) ; void read (BinaryIO *io) ; void write (void) ; std::list getProperties (void) const ; std::vector getMatchingAlgorithms (Graph* g, Matching* m) const ; unsigned long getNumSamples (void) const ; void replaceSample (const SamplePos pos, const SampleValue* s) ; SampleValue* getSampleValue (SamplePos pos) const ; std::vector calcSVAdjacencyLists (const std::vector& svs) const ; unsigned short getBitCount (void) const ; unsigned long getWidth (void) const ; unsigned long getHeight (void) const ; ColorPalette *getPalette (void) const ; protected: typedef struct struct_BITMAPFILEHEADER { unsigned short bfType ; unsigned long bfSize ; unsigned short bfReserved1 ; unsigned short bfReserved2 ; unsigned long bfOffBits ; } BITMAPFILEHEADER ; /* windows bmp file format */ typedef struct struct_BITMAPINFOHEADER { unsigned long biSize ; signed long biWidth ; signed long biHeight ; unsigned short biPlanes ; unsigned short biBitCount ; unsigned long biCompression ; unsigned long biSizeImage ; signed long biXPelsPerMeter ; signed long biYPelsPerMeter ; unsigned long biClrUsed ; unsigned long biClrImportant ; } BITMAPINFOHEADER ; /* os/2 bmp file format */ typedef struct struct_BITMAPCOREHEADER { unsigned long bcSize; unsigned short bcWidth; unsigned short bcHeight; unsigned short bcPlanes; unsigned short bcBitCount; } BITMAPCOREHEADER ; private: static const unsigned int IdBm = 19778 ; static const unsigned short SizeBMFILEHEADER = 14 ; static const unsigned short SizeBMINFOHEADER = 40 ; static const unsigned short SizeBMCOREHEADER = 12 ; static const unsigned int COMPRESSION_BI_RGB = 0 ; static const unsigned short SamplesPerVertex_SmallPalette = 2 ; static const unsigned short SamplesPerVertex_LargePalette = 3 ; static const unsigned short SamplesPerVertex_RGB = 2 ; /// the default radius for palette images (400 = 20^2) static const UWORD32 Radius_Palette = 400 ; /// the default radius for RGB images (100 = 10^2) static const UWORD32 Radius_RGB = 100 ; static const EmbValue EmbValueModulus_SmallPalette = 2 ; static const EmbValue EmbValueModulus_LargePalette = 4 ; static const EmbValue EmbValueModulus_RGB = 4 ; // if changed here - also change BmpRGBSampleValue::calcEValue enum SUBFORMAT { WIN, OS2 } ; SUBFORMAT subformat ; BITMAPFILEHEADER bmfh ; BITMAPINFOHEADER bmih ; BITMAPCOREHEADER bmch ; ColorPalette* Palette ; /** * contains the bitmap in the following format * bitmap[i] is the pixel data of the i-th row of the bitmap * bitmap[i][j] is the j-th byte of the pixel data of the i-th row of the bitmap * if bitcount is < 8 then bitmap[i][j] contains the pixels as read in from the file (i.e. in the "wrong" direction) * this is taken care of in the calcRCB function **/ std::vector > bitmap ; /** * contains the bitmap data in the same order as read from file (but without padding bytes) **/ std::vector BitmapData ; /// contains bytes that are appended at the end of the bitmap data (some image editors apparently do this) std::vector atend ; void readheaders () ; void bmpwin_readheaders () ; void bmpos2_readheaders () ; void writeheaders () ; void bmpwin_writeheaders () ; void bmpos2_writeheaders () ; void readdata () ; void writedata () ; /** * translate a sample position into a pair "pointing" into the BitmapData array * \param pos a sample position * \param index a pointer to a variable that will contain the array index used to access the pos-th sample * \param firstbit the firstbit in BitmapData[index] that belongs to the sample with the given position **/ void calcIndex (SamplePos pos, unsigned long* index, unsigned short* firstbit) const ; unsigned long calcLinelength () ; SUBFORMAT getSubformat (void) const ; } ; #endif /* ndef SH_BMPFILE_H */ steghide-0.5.1/src/MCryptPP.h0000644000076400001440000000725207735577226011442 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #ifdef USE_LIBMCRYPT #ifndef SH_MCRYPTPP_H #define SH_MCRYPTPP_H #include #include class BitString ; class EncryptionAlgorithm ; class EncryptionMode ; #ifdef WIN32 #define MCRYPTPP_LIBDIR "./modules/" #else #define MCRYPTPP_LIBDIR NULL #endif class MCryptPP { public: MCryptPP (void) ; MCryptPP (EncryptionAlgorithm a, EncryptionMode m) ; ~MCryptPP (void) ; /** * open the libmcrypt module algo/mode * \param a the encryption algorithm * \param m the encryption mode (must be supported by the given encryption algorithm) **/ void open (EncryptionAlgorithm a, EncryptionMode m) ; /** * close the opened libmcrypt module **/ void close (void) ; /** * encrypt p using pp as passphrase * \param p the plaintext to be encrypted * \param pp the passphrase * \return the encrypted data (with the IV as first block (if an IV is used by this mode)) **/ BitString encrypt (BitString p, std::string pp) ; /** * decrypt c using pp as passphrase * \param c the ciphertext to be decrypted (with the IV as first block (if an IV is used by this mode)) * \param pp the passphrase * \return the plain data data (without IV) **/ BitString decrypt (BitString c, std::string pp) ; EncryptionAlgorithm getAlgorithm (void) const ; EncryptionMode getMode (void) const ; /** * get the size of an encryption result * \param a the algorithm to be used for encryption * \param m the mode to be used for encryption * \param plnsize the size of the plaintext (in bits) * \return the size the ciphertext would have (in bits and including the IV) **/ static unsigned long getEncryptedSize (EncryptionAlgorithm a, EncryptionMode m, unsigned long plnsize) ; static std::vector getListModes (void) ; static std::vector getListAlgorithms (void) ; static bool AlgoSupportsMode (EncryptionAlgorithm a, EncryptionMode m) ; protected: void *createKey (std::string pp) ; /** * do the actual encryption * \param p the plaintext to be encrypted * \param pp the passphrase * \return the encrypted data (with the IV as first block (if an IV is used by this mode)) * * The size of p must be a multiple of the blocksize of the encryption algorithm. **/ std::vector _encrypt (std::vector p, std::string pp) ; /** * do the actual decryption * \param c the ciphertext to be decrypted (with the IV as first block (if an IV is used by this mode)) * \param pp the passphrase * \return the decrypted data * * The size of c must be a multiple of the blocksize of the encryption algorithm. **/ std::vector _decrypt (std::vector c, std::string pp) ; private: /// true iff CryptD contains a valid encryption descriptor bool ModuleOpen ; MCRYPT MCryptD ; void *s_malloc (size_t size) ; } ; #endif // ndef SH_MCRYPTPP_H #endif // def USE_LIBMCRYPT steghide-0.5.1/src/Session.h0000644000076400001440000000267507735577226011413 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_SESSION_H #define SH_SESSION_H #include #include #include "common.h" class Session { public: Session (void) {} ; void run (void) ; private: std::string stripDir (std::string s) const ; void printInfo (void) ; void printEncInfo (void) ; void printVersion (void) ; void printHelp (void) ; void printLicense (void) ; #ifdef DEBUG void printFrequencies (void) ; /** * add the frequencies in f2 to those in f1 (changing only f1 - like f1 += f2) **/ void addFrequencies (std::map* f1, const std::map* f2) ; #endif } ; #endif //ndef SH_SESSION_H steghide-0.5.1/src/MatchingAlgorithm.h0000644000076400001440000000252707735577226013365 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_MATCHINGALGORITHM_H #define SH_MATCHINGALGORITHM_H class Graph ; class Matching ; class MatchingAlgorithm { public: MatchingAlgorithm (Graph* g, Matching* m, float goal) ; virtual ~MatchingAlgorithm (void) {} ; virtual void run (void) = 0 ; Matching* getMatching (void) const { return TheMatching ; } ; void setGoal (float goal) ; virtual const char* getName (void) const = 0 ; protected: Graph* TheGraph ; Matching* TheMatching ; unsigned long CardinalityGoal ; } ; #endif // ndef SH_MATCHINGALGORITHM steghide-0.5.1/src/RGBTriple.cc0000644000076400001440000000246507735577226011715 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "RGBTriple.h" UWORD32 RGBTriple::calcDistance (const RGBTriple& t) const { int dr = (int) Red - (int) t.Red ; int dg = (int) Green - (int) t.Green ; int db = (int) Blue - (int) t.Blue ; return (UWORD32) (dr*dr + dg*dg + db*db) ; } bool RGBTriple::operator== (const RGBTriple& t) const { return ((Red == t.Red) && (Green == t.Green) && (Blue == t.Blue)) ; } bool RGBTriple::operator!= (const RGBTriple& t) const { return ((Red != t.Red) || (Green != t.Green) || (Blue != t.Blue)) ; } steghide-0.5.1/src/PseudoRandomSource.cc0000644000076400001440000000214107735577226013673 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "PseudoRandomSource.h" UWORD32 PseudoRandomSource::getValue (UWORD32 n) { // doing the step of the linear congruential method Value = A * Value + C ; // scale value to [0...1) and multiply with n return (UWORD32) (((double) n) * ((double) Value / (double) 4294967296.0)) ; } steghide-0.5.1/src/Graph.h0000644000076400001440000001534707735577226011031 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_GRAPH_H #define SH_GRAPH_H #include #include #include #include #include #include "EdgeIterator.h" #include "SampleValueAdjacencyList.h" #include "common.h" #include "wrapper_hash_set.h" class BitString ; class SampleOccurence ; class Selector ; class Vertex ; class VertexContent ; struct VertexContentsEqual ; /** * \class Graph * \brief a graph constructed from a cover file and a message to be embedded * * This class provides a purely graph-theoretic interface to any other class. * Some classes however need access to the internal (steganographic) representation, * for example: Vertex, EdgeIterator,... . These are declared as friends of Graph here and * thus have direct access to the private data structures. **/ class Graph { public: /** * construct a graph * \param cvr the underlying cover file * \param emb the bitstring to be embedded (with correct arity already set) **/ Graph (CvrStgFile* cvr, const BitString& emb, Selector& sel) ; /** * destructor **/ ~Graph (void) ; /** * get the number of vertices in this graph **/ unsigned long getNumVertices (void) const { return Vertices.size() ; } ; /** * get a vertex * \param l the vertex label (index) of the vertex to be returned (must be < getNumVertices()) * \return the vertex with label l **/ Vertex* getVertex (VertexLabel l) const { return Vertices[l] ; } ; void unmarkDeletedAllVertices (void) ; /** * calculate and return the average vertex degree **/ float getAvgVertexDegree (void) const ; void printVerboseInfo (void) ; /** * check the integrity of all data structures, * only used for debugging and testing **/ bool check (bool verbose = false) const ; /** * check the integrity of the Vertices data structure, * only used for debugging and testing **/ bool check_Vertices (bool verbose = false) const ; /** * check the integrity of the SampleValues data structure, * only used for debugging and testing **/ bool check_SampleValues (bool verbose = false) const ; /** * check the integrity of the SampleOccurences data structure, * it is assumed that DeletedSampleOccurences is empty, * only used for debugging and testing **/ bool check_SampleOccurences (bool verbose = false) const ; /** * check the integrity of the SVALists data structure, * only used for debugging and testing **/ bool check_SVALists (bool verbose = false) const ; #ifdef DEBUG /** * prints graph in a format suitable as input to the C implementation * of Gabow's non-weighted matching algorithm by E. Rothberg to stdout * (available at: ftp://ftp.zib.de/pub/Packages/mathprog/matching/index.html **/ void print (void) const ; void print_gml (std::ostream& out) const ; void printVertex_gml (std::ostream& out, Vertex* v, unsigned int recdepth, std::vector& nodeprinted, std::vector& edgesprinted, bool start = true) const ; void printPrologue_gml (std::ostream& out) const ; void printEpilogue_gml (std::ostream& out) const ; void print_Vertices (unsigned short spc = 0) const ; #endif private: // // friend-declarations // friend class WKSConstructionHeuristic ; friend class EdgeIterator ; friend class SampleValueAdjacencyList ; friend class Vertex ; /// contains the vertices in this graph - Vertices[l] is the vertex with label l std::vector Vertices ; /// contains the list of (unique) sample values - SampleValues[l] is the sample value with label l std::vector SampleValues ; /// contains the sample value adjacency lists (SVALists[v] contains only sample values with embedded value v) std::vector SVALists ; /// SampleOccurences[l] contains all occurences of the sample value with label l std::vector > SampleOccurences ; /** * NumSampleOccurences[l][t] contains the number vertices that contain the sample value with label l and associated target t **/ std::vector NumSampleOccurences ; /// contains those sample occurences that have been marked as deleted from SampleOccurences std::vector > DeletedSampleOccurences ; std::vector NumDeletedSampleOccurences ; std::list::iterator markDeletedSampleOccurence (std::list::iterator it) ; std::list::iterator unmarkDeletedSampleOccurence (std::list::iterator it) ; // // end of friend-declarations // Note: private members of Graph that are declared beyond this point should // not be used by friends. // /** * construct sample-related data structures * * needs: sposs(unsorted) * provides: svalues(unsorted,unique), SampleValues **/ void constructSamples (const std::vector &sposs, std::vector& svalues) ; /** * construct vertex-related data structures * * needs: sposs(unsorted), svalues(unsorted,unique), tvalues * provides: sposs(sorted), Vertices (except SampleOccurenceIts) **/ void constructVertices (std::vector& sposs, std::vector& svalues, const std::vector& tvalues) ; /** * construct edge-related data structures * * needs: SampleValues, Vertices (except SampleOccurenceIts) * provides: SVALists, SampleOccurences, Vertices (SampleOccurenceIts) **/ void constructEdges (void) ; CvrStgFile *File ; EmbValue EmbValueModulus ; unsigned short SamplesPerVertex ; bool check_SampleOccurences_size (bool verbose = false) const ; bool check_SampleOccurences_correctness (bool verbose = false) const ; bool check_SampleOccurences_completeness (bool verbose = false) const ; bool check_SVALists_size (bool verbose = false) const ; bool check_SVALists_soundness (bool verbose = false) const ; bool check_SVALists_sorted (bool verbose = false) const ; bool check_SVALists_uniqueness (bool verbose = false) const ; bool check_SVALists_completeness (bool verbose = false) const ; } ; #endif // ndef SH_GRAPH_H steghide-0.5.1/BUGS0000644000076400001440000000112607735237332007470 * .au mu-law audio data is treated as linear 8 bit unsigned value in the neighbourhood relation (with radius 1). The neighbourhood relation should be defined with respect to the logarithmic nature of mu-law data. * steghide uses the classes hash_set and hash_map from sgi's implementation of the standard template library. These two classes are not part of the official C++ standard but part of the GNU's libstdc++. If you happen to be on a system that does not include theses classes you won't be able to compile steghide. If you find a bug, please tell me (shetzl@chello.at) about it. steghide-0.5.1/TODO0000644000076400001440000000142307654734401007474 These are things that I plan to implement in the future: * partition code into library and frontend * graphical user interface * user-friendly installer for Windows version (InnoSetup) * use libaudiofile for audio file format support * make embedding data in audio cds possible (embed markers for synchronization) * rewrite memory management such that cover-/stego-file must no longer be kept in memory as a whole * support for other file formats (mp3, png, gif, avi) * user's guide (sgml?, docbook?, gnu texinfo?) * support for RLE-encoded bmps * matrix encoding ? support for spreading one secret file into a set of >= 1 cover files ? support for embedding more than one message into one cover file (different passphrases) ? allow PGP encryption of embedded data (gpgme?) steghide-0.5.1/intl/0000777000076400001440000000000007743177372010045 5steghide-0.5.1/intl/plural.c0000644000076400001440000007747007735006037011431 /* A Bison parser, made from plural.y by GNU Bison version 1.28 */ #define YYBISON 1 /* Identify Bison output. */ #define yyparse __gettextparse #define yylex __gettextlex #define yyerror __gettexterror #define yylval __gettextlval #define yychar __gettextchar #define yydebug __gettextdebug #define yynerrs __gettextnerrs #define EQUOP2 257 #define CMPOP2 258 #define ADDOP2 259 #define MULOP2 260 #define NUMBER 261 #line 1 "plural.y" /* Expression parsing for plural form selection. Copyright (C) 2000, 2001 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* The bison generated parser uses alloca. AIX 3 forces us to put this declaration at the beginning of the file. The declaration in bison's skeleton file comes too late. This must come before because may include arbitrary system headers. */ #if defined _AIX && !defined __GNUC__ #pragma alloca #endif #ifdef HAVE_CONFIG_H # include #endif #include #include #include "plural-exp.h" /* The main function generated by the parser is called __gettextparse, but we want it to be called PLURAL_PARSE. */ #ifndef _LIBC # define __gettextparse PLURAL_PARSE #endif #define YYLEX_PARAM &((struct parse_args *) arg)->cp #define YYPARSE_PARAM arg #line 49 "plural.y" typedef union { unsigned long int num; enum operator op; struct expression *exp; } YYSTYPE; #line 55 "plural.y" /* Prototypes for local functions. */ static struct expression *new_exp PARAMS ((int nargs, enum operator op, struct expression * const *args)); static inline struct expression *new_exp_0 PARAMS ((enum operator op)); static inline struct expression *new_exp_1 PARAMS ((enum operator op, struct expression *right)); static struct expression *new_exp_2 PARAMS ((enum operator op, struct expression *left, struct expression *right)); static inline struct expression *new_exp_3 PARAMS ((enum operator op, struct expression *bexp, struct expression *tbranch, struct expression *fbranch)); static int yylex PARAMS ((YYSTYPE *lval, const char **pexp)); static void yyerror PARAMS ((const char *str)); /* Allocation of expressions. */ static struct expression * new_exp (nargs, op, args) int nargs; enum operator op; struct expression * const *args; { int i; struct expression *newp; /* If any of the argument could not be malloc'ed, just return NULL. */ for (i = nargs - 1; i >= 0; i--) if (args[i] == NULL) goto fail; /* Allocate a new expression. */ newp = (struct expression *) malloc (sizeof (*newp)); if (newp != NULL) { newp->nargs = nargs; newp->operation = op; for (i = nargs - 1; i >= 0; i--) newp->val.args[i] = args[i]; return newp; } fail: for (i = nargs - 1; i >= 0; i--) FREE_EXPRESSION (args[i]); return NULL; } static inline struct expression * new_exp_0 (op) enum operator op; { return new_exp (0, op, NULL); } static inline struct expression * new_exp_1 (op, right) enum operator op; struct expression *right; { struct expression *args[1]; args[0] = right; return new_exp (1, op, args); } static struct expression * new_exp_2 (op, left, right) enum operator op; struct expression *left; struct expression *right; { struct expression *args[2]; args[0] = left; args[1] = right; return new_exp (2, op, args); } static inline struct expression * new_exp_3 (op, bexp, tbranch, fbranch) enum operator op; struct expression *bexp; struct expression *tbranch; struct expression *fbranch; { struct expression *args[3]; args[0] = bexp; args[1] = tbranch; args[2] = fbranch; return new_exp (3, op, args); } #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 27 #define YYFLAG -32768 #define YYNTBASE 16 #define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 2, 2, 2, 2, 5, 2, 14, 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 6, 7, 8, 9, 11 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 2, 8, 12, 16, 20, 24, 28, 32, 35, 37, 39 }; static const short yyrhs[] = { 17, 0, 17, 3, 17, 12, 17, 0, 17, 4, 17, 0, 17, 5, 17, 0, 17, 6, 17, 0, 17, 7, 17, 0, 17, 8, 17, 0, 17, 9, 17, 0, 10, 17, 0, 13, 0, 11, 0, 14, 17, 15, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 174, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 223 }; #endif #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) static const char * const yytname[] = { "$","error","$undefined.","'?'","'|'", "'&'","EQUOP2","CMPOP2","ADDOP2","MULOP2","'!'","NUMBER","':'","'n'","'('","')'", "start","exp", NULL }; #endif static const short yyr1[] = { 0, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17 }; static const short yyr2[] = { 0, 1, 5, 3, 3, 3, 3, 3, 3, 2, 1, 1, 3 }; static const short yydefact[] = { 0, 0, 11, 10, 0, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 3, 4, 5, 6, 7, 8, 0, 2, 0, 0, 0 }; static const short yydefgoto[] = { 25, 5 }; static const short yypact[] = { -9, -9,-32768,-32768, -9, 34,-32768, 11, -9, -9, -9, -9, -9, -9, -9,-32768, 24, 39, 43, 16, 26, -3,-32768, -9, 34, 21, 53,-32768 }; static const short yypgoto[] = {-32768, -1 }; #define YYLAST 53 static const short yytable[] = { 6, 1, 2, 7, 3, 4, 14, 16, 17, 18, 19, 20, 21, 22, 8, 9, 10, 11, 12, 13, 14, 26, 24, 12, 13, 14, 15, 8, 9, 10, 11, 12, 13, 14, 13, 14, 23, 8, 9, 10, 11, 12, 13, 14, 10, 11, 12, 13, 14, 11, 12, 13, 14, 27 }; static const short yycheck[] = { 1, 10, 11, 4, 13, 14, 9, 8, 9, 10, 11, 12, 13, 14, 3, 4, 5, 6, 7, 8, 9, 0, 23, 7, 8, 9, 15, 3, 4, 5, 6, 7, 8, 9, 8, 9, 12, 3, 4, 5, 6, 7, 8, 9, 5, 6, 7, 8, 9, 6, 7, 8, 9, 0 }; #define YYPURE 1 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/local/share/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ #ifndef YYSTACK_USE_ALLOCA #ifdef alloca #define YYSTACK_USE_ALLOCA #else /* alloca not defined */ #ifdef __GNUC__ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) #define YYSTACK_USE_ALLOCA #include #else /* not sparc */ /* We think this test detects Watcom and Microsoft C. */ /* This used to test MSDOS, but that is a bad idea since that symbol is in the user namespace. */ #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) #if 0 /* No need for malloc.h, which pollutes the namespace; instead, just don't use alloca. */ #include #endif #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) /* I don't know what this was needed for, but it pollutes the namespace. So I turned it off. rms, 2 May 1997. */ /* #include */ #pragma alloca #define YYSTACK_USE_ALLOCA #else /* not MSDOS, or __TURBOC__, or _AIX */ #if 0 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, and on HPUX 10. Eventually we can turn this on. */ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #endif /* __hpux */ #endif #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc */ #endif /* not GNU C */ #endif /* alloca not defined */ #endif /* YYSTACK_USE_ALLOCA not defined */ #ifdef YYSTACK_USE_ALLOCA #define YYSTACK_ALLOC alloca #else #define YYSTACK_ALLOC malloc #endif /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { yychar = (token), yylval = (value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else #define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, YYLEX_PARAM) #else #define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif /* Define __yy_memcpy. Note that the size argument should be passed with type unsigned int, because that is what the non-GCC definitions require. With GCC, __builtin_memcpy takes an arg of type size_t, but it can handle unsigned int. */ #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (to, from, count) char *to; char *from; unsigned int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (char *to, char *from, unsigned int count) { register char *t = to; register char *f = from; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 217 "/usr/local/share/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM #ifdef __cplusplus #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM #define YYPARSE_PARAM_DECL #else /* not __cplusplus */ #define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #endif /* not __cplusplus */ #else /* not YYPARSE_PARAM */ #define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ #ifdef YYPARSE_PARAM int yyparse (void *); #else int yyparse (void); #endif #endif int yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ int yychar1 = 0; /* lookahead token as an internal (translated) token number */ short yyssa[YYINITDEPTH]; /* the state stack */ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ short *yyss = yyssa; /* refer to the stacks thru separate pointers */ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif int yystacksize = YYINITDEPTH; int yyfree_stacks = 0; #ifdef YYPURE int yychar; YYSTYPE yylval; int yynerrs; #ifdef YYLSP_NEEDED YYLTYPE yylloc; #endif #endif YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ int yylen; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Starting parse\n"); #endif yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); #else yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; #ifndef YYSTACK_USE_ALLOCA yyfree_stacks = 1; #endif yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss, (char *)yyss1, size * (unsigned int) sizeof (*yyssp)); yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * (unsigned int) sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls, (char *)yyls1, size * (unsigned int) sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Entering state %d\n", yystate); #endif goto yybackup; yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Reading a token: "); #endif yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); #endif fprintf (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; if (yylen > 0) yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 1: #line 175 "plural.y" { if (yyvsp[0].exp == NULL) YYABORT; ((struct parse_args *) arg)->res = yyvsp[0].exp; ; break;} case 2: #line 183 "plural.y" { yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp); ; break;} case 3: #line 187 "plural.y" { yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp); ; break;} case 4: #line 191 "plural.y" { yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp); ; break;} case 5: #line 195 "plural.y" { yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); ; break;} case 6: #line 199 "plural.y" { yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); ; break;} case 7: #line 203 "plural.y" { yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); ; break;} case 8: #line 207 "plural.y" { yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp); ; break;} case 9: #line 211 "plural.y" { yyval.exp = new_exp_1 (lnot, yyvsp[0].exp); ; break;} case 10: #line 215 "plural.y" { yyval.exp = new_exp_0 (var); ; break;} case 11: #line 219 "plural.y" { if ((yyval.exp = new_exp_0 (num)) != NULL) yyval.exp->val.num = yyvsp[0].num; ; break;} case 12: #line 224 "plural.y" { yyval.exp = yyvsp[-1].exp; ; break;} } /* the action file gets copied in in place of this dollarsign */ #line 543 "/usr/local/share/bison.simple" yyvsp -= yylen; yyssp -= yylen; #ifdef YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; #ifdef YYLSP_NEEDED yylsp++; if (yylen == 0) { yylsp->first_line = yylloc.first_line; yylsp->first_column = yylloc.first_column; yylsp->last_line = (yylsp-1)->last_line; yylsp->last_column = (yylsp-1)->last_column; yylsp->text = 0; } else { yylsp->last_line = (yylsp+yylen-1)->last_line; yylsp->last_column = (yylsp+yylen-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; yyerrlab: /* here on detecting error */ if (! yyerrstatus) /* If not already recovering from an error, report this error. */ { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) size += strlen(yytname[x]) + 15, count++; msg = (char *) malloc(size + 15); if (msg != 0) { strcpy(msg, "parse error"); if (count < 5) { count = 0; for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; } } yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ yyerror("parse error"); } goto yyerrlab1; yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; yyerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yyn) goto yydefault; #endif yyerrpop: /* pop the current state because it cannot handle the error token */ if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #ifdef YYLSP_NEEDED yylsp--; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting error token, "); #endif *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; yyacceptlab: /* YYACCEPT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 0; yyabortlab: /* YYABORT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 1; } #line 229 "plural.y" void internal_function FREE_EXPRESSION (exp) struct expression *exp; { if (exp == NULL) return; /* Handle the recursive case. */ switch (exp->nargs) { case 3: FREE_EXPRESSION (exp->val.args[2]); /* FALLTHROUGH */ case 2: FREE_EXPRESSION (exp->val.args[1]); /* FALLTHROUGH */ case 1: FREE_EXPRESSION (exp->val.args[0]); /* FALLTHROUGH */ default: break; } free (exp); } static int yylex (lval, pexp) YYSTYPE *lval; const char **pexp; { const char *exp = *pexp; int result; while (1) { if (exp[0] == '\0') { *pexp = exp; return YYEOF; } if (exp[0] != ' ' && exp[0] != '\t') break; ++exp; } result = *exp++; switch (result) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { unsigned long int n = result - '0'; while (exp[0] >= '0' && exp[0] <= '9') { n *= 10; n += exp[0] - '0'; ++exp; } lval->num = n; result = NUMBER; } break; case '=': if (exp[0] == '=') { ++exp; lval->op = equal; result = EQUOP2; } else result = YYERRCODE; break; case '!': if (exp[0] == '=') { ++exp; lval->op = not_equal; result = EQUOP2; } break; case '&': case '|': if (exp[0] == result) ++exp; else result = YYERRCODE; break; case '<': if (exp[0] == '=') { ++exp; lval->op = less_or_equal; } else lval->op = less_than; result = CMPOP2; break; case '>': if (exp[0] == '=') { ++exp; lval->op = greater_or_equal; } else lval->op = greater_than; result = CMPOP2; break; case '*': lval->op = mult; result = MULOP2; break; case '/': lval->op = divide; result = MULOP2; break; case '%': lval->op = module; result = MULOP2; break; case '+': lval->op = plus; result = ADDOP2; break; case '-': lval->op = minus; result = ADDOP2; break; case 'n': case '?': case ':': case '(': case ')': /* Nothing, just return the character. */ break; case ';': case '\n': case '\0': /* Be safe and let the user call this function again. */ --exp; result = YYEOF; break; default: result = YYERRCODE; #if YYDEBUG != 0 --exp; #endif break; } *pexp = exp; return result; } static void yyerror (str) const char *str; { /* Do nothing. We don't print error messages here. */ } steghide-0.5.1/intl/plural.y0000644000076400001440000001773407735006035011452 %{ /* Expression parsing for plural form selection. Copyright (C) 2000, 2001 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* The bison generated parser uses alloca. AIX 3 forces us to put this declaration at the beginning of the file. The declaration in bison's skeleton file comes too late. This must come before because may include arbitrary system headers. */ #if defined _AIX && !defined __GNUC__ #pragma alloca #endif #ifdef HAVE_CONFIG_H # include #endif #include #include #include "plural-exp.h" /* The main function generated by the parser is called __gettextparse, but we want it to be called PLURAL_PARSE. */ #ifndef _LIBC # define __gettextparse PLURAL_PARSE #endif #define YYLEX_PARAM &((struct parse_args *) arg)->cp #define YYPARSE_PARAM arg %} %pure_parser %expect 7 %union { unsigned long int num; enum operator op; struct expression *exp; } %{ /* Prototypes for local functions. */ static struct expression *new_exp PARAMS ((int nargs, enum operator op, struct expression * const *args)); static inline struct expression *new_exp_0 PARAMS ((enum operator op)); static inline struct expression *new_exp_1 PARAMS ((enum operator op, struct expression *right)); static struct expression *new_exp_2 PARAMS ((enum operator op, struct expression *left, struct expression *right)); static inline struct expression *new_exp_3 PARAMS ((enum operator op, struct expression *bexp, struct expression *tbranch, struct expression *fbranch)); static int yylex PARAMS ((YYSTYPE *lval, const char **pexp)); static void yyerror PARAMS ((const char *str)); /* Allocation of expressions. */ static struct expression * new_exp (nargs, op, args) int nargs; enum operator op; struct expression * const *args; { int i; struct expression *newp; /* If any of the argument could not be malloc'ed, just return NULL. */ for (i = nargs - 1; i >= 0; i--) if (args[i] == NULL) goto fail; /* Allocate a new expression. */ newp = (struct expression *) malloc (sizeof (*newp)); if (newp != NULL) { newp->nargs = nargs; newp->operation = op; for (i = nargs - 1; i >= 0; i--) newp->val.args[i] = args[i]; return newp; } fail: for (i = nargs - 1; i >= 0; i--) FREE_EXPRESSION (args[i]); return NULL; } static inline struct expression * new_exp_0 (op) enum operator op; { return new_exp (0, op, NULL); } static inline struct expression * new_exp_1 (op, right) enum operator op; struct expression *right; { struct expression *args[1]; args[0] = right; return new_exp (1, op, args); } static struct expression * new_exp_2 (op, left, right) enum operator op; struct expression *left; struct expression *right; { struct expression *args[2]; args[0] = left; args[1] = right; return new_exp (2, op, args); } static inline struct expression * new_exp_3 (op, bexp, tbranch, fbranch) enum operator op; struct expression *bexp; struct expression *tbranch; struct expression *fbranch; { struct expression *args[3]; args[0] = bexp; args[1] = tbranch; args[2] = fbranch; return new_exp (3, op, args); } %} /* This declares that all operators have the same associativity and the precedence order as in C. See [Harbison, Steele: C, A Reference Manual]. There is no unary minus and no bitwise operators. Operators with the same syntactic behaviour have been merged into a single token, to save space in the array generated by bison. */ %right '?' /* ? */ %left '|' /* || */ %left '&' /* && */ %left EQUOP2 /* == != */ %left CMPOP2 /* < > <= >= */ %left ADDOP2 /* + - */ %left MULOP2 /* * / % */ %right '!' /* ! */ %token EQUOP2 CMPOP2 ADDOP2 MULOP2 %token NUMBER %type exp %% start: exp { if ($1 == NULL) YYABORT; ((struct parse_args *) arg)->res = $1; } ; exp: exp '?' exp ':' exp { $$ = new_exp_3 (qmop, $1, $3, $5); } | exp '|' exp { $$ = new_exp_2 (lor, $1, $3); } | exp '&' exp { $$ = new_exp_2 (land, $1, $3); } | exp EQUOP2 exp { $$ = new_exp_2 ($2, $1, $3); } | exp CMPOP2 exp { $$ = new_exp_2 ($2, $1, $3); } | exp ADDOP2 exp { $$ = new_exp_2 ($2, $1, $3); } | exp MULOP2 exp { $$ = new_exp_2 ($2, $1, $3); } | '!' exp { $$ = new_exp_1 (lnot, $2); } | 'n' { $$ = new_exp_0 (var); } | NUMBER { if (($$ = new_exp_0 (num)) != NULL) $$->val.num = $1; } | '(' exp ')' { $$ = $2; } ; %% void internal_function FREE_EXPRESSION (exp) struct expression *exp; { if (exp == NULL) return; /* Handle the recursive case. */ switch (exp->nargs) { case 3: FREE_EXPRESSION (exp->val.args[2]); /* FALLTHROUGH */ case 2: FREE_EXPRESSION (exp->val.args[1]); /* FALLTHROUGH */ case 1: FREE_EXPRESSION (exp->val.args[0]); /* FALLTHROUGH */ default: break; } free (exp); } static int yylex (lval, pexp) YYSTYPE *lval; const char **pexp; { const char *exp = *pexp; int result; while (1) { if (exp[0] == '\0') { *pexp = exp; return YYEOF; } if (exp[0] != ' ' && exp[0] != '\t') break; ++exp; } result = *exp++; switch (result) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { unsigned long int n = result - '0'; while (exp[0] >= '0' && exp[0] <= '9') { n *= 10; n += exp[0] - '0'; ++exp; } lval->num = n; result = NUMBER; } break; case '=': if (exp[0] == '=') { ++exp; lval->op = equal; result = EQUOP2; } else result = YYERRCODE; break; case '!': if (exp[0] == '=') { ++exp; lval->op = not_equal; result = EQUOP2; } break; case '&': case '|': if (exp[0] == result) ++exp; else result = YYERRCODE; break; case '<': if (exp[0] == '=') { ++exp; lval->op = less_or_equal; } else lval->op = less_than; result = CMPOP2; break; case '>': if (exp[0] == '=') { ++exp; lval->op = greater_or_equal; } else lval->op = greater_than; result = CMPOP2; break; case '*': lval->op = mult; result = MULOP2; break; case '/': lval->op = divide; result = MULOP2; break; case '%': lval->op = module; result = MULOP2; break; case '+': lval->op = plus; result = ADDOP2; break; case '-': lval->op = minus; result = ADDOP2; break; case 'n': case '?': case ':': case '(': case ')': /* Nothing, just return the character. */ break; case ';': case '\n': case '\0': /* Be safe and let the user call this function again. */ --exp; result = YYEOF; break; default: result = YYERRCODE; #if YYDEBUG != 0 --exp; #endif break; } *pexp = exp; return result; } static void yyerror (str) const char *str; { /* Do nothing. We don't print error messages here. */ } steghide-0.5.1/intl/config.charset0000755000076400001440000003341207735006035012573 #! /bin/sh # Output a system dependent table of character encoding aliases. # # Copyright (C) 2000-2002 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. # # The table consists of lines of the form # ALIAS CANONICAL # # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". # ALIAS is compared in a case sensitive way. # # CANONICAL is the GNU canonical name for this character encoding. # It must be an encoding supported by libiconv. Support by GNU libc is # also desirable. CANONICAL is case insensitive. Usually an upper case # MIME charset name is preferred. # The current list of GNU canonical charset names is as follows. # # name used by which systems a MIME name? # ASCII, ANSI_X3.4-1968 glibc solaris freebsd # ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes # ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes # ISO-8859-3 glibc solaris yes # ISO-8859-4 osf solaris freebsd yes # ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes # ISO-8859-6 glibc aix hpux solaris yes # ISO-8859-7 glibc aix hpux irix osf solaris yes # ISO-8859-8 glibc aix hpux osf solaris yes # ISO-8859-9 glibc aix hpux irix osf solaris yes # ISO-8859-13 glibc # ISO-8859-14 glibc # ISO-8859-15 glibc aix osf solaris freebsd # KOI8-R glibc solaris freebsd yes # KOI8-U glibc freebsd yes # KOI8-T glibc # CP437 dos # CP775 dos # CP850 aix osf dos # CP852 dos # CP855 dos # CP856 aix # CP857 dos # CP861 dos # CP862 dos # CP864 dos # CP865 dos # CP866 freebsd dos # CP869 dos # CP874 woe32 dos # CP922 aix # CP932 aix woe32 dos # CP943 aix # CP949 osf woe32 dos # CP950 woe32 dos # CP1046 aix # CP1124 aix # CP1125 dos # CP1129 aix # CP1250 woe32 # CP1251 glibc woe32 # CP1252 aix woe32 # CP1253 woe32 # CP1254 woe32 # CP1255 glibc woe32 # CP1256 woe32 # CP1257 woe32 # GB2312 glibc aix hpux irix solaris freebsd yes # EUC-JP glibc aix hpux irix osf solaris freebsd yes # EUC-KR glibc aix hpux irix osf solaris freebsd yes # EUC-TW glibc aix hpux irix osf solaris # BIG5 glibc aix hpux osf solaris freebsd yes # BIG5-HKSCS glibc solaris # GBK glibc aix osf solaris woe32 dos # GB18030 glibc solaris # SHIFT_JIS hpux osf solaris freebsd yes # JOHAB glibc solaris woe32 # TIS-620 glibc aix hpux osf solaris # VISCII glibc yes # TCVN5712-1 glibc # GEORGIAN-PS glibc # HP-ROMAN8 hpux # HP-ARABIC8 hpux # HP-GREEK8 hpux # HP-HEBREW8 hpux # HP-TURKISH8 hpux # HP-KANA8 hpux # DEC-KANJI osf # DEC-HANYU osf # UTF-8 glibc aix hpux osf solaris yes # # Note: Names which are not marked as being a MIME name should not be used in # Internet protocols for information interchange (mail, news, etc.). # # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications # must understand both names and treat them as equivalent. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM host="$1" os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` echo "# This file contains a table of character encoding aliases," echo "# suitable for operating system '${os}'." echo "# It was automatically generated from config.charset." # List of references, updated during installation: echo "# Packages using this file: " case "$os" in linux* | *-gnu*) # With glibc-2.1 or newer, we don't need any canonicalization, # because glibc has iconv and both glibc and libiconv support all # GNU canonical names directly. Therefore, the Makefile does not # need to install the alias file at all. # The following applies only to glibc-2.0.x and older libcs. echo "ISO_646.IRV:1983 ASCII" ;; aix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "IBM-850 CP850" echo "IBM-856 CP856" echo "IBM-921 ISO-8859-13" echo "IBM-922 CP922" echo "IBM-932 CP932" echo "IBM-943 CP943" echo "IBM-1046 CP1046" echo "IBM-1124 CP1124" echo "IBM-1129 CP1129" echo "IBM-1252 CP1252" echo "IBM-eucCN GB2312" echo "IBM-eucJP EUC-JP" echo "IBM-eucKR EUC-KR" echo "IBM-eucTW EUC-TW" echo "big5 BIG5" echo "GBK GBK" echo "TIS-620 TIS-620" echo "UTF-8 UTF-8" ;; hpux*) echo "iso88591 ISO-8859-1" echo "iso88592 ISO-8859-2" echo "iso88595 ISO-8859-5" echo "iso88596 ISO-8859-6" echo "iso88597 ISO-8859-7" echo "iso88598 ISO-8859-8" echo "iso88599 ISO-8859-9" echo "iso885915 ISO-8859-15" echo "roman8 HP-ROMAN8" echo "arabic8 HP-ARABIC8" echo "greek8 HP-GREEK8" echo "hebrew8 HP-HEBREW8" echo "turkish8 HP-TURKISH8" echo "kana8 HP-KANA8" echo "tis620 TIS-620" echo "big5 BIG5" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "hp15CN GB2312" #echo "ccdc ?" # what is this? echo "SJIS SHIFT_JIS" echo "utf8 UTF-8" ;; irix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" ;; osf*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "cp850 CP850" echo "big5 BIG5" echo "dechanyu DEC-HANYU" echo "dechanzi GB2312" echo "deckanji DEC-KANJI" echo "deckorean EUC-KR" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "GBK GBK" echo "KSC5601 CP949" echo "sdeckanji EUC-JP" echo "SJIS SHIFT_JIS" echo "TACTIS TIS-620" echo "UTF-8 UTF-8" ;; solaris*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-3 ISO-8859-3" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "koi8-r KOI8-R" echo "BIG5 BIG5" echo "Big5-HKSCS BIG5-HKSCS" echo "gb2312 GB2312" echo "GBK GBK" echo "GB18030 GB18030" echo "cns11643 EUC-TW" echo "5601 EUC-KR" echo "ko_KR.johap92 JOHAB" echo "eucJP EUC-JP" echo "PCK SHIFT_JIS" echo "TIS620.2533 TIS-620" #echo "sun_eu_greek ?" # what is this? echo "UTF-8 UTF-8" ;; freebsd* | os2*) # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just # reuse FreeBSD's locale data for OS/2. echo "C ASCII" echo "US-ASCII ASCII" for l in la_LN lt_LN; do echo "$l.ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do echo "$l.ISO_8859-1 ISO-8859-1" echo "$l.DIS_8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do echo "$l.ISO_8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO_8859-4 ISO-8859-4" done for l in ru_RU ru_SU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO_8859-5 ISO-8859-5" echo "$l.CP866 CP866" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ja_JP.Shift_JIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; netbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-15 ISO-8859-15" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "BIG5 BIG5" echo "SJIS SHIFT_JIS" ;; beos*) # BeOS has a single locale, and it has UTF-8 encoding. echo "* UTF-8" ;; msdosdjgpp*) # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "#" echo "# The encodings given here may not all be correct." echo "# If you find that the encoding given for your language and" echo "# country is not the one your DOS machine actually uses, just" echo "# correct it in this file, and send a mail to" echo "# Juan Manuel Guerrero " echo "# and Bruno Haible ." echo "#" echo "C ASCII" # ISO-8859-1 languages echo "ca CP850" echo "ca_ES CP850" echo "da CP865" # not CP850 ?? echo "da_DK CP865" # not CP850 ?? echo "de CP850" echo "de_AT CP850" echo "de_CH CP850" echo "de_DE CP850" echo "en CP850" echo "en_AU CP850" # not CP437 ?? echo "en_CA CP850" echo "en_GB CP850" echo "en_NZ CP437" echo "en_US CP437" echo "en_ZA CP850" # not CP437 ?? echo "es CP850" echo "es_AR CP850" echo "es_BO CP850" echo "es_CL CP850" echo "es_CO CP850" echo "es_CR CP850" echo "es_CU CP850" echo "es_DO CP850" echo "es_EC CP850" echo "es_ES CP850" echo "es_GT CP850" echo "es_HN CP850" echo "es_MX CP850" echo "es_NI CP850" echo "es_PA CP850" echo "es_PY CP850" echo "es_PE CP850" echo "es_SV CP850" echo "es_UY CP850" echo "es_VE CP850" echo "et CP850" echo "et_EE CP850" echo "eu CP850" echo "eu_ES CP850" echo "fi CP850" echo "fi_FI CP850" echo "fr CP850" echo "fr_BE CP850" echo "fr_CA CP850" echo "fr_CH CP850" echo "fr_FR CP850" echo "ga CP850" echo "ga_IE CP850" echo "gd CP850" echo "gd_GB CP850" echo "gl CP850" echo "gl_ES CP850" echo "id CP850" # not CP437 ?? echo "id_ID CP850" # not CP437 ?? echo "is CP861" # not CP850 ?? echo "is_IS CP861" # not CP850 ?? echo "it CP850" echo "it_CH CP850" echo "it_IT CP850" echo "lt CP775" echo "lt_LT CP775" echo "lv CP775" echo "lv_LV CP775" echo "nb CP865" # not CP850 ?? echo "nb_NO CP865" # not CP850 ?? echo "nl CP850" echo "nl_BE CP850" echo "nl_NL CP850" echo "nn CP865" # not CP850 ?? echo "nn_NO CP865" # not CP850 ?? echo "no CP865" # not CP850 ?? echo "no_NO CP865" # not CP850 ?? echo "pt CP850" echo "pt_BR CP850" echo "pt_PT CP850" echo "sv CP850" echo "sv_SE CP850" # ISO-8859-2 languages echo "cs CP852" echo "cs_CZ CP852" echo "hr CP852" echo "hr_HR CP852" echo "hu CP852" echo "hu_HU CP852" echo "pl CP852" echo "pl_PL CP852" echo "ro CP852" echo "ro_RO CP852" echo "sk CP852" echo "sk_SK CP852" echo "sl CP852" echo "sl_SI CP852" echo "sq CP852" echo "sq_AL CP852" echo "sr CP852" # CP852 or CP866 or CP855 ?? echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? # ISO-8859-3 languages echo "mt CP850" echo "mt_MT CP850" # ISO-8859-5 languages echo "be CP866" echo "be_BE CP866" echo "bg CP866" # not CP855 ?? echo "bg_BG CP866" # not CP855 ?? echo "mk CP866" # not CP855 ?? echo "mk_MK CP866" # not CP855 ?? echo "ru CP866" echo "ru_RU CP866" echo "uk CP1125" echo "uk_UA CP1125" # ISO-8859-6 languages echo "ar CP864" echo "ar_AE CP864" echo "ar_DZ CP864" echo "ar_EG CP864" echo "ar_IQ CP864" echo "ar_IR CP864" echo "ar_JO CP864" echo "ar_KW CP864" echo "ar_MA CP864" echo "ar_OM CP864" echo "ar_QA CP864" echo "ar_SA CP864" echo "ar_SY CP864" # ISO-8859-7 languages echo "el CP869" echo "el_GR CP869" # ISO-8859-8 languages echo "he CP862" echo "he_IL CP862" # ISO-8859-9 languages echo "tr CP857" echo "tr_TR CP857" # Japanese echo "ja CP932" echo "ja_JP CP932" # Chinese echo "zh_CN GBK" echo "zh_TW CP950" # not CP938 ?? # Korean echo "kr CP949" # not CP934 ?? echo "kr_KR CP949" # not CP934 ?? # Thai echo "th CP874" echo "th_TH CP874" # Other echo "eo CP850" echo "eo_EO CP850" ;; esac steghide-0.5.1/intl/gmo.h0000644000076400001440000001125707735006035010706 /* Description of GNU message catalog format: general file layout. Copyright (C) 1995, 1997, 2000-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETTEXT_H #define _GETTEXT_H 1 #include /* @@ end of prolog @@ */ /* The magic number of the GNU message catalog format. */ #define _MAGIC 0x950412de #define _MAGIC_SWAPPED 0xde120495 /* Revision number of the currently used .mo (binary) file format. */ #define MO_REVISION_NUMBER 0 /* The following contortions are an attempt to use the C preprocessor to determine an unsigned integral type that is 32 bits wide. An alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work when cross-compiling. */ #if __STDC__ # define UINT_MAX_32_BITS 4294967295U #else # define UINT_MAX_32_BITS 0xFFFFFFFF #endif /* If UINT_MAX isn't defined, assume it's a 32-bit type. This should be valid for all systems GNU cares about because that doesn't include 16-bit systems, and only modern systems (that certainly have ) have 64+-bit integral types. */ #ifndef UINT_MAX # define UINT_MAX UINT_MAX_32_BITS #endif #if UINT_MAX == UINT_MAX_32_BITS typedef unsigned nls_uint32; #else # if USHRT_MAX == UINT_MAX_32_BITS typedef unsigned short nls_uint32; # else # if ULONG_MAX == UINT_MAX_32_BITS typedef unsigned long nls_uint32; # else /* The following line is intended to throw an error. Using #error is not portable enough. */ "Cannot determine unsigned 32-bit data type." # endif # endif #endif /* Header for binary .mo file format. */ struct mo_file_header { /* The magic number. */ nls_uint32 magic; /* The revision number of the file format. */ nls_uint32 revision; /* The following are only used in .mo files with major revision 0. */ /* The number of strings pairs. */ nls_uint32 nstrings; /* Offset of table with start offsets of original strings. */ nls_uint32 orig_tab_offset; /* Offset of table with start offsets of translated strings. */ nls_uint32 trans_tab_offset; /* Size of hash table. */ nls_uint32 hash_tab_size; /* Offset of first hash table entry. */ nls_uint32 hash_tab_offset; /* The following are only used in .mo files with minor revision >= 1. */ /* The number of system dependent segments. */ nls_uint32 n_sysdep_segments; /* Offset of table describing system dependent segments. */ nls_uint32 sysdep_segments_offset; /* The number of system dependent strings pairs. */ nls_uint32 n_sysdep_strings; /* Offset of table with start offsets of original sysdep strings. */ nls_uint32 orig_sysdep_tab_offset; /* Offset of table with start offsets of translated sysdep strings. */ nls_uint32 trans_sysdep_tab_offset; }; /* Descriptor for static string contained in the binary .mo file. */ struct string_desc { /* Length of addressed string, not including the trailing NUL. */ nls_uint32 length; /* Offset of string in file. */ nls_uint32 offset; }; /* The following are only used in .mo files with minor revision >= 1. */ /* Descriptor for system dependent string segment. */ struct sysdep_segment { /* Length of addressed string, including the trailing NUL. */ nls_uint32 length; /* Offset of string in file. */ nls_uint32 offset; }; /* Descriptor for system dependent string. */ struct sysdep_string { /* Offset of static string segments in file. */ nls_uint32 offset; /* Alternating sequence of static and system dependent segments. The last segment is a static segment, including the trailing NUL. */ struct segment_pair { /* Size of static segment. */ nls_uint32 segsize; /* Reference to system dependent string segment, or ~0 at the end. */ nls_uint32 sysdepref; } segments[1]; }; /* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF, regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */ #define SEGMENTS_END ((nls_uint32) ~0) /* @@ begin of epilog @@ */ #endif /* gettext.h */ steghide-0.5.1/intl/finddomain.c0000644000076400001440000001314607735006035012226 /* Handle list of needed message catalogs Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. Written by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #if defined HAVE_UNISTD_H || defined _LIBC # include #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* List of already loaded domains. */ static struct loaded_l10nfile *_nl_loaded_domains; /* Return a data structure describing the message catalog described by the DOMAINNAME and CATEGORY parameters with respect to the currently established bindings. */ struct loaded_l10nfile * internal_function _nl_find_domain (dirname, locale, domainname, domainbinding) const char *dirname; char *locale; const char *domainname; struct binding *domainbinding; { struct loaded_l10nfile *retval; const char *language; const char *modifier; const char *territory; const char *codeset; const char *normalized_codeset; const char *special; const char *sponsor; const char *revision; const char *alias_value; int mask; /* LOCALE can consist of up to four recognized parts for the XPG syntax: language[_territory[.codeset]][@modifier] and six parts for the CEN syntax: language[_territory][+audience][+special][,[sponsor][_revision]] Beside the first part all of them are allowed to be missing. If the full specified locale is not found, the less specific one are looked for. The various parts will be stripped off according to the following order: (1) revision (2) sponsor (3) special (4) codeset (5) normalized codeset (6) territory (7) audience/modifier */ /* If we have already tested for this locale entry there has to be one data set in the list of loaded domains. */ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, strlen (dirname) + 1, 0, locale, NULL, NULL, NULL, NULL, NULL, NULL, NULL, domainname, 0); if (retval != NULL) { /* We know something about this locale. */ int cnt; if (retval->decided == 0) _nl_load_domain (retval, domainbinding); if (retval->data != NULL) return retval; for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) { if (retval->successor[cnt]->decided == 0) _nl_load_domain (retval->successor[cnt], domainbinding); if (retval->successor[cnt]->data != NULL) break; } return cnt >= 0 ? retval : NULL; /* NOTREACHED */ } /* See whether the locale value is an alias. If yes its value *overwrites* the alias name. No test for the original value is done. */ alias_value = _nl_expand_alias (locale); if (alias_value != NULL) { #if defined _LIBC || defined HAVE_STRDUP locale = strdup (alias_value); if (locale == NULL) return NULL; #else size_t len = strlen (alias_value) + 1; locale = (char *) malloc (len); if (locale == NULL) return NULL; memcpy (locale, alias_value, len); #endif } /* Now we determine the single parts of the locale name. First look for the language. Termination symbols are `_' and `@' if we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ mask = _nl_explode_name (locale, &language, &modifier, &territory, &codeset, &normalized_codeset, &special, &sponsor, &revision); /* Create all possible locale entries which might be interested in generalization. */ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, strlen (dirname) + 1, mask, language, territory, codeset, normalized_codeset, modifier, special, sponsor, revision, domainname, 1); if (retval == NULL) /* This means we are out of core. */ return NULL; if (retval->decided == 0) _nl_load_domain (retval, domainbinding); if (retval->data == NULL) { int cnt; for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) { if (retval->successor[cnt]->decided == 0) _nl_load_domain (retval->successor[cnt], domainbinding); if (retval->successor[cnt]->data != NULL) break; } } /* The room for an alias was dynamically allocated. Free it now. */ if (alias_value != NULL) free (locale); /* The space for normalized_codeset is dynamically allocated. Free it. */ if (mask & XPG_NORM_CODESET) free ((void *) normalized_codeset); return retval; } #ifdef _LIBC static void __attribute__ ((unused)) free_mem (void) { struct loaded_l10nfile *runp = _nl_loaded_domains; while (runp != NULL) { struct loaded_l10nfile *here = runp; if (runp->data != NULL) _nl_unload_domain ((struct loaded_domain *) runp->data); runp = runp->next; free ((char *) here->filename); free (here); } } text_set_element (__libc_subfreeres, free_mem); #endif steghide-0.5.1/intl/localename.c0000644000076400001440000005412607735006035012221 /* Determine the current selected locale. Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Written by Ulrich Drepper , 1995. */ /* Win32 code written by Tor Lillqvist . */ #ifdef HAVE_CONFIG_H # include #endif #include #include #if defined _WIN32 || defined __WIN32__ # undef WIN32 /* avoid warning on mingw32 */ # define WIN32 #endif #ifdef WIN32 # define WIN32_LEAN_AND_MEAN # include /* Mingw headers don't have latest language and sublanguage codes. */ # ifndef LANG_AFRIKAANS # define LANG_AFRIKAANS 0x36 # endif # ifndef LANG_ALBANIAN # define LANG_ALBANIAN 0x1c # endif # ifndef LANG_ARABIC # define LANG_ARABIC 0x01 # endif # ifndef LANG_ARMENIAN # define LANG_ARMENIAN 0x2b # endif # ifndef LANG_ASSAMESE # define LANG_ASSAMESE 0x4d # endif # ifndef LANG_AZERI # define LANG_AZERI 0x2c # endif # ifndef LANG_BASQUE # define LANG_BASQUE 0x2d # endif # ifndef LANG_BELARUSIAN # define LANG_BELARUSIAN 0x23 # endif # ifndef LANG_BENGALI # define LANG_BENGALI 0x45 # endif # ifndef LANG_CATALAN # define LANG_CATALAN 0x03 # endif # ifndef LANG_DIVEHI # define LANG_DIVEHI 0x65 # endif # ifndef LANG_ESTONIAN # define LANG_ESTONIAN 0x25 # endif # ifndef LANG_FAEROESE # define LANG_FAEROESE 0x38 # endif # ifndef LANG_FARSI # define LANG_FARSI 0x29 # endif # ifndef LANG_GALICIAN # define LANG_GALICIAN 0x56 # endif # ifndef LANG_GEORGIAN # define LANG_GEORGIAN 0x37 # endif # ifndef LANG_GUJARATI # define LANG_GUJARATI 0x47 # endif # ifndef LANG_HEBREW # define LANG_HEBREW 0x0d # endif # ifndef LANG_HINDI # define LANG_HINDI 0x39 # endif # ifndef LANG_INDONESIAN # define LANG_INDONESIAN 0x21 # endif # ifndef LANG_KANNADA # define LANG_KANNADA 0x4b # endif # ifndef LANG_KASHMIRI # define LANG_KASHMIRI 0x60 # endif # ifndef LANG_KAZAK # define LANG_KAZAK 0x3f # endif # ifndef LANG_KONKANI # define LANG_KONKANI 0x57 # endif # ifndef LANG_KYRGYZ # define LANG_KYRGYZ 0x40 # endif # ifndef LANG_LATVIAN # define LANG_LATVIAN 0x26 # endif # ifndef LANG_LITHUANIAN # define LANG_LITHUANIAN 0x27 # endif # ifndef LANG_MACEDONIAN # define LANG_MACEDONIAN 0x2f # endif # ifndef LANG_MALAY # define LANG_MALAY 0x3e # endif # ifndef LANG_MALAYALAM # define LANG_MALAYALAM 0x4c # endif # ifndef LANG_MANIPURI # define LANG_MANIPURI 0x58 # endif # ifndef LANG_MARATHI # define LANG_MARATHI 0x4e # endif # ifndef LANG_MONGOLIAN # define LANG_MONGOLIAN 0x50 # endif # ifndef LANG_NEPALI # define LANG_NEPALI 0x61 # endif # ifndef LANG_ORIYA # define LANG_ORIYA 0x48 # endif # ifndef LANG_PUNJABI # define LANG_PUNJABI 0x46 # endif # ifndef LANG_SANSKRIT # define LANG_SANSKRIT 0x4f # endif # ifndef LANG_SERBIAN # define LANG_SERBIAN 0x1a # endif # ifndef LANG_SINDHI # define LANG_SINDHI 0x59 # endif # ifndef LANG_SLOVAK # define LANG_SLOVAK 0x1b # endif # ifndef LANG_SORBIAN # define LANG_SORBIAN 0x2e # endif # ifndef LANG_SWAHILI # define LANG_SWAHILI 0x41 # endif # ifndef LANG_SYRIAC # define LANG_SYRIAC 0x5a # endif # ifndef LANG_TAMIL # define LANG_TAMIL 0x49 # endif # ifndef LANG_TATAR # define LANG_TATAR 0x44 # endif # ifndef LANG_TELUGU # define LANG_TELUGU 0x4a # endif # ifndef LANG_THAI # define LANG_THAI 0x1e # endif # ifndef LANG_UKRAINIAN # define LANG_UKRAINIAN 0x22 # endif # ifndef LANG_URDU # define LANG_URDU 0x20 # endif # ifndef LANG_UZBEK # define LANG_UZBEK 0x43 # endif # ifndef LANG_VIETNAMESE # define LANG_VIETNAMESE 0x2a # endif # ifndef SUBLANG_ARABIC_SAUDI_ARABIA # define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 # endif # ifndef SUBLANG_ARABIC_IRAQ # define SUBLANG_ARABIC_IRAQ 0x02 # endif # ifndef SUBLANG_ARABIC_EGYPT # define SUBLANG_ARABIC_EGYPT 0x03 # endif # ifndef SUBLANG_ARABIC_LIBYA # define SUBLANG_ARABIC_LIBYA 0x04 # endif # ifndef SUBLANG_ARABIC_ALGERIA # define SUBLANG_ARABIC_ALGERIA 0x05 # endif # ifndef SUBLANG_ARABIC_MOROCCO # define SUBLANG_ARABIC_MOROCCO 0x06 # endif # ifndef SUBLANG_ARABIC_TUNISIA # define SUBLANG_ARABIC_TUNISIA 0x07 # endif # ifndef SUBLANG_ARABIC_OMAN # define SUBLANG_ARABIC_OMAN 0x08 # endif # ifndef SUBLANG_ARABIC_YEMEN # define SUBLANG_ARABIC_YEMEN 0x09 # endif # ifndef SUBLANG_ARABIC_SYRIA # define SUBLANG_ARABIC_SYRIA 0x0a # endif # ifndef SUBLANG_ARABIC_JORDAN # define SUBLANG_ARABIC_JORDAN 0x0b # endif # ifndef SUBLANG_ARABIC_LEBANON # define SUBLANG_ARABIC_LEBANON 0x0c # endif # ifndef SUBLANG_ARABIC_KUWAIT # define SUBLANG_ARABIC_KUWAIT 0x0d # endif # ifndef SUBLANG_ARABIC_UAE # define SUBLANG_ARABIC_UAE 0x0e # endif # ifndef SUBLANG_ARABIC_BAHRAIN # define SUBLANG_ARABIC_BAHRAIN 0x0f # endif # ifndef SUBLANG_ARABIC_QATAR # define SUBLANG_ARABIC_QATAR 0x10 # endif # ifndef SUBLANG_AZERI_LATIN # define SUBLANG_AZERI_LATIN 0x01 # endif # ifndef SUBLANG_AZERI_CYRILLIC # define SUBLANG_AZERI_CYRILLIC 0x02 # endif # ifndef SUBLANG_CHINESE_MACAU # define SUBLANG_CHINESE_MACAU 0x05 # endif # ifndef SUBLANG_ENGLISH_SOUTH_AFRICA # define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 # endif # ifndef SUBLANG_ENGLISH_JAMAICA # define SUBLANG_ENGLISH_JAMAICA 0x08 # endif # ifndef SUBLANG_ENGLISH_CARIBBEAN # define SUBLANG_ENGLISH_CARIBBEAN 0x09 # endif # ifndef SUBLANG_ENGLISH_BELIZE # define SUBLANG_ENGLISH_BELIZE 0x0a # endif # ifndef SUBLANG_ENGLISH_TRINIDAD # define SUBLANG_ENGLISH_TRINIDAD 0x0b # endif # ifndef SUBLANG_ENGLISH_ZIMBABWE # define SUBLANG_ENGLISH_ZIMBABWE 0x0c # endif # ifndef SUBLANG_ENGLISH_PHILIPPINES # define SUBLANG_ENGLISH_PHILIPPINES 0x0d # endif # ifndef SUBLANG_FRENCH_LUXEMBOURG # define SUBLANG_FRENCH_LUXEMBOURG 0x05 # endif # ifndef SUBLANG_FRENCH_MONACO # define SUBLANG_FRENCH_MONACO 0x06 # endif # ifndef SUBLANG_GERMAN_LUXEMBOURG # define SUBLANG_GERMAN_LUXEMBOURG 0x04 # endif # ifndef SUBLANG_GERMAN_LIECHTENSTEIN # define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 # endif # ifndef SUBLANG_KASHMIRI_INDIA # define SUBLANG_KASHMIRI_INDIA 0x02 # endif # ifndef SUBLANG_MALAY_MALAYSIA # define SUBLANG_MALAY_MALAYSIA 0x01 # endif # ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM # define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 # endif # ifndef SUBLANG_NEPALI_INDIA # define SUBLANG_NEPALI_INDIA 0x02 # endif # ifndef SUBLANG_SERBIAN_LATIN # define SUBLANG_SERBIAN_LATIN 0x02 # endif # ifndef SUBLANG_SERBIAN_CYRILLIC # define SUBLANG_SERBIAN_CYRILLIC 0x03 # endif # ifndef SUBLANG_SPANISH_GUATEMALA # define SUBLANG_SPANISH_GUATEMALA 0x04 # endif # ifndef SUBLANG_SPANISH_COSTA_RICA # define SUBLANG_SPANISH_COSTA_RICA 0x05 # endif # ifndef SUBLANG_SPANISH_PANAMA # define SUBLANG_SPANISH_PANAMA 0x06 # endif # ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC # define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 # endif # ifndef SUBLANG_SPANISH_VENEZUELA # define SUBLANG_SPANISH_VENEZUELA 0x08 # endif # ifndef SUBLANG_SPANISH_COLOMBIA # define SUBLANG_SPANISH_COLOMBIA 0x09 # endif # ifndef SUBLANG_SPANISH_PERU # define SUBLANG_SPANISH_PERU 0x0a # endif # ifndef SUBLANG_SPANISH_ARGENTINA # define SUBLANG_SPANISH_ARGENTINA 0x0b # endif # ifndef SUBLANG_SPANISH_ECUADOR # define SUBLANG_SPANISH_ECUADOR 0x0c # endif # ifndef SUBLANG_SPANISH_CHILE # define SUBLANG_SPANISH_CHILE 0x0d # endif # ifndef SUBLANG_SPANISH_URUGUAY # define SUBLANG_SPANISH_URUGUAY 0x0e # endif # ifndef SUBLANG_SPANISH_PARAGUAY # define SUBLANG_SPANISH_PARAGUAY 0x0f # endif # ifndef SUBLANG_SPANISH_BOLIVIA # define SUBLANG_SPANISH_BOLIVIA 0x10 # endif # ifndef SUBLANG_SPANISH_EL_SALVADOR # define SUBLANG_SPANISH_EL_SALVADOR 0x11 # endif # ifndef SUBLANG_SPANISH_HONDURAS # define SUBLANG_SPANISH_HONDURAS 0x12 # endif # ifndef SUBLANG_SPANISH_NICARAGUA # define SUBLANG_SPANISH_NICARAGUA 0x13 # endif # ifndef SUBLANG_SPANISH_PUERTO_RICO # define SUBLANG_SPANISH_PUERTO_RICO 0x14 # endif # ifndef SUBLANG_SWEDISH_FINLAND # define SUBLANG_SWEDISH_FINLAND 0x02 # endif # ifndef SUBLANG_URDU_PAKISTAN # define SUBLANG_URDU_PAKISTAN 0x01 # endif # ifndef SUBLANG_URDU_INDIA # define SUBLANG_URDU_INDIA 0x02 # endif # ifndef SUBLANG_UZBEK_LATIN # define SUBLANG_UZBEK_LATIN 0x01 # endif # ifndef SUBLANG_UZBEK_CYRILLIC # define SUBLANG_UZBEK_CYRILLIC 0x02 # endif #endif /* XPG3 defines the result of 'setlocale (category, NULL)' as: "Directs 'setlocale()' to query 'category' and return the current setting of 'local'." However it does not specify the exact format. Neither do SUSV2 and ISO C 99. So we can use this feature only on selected systems (e.g. those using GNU C Library). */ #if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2) # define HAVE_LOCALE_NULL #endif /* Determine the current locale's name, and canonicalize it into XPG syntax language[_territory[.codeset]][@modifier] The codeset part in the result is not reliable; the locale_charset() should be used for codeset information instead. The result must not be freed; it is statically allocated. */ const char * _nl_locale_name (category, categoryname) int category; const char *categoryname; { const char *retval; #ifndef WIN32 /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. On some systems this can be done by the 'setlocale' function itself. */ # if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL retval = setlocale (category, NULL); # else /* Setting of LC_ALL overwrites all other. */ retval = getenv ("LC_ALL"); if (retval == NULL || retval[0] == '\0') { /* Next comes the name of the desired category. */ retval = getenv (categoryname); if (retval == NULL || retval[0] == '\0') { /* Last possibility is the LANG environment variable. */ retval = getenv ("LANG"); if (retval == NULL || retval[0] == '\0') /* We use C as the default domain. POSIX says this is implementation defined. */ retval = "C"; } } # endif return retval; #else /* WIN32 */ /* Return an XPG style locale name language[_territory][@modifier]. Don't even bother determining the codeset; it's not useful in this context, because message catalogs are not specific to a single codeset. */ LCID lcid; LANGID langid; int primary, sub; /* Let the user override the system settings through environment variables, as on POSIX systems. */ retval = getenv ("LC_ALL"); if (retval != NULL && retval[0] != '\0') return retval; retval = getenv (categoryname); if (retval != NULL && retval[0] != '\0') return retval; retval = getenv ("LANG"); if (retval != NULL && retval[0] != '\0') return retval; /* Use native Win32 API locale ID. */ lcid = GetThreadLocale (); /* Strip off the sorting rules, keep only the language part. */ langid = LANGIDFROMLCID (lcid); /* Split into language and territory part. */ primary = PRIMARYLANGID (langid); sub = SUBLANGID (langid); /* Dispatch on language. See also http://www.unicode.org/unicode/onlinedat/languages.html . For details about languages, see http://www.ethnologue.com/ . */ switch (primary) { case LANG_AFRIKAANS: return "af_ZA"; case LANG_ALBANIAN: return "sq_AL"; case 0x5e: /* AMHARIC */ return "am_ET"; case LANG_ARABIC: switch (sub) { case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA"; case SUBLANG_ARABIC_IRAQ: return "ar_IQ"; case SUBLANG_ARABIC_EGYPT: return "ar_EG"; case SUBLANG_ARABIC_LIBYA: return "ar_LY"; case SUBLANG_ARABIC_ALGERIA: return "ar_DZ"; case SUBLANG_ARABIC_MOROCCO: return "ar_MA"; case SUBLANG_ARABIC_TUNISIA: return "ar_TN"; case SUBLANG_ARABIC_OMAN: return "ar_OM"; case SUBLANG_ARABIC_YEMEN: return "ar_YE"; case SUBLANG_ARABIC_SYRIA: return "ar_SY"; case SUBLANG_ARABIC_JORDAN: return "ar_JO"; case SUBLANG_ARABIC_LEBANON: return "ar_LB"; case SUBLANG_ARABIC_KUWAIT: return "ar_KW"; case SUBLANG_ARABIC_UAE: return "ar_AE"; case SUBLANG_ARABIC_BAHRAIN: return "ar_BH"; case SUBLANG_ARABIC_QATAR: return "ar_QA"; } return "ar"; case LANG_ARMENIAN: return "hy_AM"; case LANG_ASSAMESE: return "as_IN"; case LANG_AZERI: switch (sub) { /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */ case SUBLANG_AZERI_LATIN: return "az_AZ@latin"; case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic"; } return "az"; case LANG_BASQUE: return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */ case LANG_BELARUSIAN: return "be_BY"; case LANG_BENGALI: return "bn_IN"; case LANG_BULGARIAN: return "bg_BG"; case 0x55: /* BURMESE */ return "my_MM"; case 0x53: /* CAMBODIAN */ return "km_KH"; case LANG_CATALAN: return "ca_ES"; case 0x5c: /* CHEROKEE */ return "chr_US"; case LANG_CHINESE: switch (sub) { case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW"; case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN"; case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; case SUBLANG_CHINESE_MACAU: return "zh_MO"; } return "zh"; case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN * What used to be called Serbo-Croatian * should really now be two separate * languages because of political reasons. * (Says tml, who knows nothing about Serbian * or Croatian.) * (I can feel those flames coming already.) */ switch (sub) { case SUBLANG_DEFAULT: return "hr_HR"; case SUBLANG_SERBIAN_LATIN: return "sr_YU"; case SUBLANG_SERBIAN_CYRILLIC: return "sr_YU@cyrillic"; } return "hr"; case LANG_CZECH: return "cs_CZ"; case LANG_DANISH: return "da_DK"; case LANG_DIVEHI: return "div_MV"; case LANG_DUTCH: switch (sub) { case SUBLANG_DUTCH: return "nl_NL"; case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; } return "nl"; case 0x66: /* EDO */ return "bin_NG"; case LANG_ENGLISH: switch (sub) { /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought * English was the language spoken in England. * Oh well. */ case SUBLANG_ENGLISH_US: return "en_US"; case SUBLANG_ENGLISH_UK: return "en_GB"; case SUBLANG_ENGLISH_AUS: return "en_AU"; case SUBLANG_ENGLISH_CAN: return "en_CA"; case SUBLANG_ENGLISH_NZ: return "en_NZ"; case SUBLANG_ENGLISH_EIRE: return "en_IE"; case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA"; case SUBLANG_ENGLISH_JAMAICA: return "en_JM"; case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */ case SUBLANG_ENGLISH_BELIZE: return "en_BZ"; case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; } return "en"; case LANG_ESTONIAN: return "et_EE"; case LANG_FAEROESE: return "fo_FO"; case LANG_FARSI: return "fa_IR"; case LANG_FINNISH: return "fi_FI"; case LANG_FRENCH: switch (sub) { case SUBLANG_FRENCH: return "fr_FR"; case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; case SUBLANG_FRENCH_SWISS: return "fr_CH"; case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; case SUBLANG_FRENCH_MONACO: return "fr_MC"; } return "fr"; case 0x62: /* FRISIAN */ return "fy_NL"; case 0x67: /* FULFULDE */ return "ful_NG"; case 0x3c: /* GAELIC */ switch (sub) { case 0x01: /* SCOTTISH */ return "gd_GB"; case 0x02: /* IRISH */ return "ga_IE"; } return "C"; case LANG_GALICIAN: return "gl_ES"; case LANG_GEORGIAN: return "ka_GE"; case LANG_GERMAN: switch (sub) { case SUBLANG_GERMAN: return "de_DE"; case SUBLANG_GERMAN_SWISS: return "de_CH"; case SUBLANG_GERMAN_AUSTRIAN: return "de_AT"; case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU"; case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI"; } return "de"; case LANG_GREEK: return "el_GR"; case 0x74: /* GUARANI */ return "gn_PY"; case LANG_GUJARATI: return "gu_IN"; case 0x68: /* HAUSA */ return "ha_NG"; case 0x75: /* HAWAIIAN */ /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) or Hawaii Creole English ("cpe_US", 600000 speakers)? */ return "cpe_US"; case LANG_HEBREW: return "he_IL"; case LANG_HINDI: return "hi_IN"; case LANG_HUNGARIAN: return "hu_HU"; case 0x69: /* IBIBIO */ return "nic_NG"; case LANG_ICELANDIC: return "is_IS"; case 0x70: /* IGBO */ return "ibo_NG"; case LANG_INDONESIAN: return "id_ID"; case 0x5d: /* INUKTITUT */ return "iu_CA"; case LANG_ITALIAN: switch (sub) { case SUBLANG_ITALIAN: return "it_IT"; case SUBLANG_ITALIAN_SWISS: return "it_CH"; } return "it"; case LANG_JAPANESE: return "ja_JP"; case LANG_KANNADA: return "kn_IN"; case 0x71: /* KANURI */ return "kau_NG"; case LANG_KASHMIRI: switch (sub) { case SUBLANG_DEFAULT: return "ks_PK"; case SUBLANG_KASHMIRI_INDIA: return "ks_IN"; } return "ks"; case LANG_KAZAK: return "kk_KZ"; case LANG_KONKANI: /* FIXME: Adjust this when such locales appear on Unix. */ return "kok_IN"; case LANG_KOREAN: return "ko_KR"; case LANG_KYRGYZ: return "ky_KG"; case 0x54: /* LAO */ return "lo_LA"; case 0x76: /* LATIN */ return "la_VA"; case LANG_LATVIAN: return "lv_LV"; case LANG_LITHUANIAN: return "lt_LT"; case LANG_MACEDONIAN: return "mk_MK"; case LANG_MALAY: switch (sub) { case SUBLANG_MALAY_MALAYSIA: return "ms_MY"; case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN"; } return "ms"; case LANG_MALAYALAM: return "ml_IN"; case 0x3a: /* MALTESE */ return "mt_MT"; case LANG_MANIPURI: /* FIXME: Adjust this when such locales appear on Unix. */ return "mni_IN"; case LANG_MARATHI: return "mr_IN"; case LANG_MONGOLIAN: return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ case LANG_NEPALI: switch (sub) { case SUBLANG_DEFAULT: return "ne_NP"; case SUBLANG_NEPALI_INDIA: return "ne_IN"; } return "ne"; case LANG_NORWEGIAN: switch (sub) { case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO"; case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO"; } return "no"; case LANG_ORIYA: return "or_IN"; case 0x72: /* OROMO */ return "om_ET"; case 0x79: /* PAPIAMENTU */ return "pap_AN"; case 0x63: /* PASHTO */ return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ case LANG_POLISH: return "pl_PL"; case LANG_PORTUGUESE: switch (sub) { case SUBLANG_PORTUGUESE: return "pt_PT"; /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT. Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR"; } return "pt"; case LANG_PUNJABI: return "pa_IN"; case 0x17: /* RHAETO-ROMANCE */ return "rm_CH"; case LANG_ROMANIAN: return "ro_RO"; case LANG_RUSSIAN: return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA". */ case 0x3b: /* SAMI */ return "se_NO"; case LANG_SANSKRIT: return "sa_IN"; case LANG_SINDHI: return "sd"; case 0x5b: /* SINHALESE */ return "si_LK"; case LANG_SLOVAK: return "sk_SK"; case LANG_SLOVENIAN: return "sl_SI"; case 0x77: /* SOMALI */ return "so_SO"; case LANG_SORBIAN: /* FIXME: Adjust this when such locales appear on Unix. */ return "wen_DE"; case LANG_SPANISH: switch (sub) { case SUBLANG_SPANISH: return "es_ES"; case SUBLANG_SPANISH_MEXICAN: return "es_MX"; case SUBLANG_SPANISH_MODERN: return "es_ES@modern"; /* not seen on Unix */ case SUBLANG_SPANISH_GUATEMALA: return "es_GT"; case SUBLANG_SPANISH_COSTA_RICA: return "es_CR"; case SUBLANG_SPANISH_PANAMA: return "es_PA"; case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO"; case SUBLANG_SPANISH_VENEZUELA: return "es_VE"; case SUBLANG_SPANISH_COLOMBIA: return "es_CO"; case SUBLANG_SPANISH_PERU: return "es_PE"; case SUBLANG_SPANISH_ARGENTINA: return "es_AR"; case SUBLANG_SPANISH_ECUADOR: return "es_EC"; case SUBLANG_SPANISH_CHILE: return "es_CL"; case SUBLANG_SPANISH_URUGUAY: return "es_UY"; case SUBLANG_SPANISH_PARAGUAY: return "es_PY"; case SUBLANG_SPANISH_BOLIVIA: return "es_BO"; case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV"; case SUBLANG_SPANISH_HONDURAS: return "es_HN"; case SUBLANG_SPANISH_NICARAGUA: return "es_NI"; case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; } return "es"; case 0x30: /* SUTU */ return "bnt_TZ"; case LANG_SWAHILI: return "sw_KE"; case LANG_SWEDISH: switch (sub) { case SUBLANG_DEFAULT: return "sv_SE"; case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; } return "sv"; case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */ case 0x64: /* TAGALOG */ return "tl_PH"; case 0x28: /* TAJIK */ return "tg_TJ"; case 0x5f: /* TAMAZIGHT */ return "ber_MA"; case LANG_TAMIL: return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ case LANG_TATAR: return "tt_RU"; case LANG_TELUGU: return "te_IN"; case LANG_THAI: return "th_TH"; case 0x51: /* TIBETAN */ return "bo_CN"; case 0x73: /* TIGRINYA */ return "ti_ET"; case 0x31: /* TSONGA */ return "ts_ZA"; case LANG_TURKISH: return "tr_TR"; case 0x42: /* TURKMEN */ return "tk_TM"; case LANG_UKRAINIAN: return "uk_UA"; case LANG_URDU: switch (sub) { case SUBLANG_URDU_PAKISTAN: return "ur_PK"; case SUBLANG_URDU_INDIA: return "ur_IN"; } return "ur"; case LANG_UZBEK: switch (sub) { /* FIXME: Adjust this when Uzbek locales appear on Unix. */ case SUBLANG_UZBEK_LATIN: return "uz_UZ@latin"; case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic"; } return "uz"; case 0x33: /* VENDA */ return "ven_ZA"; case LANG_VIETNAMESE: return "vi_VN"; case 0x52: /* WELSH */ return "cy_GB"; case 0x34: /* XHOSA */ return "xh_ZA"; case 0x78: /* YI */ return "sit_CN"; case 0x3d: /* YIDDISH */ return "yi_IL"; case 0x6a: /* YORUBA */ return "yo_NG"; case 0x35: /* ZULU */ return "zu_ZA"; default: return "C"; } #endif } steghide-0.5.1/intl/localcharset.c0000644000076400001440000002245007735006035012560 /* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Written by Bruno Haible . */ #ifdef HAVE_CONFIG_H # include #endif #if HAVE_STDDEF_H # include #endif #include #if HAVE_STRING_H # include #else # include #endif #if HAVE_STDLIB_H # include #endif #if defined _WIN32 || defined __WIN32__ # undef WIN32 /* avoid warning on mingw32 */ # define WIN32 #endif #if defined __EMX__ /* Assume EMX program runs on OS/2, even if compiled under DOS. */ # define OS2 #endif #if !defined WIN32 # if HAVE_LANGINFO_CODESET # include # else # if HAVE_SETLOCALE # include # endif # endif #elif defined WIN32 # define WIN32_LEAN_AND_MEAN # include #endif #if defined OS2 # define INCL_DOS # include #endif #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif #ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' #endif #ifndef ISSLASH # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) #endif #ifdef HAVE_GETC_UNLOCKED # undef getc # define getc getc_unlocked #endif #ifdef __cplusplus /* When compiling with "gcc -x c++", produce a function with C linkage. */ extern "C" const char * locale_charset (void); #endif /* The following static variable is declared 'volatile' to avoid a possible multithread problem in the function get_charset_aliases. If we are running in a threaded environment, and if two threads initialize 'charset_aliases' simultaneously, both will produce the same value, and everything will be ok if the two assignments to 'charset_aliases' are atomic. But I don't know what will happen if the two assignments mix. */ #if __STDC__ != 1 # define volatile /* empty */ #endif /* Pointer to the contents of the charset.alias file, if it has already been read, else NULL. Its format is: ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ static const char * get_charset_aliases () { const char *cp; cp = charset_aliases; if (cp == NULL) { #if !defined WIN32 FILE *fp; const char *dir = LIBDIR; const char *base = "charset.alias"; char *file_name; /* Concatenate dir and base into freshly allocated file_name. */ { size_t dir_len = strlen (dir); size_t base_len = strlen (base); int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); file_name = (char *) malloc (dir_len + add_slash + base_len + 1); if (file_name != NULL) { memcpy (file_name, dir, dir_len); if (add_slash) file_name[dir_len] = DIRECTORY_SEPARATOR; memcpy (file_name + dir_len + add_slash, base, base_len + 1); } } if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL) /* Out of memory or file not found, treat it as empty. */ cp = ""; else { /* Parse the file's contents. */ int c; char buf1[50+1]; char buf2[50+1]; char *res_ptr = NULL; size_t res_size = 0; size_t l1, l2; for (;;) { c = getc (fp); if (c == EOF) break; if (c == '\n' || c == ' ' || c == '\t') continue; if (c == '#') { /* Skip comment, to end of line. */ do c = getc (fp); while (!(c == EOF || c == '\n')); if (c == EOF) break; continue; } ungetc (c, fp); if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) break; l1 = strlen (buf1); l2 = strlen (buf2); if (res_size == 0) { res_size = l1 + 1 + l2 + 1; res_ptr = (char *) malloc (res_size + 1); } else { res_size += l1 + 1 + l2 + 1; res_ptr = (char *) realloc (res_ptr, res_size + 1); } if (res_ptr == NULL) { /* Out of memory. */ res_size = 0; break; } strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); strcpy (res_ptr + res_size - (l2 + 1), buf2); } fclose (fp); if (res_size == 0) cp = ""; else { *(res_ptr + res_size) = '\0'; cp = res_ptr; } } if (file_name != NULL) free (file_name); #else /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ # if defined WIN32 cp = "CP936" "\0" "GBK" "\0" "CP1361" "\0" "JOHAB" "\0" "CP20127" "\0" "ASCII" "\0" "CP20866" "\0" "KOI8-R" "\0" "CP21866" "\0" "KOI8-RU" "\0" "CP28591" "\0" "ISO-8859-1" "\0" "CP28592" "\0" "ISO-8859-2" "\0" "CP28593" "\0" "ISO-8859-3" "\0" "CP28594" "\0" "ISO-8859-4" "\0" "CP28595" "\0" "ISO-8859-5" "\0" "CP28596" "\0" "ISO-8859-6" "\0" "CP28597" "\0" "ISO-8859-7" "\0" "CP28598" "\0" "ISO-8859-8" "\0" "CP28599" "\0" "ISO-8859-9" "\0" "CP28605" "\0" "ISO-8859-15" "\0"; # endif #endif charset_aliases = cp; } return cp; } /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ #ifdef STATIC STATIC #endif const char * locale_charset () { const char *codeset; const char *aliases; #if !(defined WIN32 || defined OS2) # if HAVE_LANGINFO_CODESET /* Most systems support nl_langinfo (CODESET) nowadays. */ codeset = nl_langinfo (CODESET); # else /* On old systems which lack it, use setlocale or getenv. */ const char *locale = NULL; /* But most old systems don't have a complete set of locales. Some (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't use setlocale here; it would return "C" when it doesn't support the locale name the user has set. */ # if HAVE_SETLOCALE && 0 locale = setlocale (LC_CTYPE, NULL); # endif if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } } /* On some old systems, one used to set locale = "iso8859_1". On others, you set it to "language_COUNTRY.charset". In any case, we resolve it through the charset.alias file. */ codeset = locale; # endif #elif defined WIN32 static char buf[2 + 10 + 1]; /* Woe32 has a function returning the locale's codepage as a number. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; #elif defined OS2 const char *locale; static char buf[2 + 10 + 1]; ULONG cp[3]; ULONG cplen; /* Allow user to override the codeset, as set in the operating system, with standard language environment variables. */ locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } /* Resolve through the charset.alias file. */ codeset = locale; } else { /* OS/2 has a function returning the locale's codepage as a number. */ if (DosQueryCp (sizeof (cp), cp, &cplen)) codeset = ""; else { sprintf (buf, "CP%u", cp[0]); codeset = buf; } } #endif if (codeset == NULL) /* The canonical name cannot be determined. */ codeset = ""; /* Resolve alias. */ for (aliases = get_charset_aliases (); *aliases != '\0'; aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) if (strcmp (codeset, aliases) == 0 || (aliases[0] == '*' && aliases[1] == '\0')) { codeset = aliases + strlen (aliases) + 1; break; } /* Don't return an empty string. GNU libc and GNU libiconv interpret the empty string as denoting "the locale's character encoding", thus GNU libiconv would call this function a second time. */ if (codeset[0] == '\0') codeset = "ASCII"; return codeset; } steghide-0.5.1/intl/locale.alias0000644000076400001440000000514107735006035012220 # Locale name alias data base. # Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. # The format of this file is the same as for the corresponding file of # the X Window System, which normally can be found in # /usr/lib/X11/locale/locale.alias # A single line contains two fields: an alias and a substitution value. # All entries are case independent. # Note: This file is far from being complete. If you have a value for # your own site which you think might be useful for others too, share # it with the rest of us. Send it using the `glibcbug' script to # bugs@gnu.org. # Packages using this file: bokmal no_NO.ISO-8859-1 bokmål no_NO.ISO-8859-1 catalan ca_ES.ISO-8859-1 croatian hr_HR.ISO-8859-2 czech cs_CZ.ISO-8859-2 danish da_DK.ISO-8859-1 dansk da_DK.ISO-8859-1 deutsch de_DE.ISO-8859-1 dutch nl_NL.ISO-8859-1 eesti et_EE.ISO-8859-1 estonian et_EE.ISO-8859-1 finnish fi_FI.ISO-8859-1 français fr_FR.ISO-8859-1 french fr_FR.ISO-8859-1 galego gl_ES.ISO-8859-1 galician gl_ES.ISO-8859-1 german de_DE.ISO-8859-1 greek el_GR.ISO-8859-7 hebrew he_IL.ISO-8859-8 hrvatski hr_HR.ISO-8859-2 hungarian hu_HU.ISO-8859-2 icelandic is_IS.ISO-8859-1 italian it_IT.ISO-8859-1 japanese ja_JP.eucJP japanese.euc ja_JP.eucJP ja_JP ja_JP.eucJP ja_JP.ujis ja_JP.eucJP japanese.sjis ja_JP.SJIS korean ko_KR.eucKR korean.euc ko_KR.eucKR ko_KR ko_KR.eucKR lithuanian lt_LT.ISO-8859-13 nb_NO no_NO.ISO-8859-1 nb_NO.ISO-8859-1 no_NO.ISO-8859-1 norwegian no_NO.ISO-8859-1 nynorsk nn_NO.ISO-8859-1 polish pl_PL.ISO-8859-2 portuguese pt_PT.ISO-8859-1 romanian ro_RO.ISO-8859-2 russian ru_RU.ISO-8859-5 slovak sk_SK.ISO-8859-2 slovene sl_SI.ISO-8859-2 slovenian sl_SI.ISO-8859-2 spanish es_ES.ISO-8859-1 swedish sv_SE.ISO-8859-1 thai th_TH.TIS-620 turkish tr_TR.ISO-8859-9 steghide-0.5.1/intl/dngettext.c0000644000076400001440000000363707735006035012130 /* Implementation of the dngettext(3) function. Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DNGETTEXT __dngettext # define DCNGETTEXT INTUSE(__dcngettext) #else # define DNGETTEXT libintl_dngettext # define DCNGETTEXT libintl_dcngettext #endif /* Look up MSGID in the DOMAINNAME message catalog of the current LC_MESSAGES locale and skip message according to the plural form. */ char * DNGETTEXT (domainname, msgid1, msgid2, n) const char *domainname; const char *msgid1; const char *msgid2; unsigned long int n; { return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__dngettext, dngettext); #endif steghide-0.5.1/intl/ref-del.sin0000644000076400001440000000202407735006035011774 # Remove this package from a list of references stored in a text file. # # Copyright (C) 2000 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// s/ @PACKAGE@ / / s/^/# Packages using this file:/ } steghide-0.5.1/intl/libgnuintl.h0000644000076400001440000002435507735006035012276 /* Message catalogs for internationalization. Copyright (C) 1995-1997, 2000-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _LIBINTL_H #define _LIBINTL_H 1 #include /* The LC_MESSAGES locale category is the category used by the functions gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. On systems that don't define it, use an arbitrary value instead. On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) then includes (i.e. this file!) and then only defines LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES in this case. */ #if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) # define LC_MESSAGES 1729 #endif /* We define an additional symbol to signal that we use the GNU implementation of gettext. */ #define __USE_GNU_GETTEXT 1 /* Provide information about the supported file formats. Returns the maximum minor revision number supported for a given major revision. */ #define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ ((major) == 0 ? 1 : -1) /* Resolve a platform specific conflict on DJGPP. GNU gettext takes precedence over _conio_gettext. */ #ifdef __DJGPP__ # undef gettext #endif /* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers used by programs. Similarly, test __PROTOTYPES, not PROTOTYPES. */ #ifndef _INTL_PARAMS # if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES # define _INTL_PARAMS(args) args # else # define _INTL_PARAMS(args) () # endif #endif #ifdef __cplusplus extern "C" { #endif /* We redirect the functions to those prefixed with "libintl_". This is necessary, because some systems define gettext/textdomain/... in the C library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). If we used the unprefixed names, there would be cases where the definition in the C library would override the one in the libintl.so shared library. Recall that on ELF systems, the symbols are looked up in the following order: 1. in the executable, 2. in the shared libraries specified on the link command line, in order, 3. in the dependencies of the shared libraries specified on the link command line, 4. in the dlopen()ed shared libraries, in the order in which they were dlopen()ed. The definition in the C library would override the one in libintl.so if either * -lc is given on the link command line and -lintl isn't, or * -lc is given on the link command line before -lintl, or * libintl.so is a dependency of a dlopen()ed shared library but not linked to the executable at link time. Since Solaris gettext() behaves differently than GNU gettext(), this would be unacceptable. The redirection happens by default through macros in C, so that &gettext is independent of the compilation unit, but through inline functions in C++, in order not to interfere with the name mangling of class fields or class methods called 'gettext'. */ /* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. If he doesn't, we choose the method. A third possible method is _INTL_REDIRECT_ASM, supported only by GCC. */ #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) # if __GNUC__ >= 2 && (defined __STDC__ || defined __cplusplus) # define _INTL_REDIRECT_ASM # else # ifdef __cplusplus # define _INTL_REDIRECT_INLINE # else # define _INTL_REDIRECT_MACROS # endif # endif #endif /* Auxiliary macros. */ #ifdef _INTL_REDIRECT_ASM # define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) # define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring # define _INTL_STRINGIFY(prefix) #prefix #else # define _INTL_ASM(cname) #endif /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_gettext (const char *__msgid); static inline char *gettext (const char *__msgid) { return libintl_gettext (__msgid); } #else #ifdef _INTL_REDIRECT_MACROS # define gettext libintl_gettext #endif extern char *gettext _INTL_PARAMS ((const char *__msgid)) _INTL_ASM (libintl_gettext); #endif /* Look up MSGID in the DOMAINNAME message catalog for the current LC_MESSAGES locale. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dgettext (const char *__domainname, const char *__msgid); static inline char *dgettext (const char *__domainname, const char *__msgid) { return libintl_dgettext (__domainname, __msgid); } #else #ifdef _INTL_REDIRECT_MACROS # define dgettext libintl_dgettext #endif extern char *dgettext _INTL_PARAMS ((const char *__domainname, const char *__msgid)) _INTL_ASM (libintl_dgettext); #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, int __category); static inline char *dcgettext (const char *__domainname, const char *__msgid, int __category) { return libintl_dcgettext (__domainname, __msgid, __category); } #else #ifdef _INTL_REDIRECT_MACROS # define dcgettext libintl_dcgettext #endif extern char *dcgettext _INTL_PARAMS ((const char *__domainname, const char *__msgid, int __category)) _INTL_ASM (libintl_dcgettext); #endif /* Similar to `gettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n); static inline char *ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) { return libintl_ngettext (__msgid1, __msgid2, __n); } #else #ifdef _INTL_REDIRECT_MACROS # define ngettext libintl_ngettext #endif extern char *ngettext _INTL_PARAMS ((const char *__msgid1, const char *__msgid2, unsigned long int __n)) _INTL_ASM (libintl_ngettext); #endif /* Similar to `dgettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n); static inline char *dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) { return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); } #else #ifdef _INTL_REDIRECT_MACROS # define dngettext libintl_dngettext #endif extern char *dngettext _INTL_PARAMS ((const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n)) _INTL_ASM (libintl_dngettext); #endif /* Similar to `dcgettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category); static inline char *dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) { return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); } #else #ifdef _INTL_REDIRECT_MACROS # define dcngettext libintl_dcngettext #endif extern char *dcngettext _INTL_PARAMS ((const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category)) _INTL_ASM (libintl_dcngettext); #endif /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_textdomain (const char *__domainname); static inline char *textdomain (const char *__domainname) { return libintl_textdomain (__domainname); } #else #ifdef _INTL_REDIRECT_MACROS # define textdomain libintl_textdomain #endif extern char *textdomain _INTL_PARAMS ((const char *__domainname)) _INTL_ASM (libintl_textdomain); #endif /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_bindtextdomain (const char *__domainname, const char *__dirname); static inline char *bindtextdomain (const char *__domainname, const char *__dirname) { return libintl_bindtextdomain (__domainname, __dirname); } #else #ifdef _INTL_REDIRECT_MACROS # define bindtextdomain libintl_bindtextdomain #endif extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname, const char *__dirname)) _INTL_ASM (libintl_bindtextdomain); #endif /* Specify the character encoding in which the messages from the DOMAINNAME message catalog will be returned. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_bind_textdomain_codeset (const char *__domainname, const char *__codeset); static inline char *bind_textdomain_codeset (const char *__domainname, const char *__codeset) { return libintl_bind_textdomain_codeset (__domainname, __codeset); } #else #ifdef _INTL_REDIRECT_MACROS # define bind_textdomain_codeset libintl_bind_textdomain_codeset #endif extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname, const char *__codeset)) _INTL_ASM (libintl_bind_textdomain_codeset); #endif #ifdef __cplusplus } #endif #endif /* libintl.h */ steghide-0.5.1/intl/os2compat.c0000644000076400001440000000550307735006035012023 /* OS/2 compatibility functions. Copyright (C) 2001-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define OS2_AWARE #ifdef HAVE_CONFIG_H #include #endif #include #include #include /* A version of getenv() that works from DLLs */ extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue); char * _nl_getenv (const char *name) { unsigned char *value; if (DosScanEnv (name, &value)) return NULL; else return value; } /* A fixed size buffer. */ char libintl_nl_default_dirname[MAXPATHLEN+1]; char *_nlos2_libdir = NULL; char *_nlos2_localealiaspath = NULL; char *_nlos2_localedir = NULL; static __attribute__((constructor)) void nlos2_initialize () { char *root = getenv ("UNIXROOT"); char *gnulocaledir = getenv ("GNULOCALEDIR"); _nlos2_libdir = gnulocaledir; if (!_nlos2_libdir) { if (root) { size_t sl = strlen (root); _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1); memcpy (_nlos2_libdir, root, sl); memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1); } else _nlos2_libdir = LIBDIR; } _nlos2_localealiaspath = gnulocaledir; if (!_nlos2_localealiaspath) { if (root) { size_t sl = strlen (root); _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1); memcpy (_nlos2_localealiaspath, root, sl); memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1); } else _nlos2_localealiaspath = LOCALE_ALIAS_PATH; } _nlos2_localedir = gnulocaledir; if (!_nlos2_localedir) { if (root) { size_t sl = strlen (root); _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1); memcpy (_nlos2_localedir, root, sl); memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1); } else _nlos2_localedir = LOCALEDIR; } if (strlen (_nlos2_localedir) <= MAXPATHLEN) strcpy (libintl_nl_default_dirname, _nlos2_localedir); } steghide-0.5.1/intl/os2compat.h0000644000076400001440000000302207735006035012022 /* OS/2 compatibility defines. This file is intended to be included from config.h Copyright (C) 2001-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* When included from os2compat.h we need all the original definitions */ #ifndef OS2_AWARE #undef LIBDIR #define LIBDIR _nlos2_libdir extern char *_nlos2_libdir; #undef LOCALEDIR #define LOCALEDIR _nlos2_localedir extern char *_nlos2_localedir; #undef LOCALE_ALIAS_PATH #define LOCALE_ALIAS_PATH _nlos2_localealiaspath extern char *_nlos2_localealiaspath; #endif #undef HAVE_STRCASECMP #define HAVE_STRCASECMP 1 #define strcasecmp stricmp #define strncasecmp strnicmp /* We have our own getenv() which works even if library is compiled as DLL */ #define getenv _nl_getenv /* Older versions of gettext used -1 as the value of LC_MESSAGES */ #define LC_MESSAGES_COMPAT (-1) steghide-0.5.1/intl/dcigettext.c0000644000076400001440000007754007735006035012272 /* Implementation of the internal dcigettext function. Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Tell glibc's to provide a prototype for mempcpy(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif #include #ifdef __GNUC__ # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif #endif #include #ifndef errno extern int errno; #endif #ifndef __set_errno # define __set_errno(val) errno = (val) #endif #include #include #include #if defined HAVE_UNISTD_H || defined _LIBC # include #endif #include #include #if defined HAVE_SYS_PARAM_H || defined _LIBC # include #endif #include "gettextP.h" #include "plural-exp.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif #include "hash-string.h" /* Thread safetyness. */ #ifdef _LIBC # include #else /* Provide dummy implementation if this is outside glibc. */ # define __libc_lock_define_initialized(CLASS, NAME) # define __libc_lock_lock(NAME) # define __libc_lock_unlock(NAME) # define __libc_rwlock_define_initialized(CLASS, NAME) # define __libc_rwlock_rdlock(NAME) # define __libc_rwlock_unlock(NAME) #endif /* Alignment of types. */ #if defined __GNUC__ && __GNUC__ >= 2 # define alignof(TYPE) __alignof__ (TYPE) #else # define alignof(TYPE) \ ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2) #endif /* The internal variables in the standalone libintl.a must have different names than the internal variables in GNU libc, otherwise programs using libintl.a cannot be linked statically. */ #if !defined _LIBC # define _nl_default_default_domain libintl_nl_default_default_domain # define _nl_current_default_domain libintl_nl_current_default_domain # define _nl_default_dirname libintl_nl_default_dirname # define _nl_domain_bindings libintl_nl_domain_bindings #endif /* Some compilers, like SunOS4 cc, don't have offsetof in . */ #ifndef offsetof # define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) #endif /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ # define getcwd __getcwd # ifndef stpcpy # define stpcpy __stpcpy # endif # define tfind __tfind #else # if !defined HAVE_GETCWD char *getwd (); # define getcwd(buf, max) getwd (buf) # else char *getcwd (); # endif # ifndef HAVE_STPCPY static char *stpcpy PARAMS ((char *dest, const char *src)); # endif # ifndef HAVE_MEMPCPY static void *mempcpy PARAMS ((void *dest, const void *src, size_t n)); # endif #endif /* Amount to increase buffer size by in each try. */ #define PATH_INCR 32 /* The following is from pathmax.h. */ /* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define PATH_MAX but might cause redefinition warnings when sys/param.h is later included (as on MORE/BSD 4.3). */ #if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__) # include #endif #ifndef _POSIX_PATH_MAX # define _POSIX_PATH_MAX 255 #endif #if !defined PATH_MAX && defined _PC_PATH_MAX # define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) #endif /* Don't include sys/param.h if it already has been. */ #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include #endif #if !defined PATH_MAX && defined MAXPATHLEN # define PATH_MAX MAXPATHLEN #endif #ifndef PATH_MAX # define PATH_MAX _POSIX_PATH_MAX #endif /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, it may be concatenated to a directory pathname. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) # define IS_PATH_WITH_DIR(P) \ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) #endif /* This is the type used for the search tree where known translations are stored. */ struct known_translation_t { /* Domain in which to search. */ char *domainname; /* The category. */ int category; /* State of the catalog counter at the point the string was found. */ int counter; /* Catalog where the string was found. */ struct loaded_l10nfile *domain; /* And finally the translation. */ const char *translation; size_t translation_length; /* Pointer to the string in question. */ char msgid[ZERO]; }; /* Root of the search tree with known translations. We can use this only if the system provides the `tsearch' function family. */ #if defined HAVE_TSEARCH || defined _LIBC # include static void *root; # ifdef _LIBC # define tsearch __tsearch # endif /* Function to compare two entries in the table of known translations. */ static int transcmp PARAMS ((const void *p1, const void *p2)); static int transcmp (p1, p2) const void *p1; const void *p2; { const struct known_translation_t *s1; const struct known_translation_t *s2; int result; s1 = (const struct known_translation_t *) p1; s2 = (const struct known_translation_t *) p2; result = strcmp (s1->msgid, s2->msgid); if (result == 0) { result = strcmp (s1->domainname, s2->domainname); if (result == 0) /* We compare the category last (though this is the cheapest operation) since it is hopefully always the same (namely LC_MESSAGES). */ result = s1->category - s2->category; } return result; } #endif /* Name of the default domain used for gettext(3) prior any call to textdomain(3). The default value for this is "messages". */ const char _nl_default_default_domain[] attribute_hidden = "messages"; /* Value used as the default domain for gettext(3). */ const char *_nl_current_default_domain attribute_hidden = _nl_default_default_domain; /* Contains the default location of the message catalogs. */ #if defined __EMX__ extern const char _nl_default_dirname[]; #else const char _nl_default_dirname[] = LOCALEDIR; #endif /* List with bindings of specific domains created by bindtextdomain() calls. */ struct binding *_nl_domain_bindings; /* Prototypes for local functions. */ static char *plural_lookup PARAMS ((struct loaded_l10nfile *domain, unsigned long int n, const char *translation, size_t translation_len)) internal_function; static const char *category_to_name PARAMS ((int category)) internal_function; static const char *guess_category_value PARAMS ((int category, const char *categoryname)) internal_function; /* For those loosing systems which don't have `alloca' we have to add some additional code emulating it. */ #ifdef HAVE_ALLOCA /* Nothing has to be done. */ # define freea(p) /* nothing */ # define ADD_BLOCK(list, address) /* nothing */ # define FREE_BLOCKS(list) /* nothing */ #else struct block_list { void *address; struct block_list *next; }; # define ADD_BLOCK(list, addr) \ do { \ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ /* If we cannot get a free block we cannot add the new element to \ the list. */ \ if (newp != NULL) { \ newp->address = (addr); \ newp->next = (list); \ (list) = newp; \ } \ } while (0) # define FREE_BLOCKS(list) \ do { \ while (list != NULL) { \ struct block_list *old = list; \ list = list->next; \ free (old->address); \ free (old); \ } \ } while (0) # undef alloca # define alloca(size) (malloc (size)) # define freea(p) free (p) #endif /* have alloca */ #ifdef _LIBC /* List of blocks allocated for translations. */ typedef struct transmem_list { struct transmem_list *next; char data[ZERO]; } transmem_block_t; static struct transmem_list *transmem_list; #else typedef unsigned char transmem_block_t; #endif /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DCIGETTEXT __dcigettext #else # define DCIGETTEXT libintl_dcigettext #endif /* Lock variable to protect the global data in the gettext implementation. */ #ifdef _LIBC __libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden) #endif /* Checking whether the binaries runs SUID must be done and glibc provides easier methods therefore we make a difference here. */ #ifdef _LIBC # define ENABLE_SECURE __libc_enable_secure # define DETERMINE_SECURE #else # ifndef HAVE_GETUID # define getuid() 0 # endif # ifndef HAVE_GETGID # define getgid() 0 # endif # ifndef HAVE_GETEUID # define geteuid() getuid() # endif # ifndef HAVE_GETEGID # define getegid() getgid() # endif static int enable_secure; # define ENABLE_SECURE (enable_secure == 1) # define DETERMINE_SECURE \ if (enable_secure == 0) \ { \ if (getuid () != geteuid () || getgid () != getegid ()) \ enable_secure = 1; \ else \ enable_secure = -1; \ } #endif /* Get the function to evaluate the plural expression. */ #include "eval-plural.h" /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale and, if PLURAL is nonzero, search over string depending on the plural form determined by N. */ char * DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category) const char *domainname; const char *msgid1; const char *msgid2; int plural; unsigned long int n; int category; { #ifndef HAVE_ALLOCA struct block_list *block_list = NULL; #endif struct loaded_l10nfile *domain; struct binding *binding; const char *categoryname; const char *categoryvalue; char *dirname, *xdomainname; char *single_locale; char *retval; size_t retlen; int saved_errno; #if defined HAVE_TSEARCH || defined _LIBC struct known_translation_t *search; struct known_translation_t **foundp = NULL; size_t msgid_len; #endif size_t domainname_len; /* If no real MSGID is given return NULL. */ if (msgid1 == NULL) return NULL; __libc_rwlock_rdlock (_nl_state_lock); /* If DOMAINNAME is NULL, we are interested in the default domain. If CATEGORY is not LC_MESSAGES this might not make much sense but the definition left this undefined. */ if (domainname == NULL) domainname = _nl_current_default_domain; /* OS/2 specific: backward compatibility with older libintl versions */ #ifdef LC_MESSAGES_COMPAT if (category == LC_MESSAGES_COMPAT) category = LC_MESSAGES; #endif #if defined HAVE_TSEARCH || defined _LIBC msgid_len = strlen (msgid1) + 1; /* Try to find the translation among those which we found at some time. */ search = (struct known_translation_t *) alloca (offsetof (struct known_translation_t, msgid) + msgid_len); memcpy (search->msgid, msgid1, msgid_len); search->domainname = (char *) domainname; search->category = category; foundp = (struct known_translation_t **) tfind (search, &root, transcmp); freea (search); if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr) { /* Now deal with plural. */ if (plural) retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation, (*foundp)->translation_length); else retval = (char *) (*foundp)->translation; __libc_rwlock_unlock (_nl_state_lock); return retval; } #endif /* Preserve the `errno' value. */ saved_errno = errno; /* See whether this is a SUID binary or not. */ DETERMINE_SECURE; /* First find matching binding. */ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) { int compare = strcmp (domainname, binding->domainname); if (compare == 0) /* We found it! */ break; if (compare < 0) { /* It is not in the list. */ binding = NULL; break; } } if (binding == NULL) dirname = (char *) _nl_default_dirname; else if (IS_ABSOLUTE_PATH (binding->dirname)) dirname = binding->dirname; else { /* We have a relative path. Make it absolute now. */ size_t dirname_len = strlen (binding->dirname) + 1; size_t path_max; char *ret; path_max = (unsigned int) PATH_MAX; path_max += 2; /* The getcwd docs say to do this. */ for (;;) { dirname = (char *) alloca (path_max + dirname_len); ADD_BLOCK (block_list, dirname); __set_errno (0); ret = getcwd (dirname, path_max); if (ret != NULL || errno != ERANGE) break; path_max += path_max / 2; path_max += PATH_INCR; } if (ret == NULL) { /* We cannot get the current working directory. Don't signal an error but simply return the default string. */ FREE_BLOCKS (block_list); __libc_rwlock_unlock (_nl_state_lock); __set_errno (saved_errno); return (plural == 0 ? (char *) msgid1 /* Use the Germanic plural rule. */ : n == 1 ? (char *) msgid1 : (char *) msgid2); } stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); } /* Now determine the symbolic name of CATEGORY and its value. */ categoryname = category_to_name (category); categoryvalue = guess_category_value (category, categoryname); domainname_len = strlen (domainname); xdomainname = (char *) alloca (strlen (categoryname) + domainname_len + 5); ADD_BLOCK (block_list, xdomainname); stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), domainname, domainname_len), ".mo"); /* Creating working area. */ single_locale = (char *) alloca (strlen (categoryvalue) + 1); ADD_BLOCK (block_list, single_locale); /* Search for the given string. This is a loop because we perhaps got an ordered list of languages to consider for the translation. */ while (1) { /* Make CATEGORYVALUE point to the next element of the list. */ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') ++categoryvalue; if (categoryvalue[0] == '\0') { /* The whole contents of CATEGORYVALUE has been searched but no valid entry has been found. We solve this situation by implicitly appending a "C" entry, i.e. no translation will take place. */ single_locale[0] = 'C'; single_locale[1] = '\0'; } else { char *cp = single_locale; while (categoryvalue[0] != '\0' && categoryvalue[0] != ':') *cp++ = *categoryvalue++; *cp = '\0'; /* When this is a SUID binary we must not allow accessing files outside the dedicated directories. */ if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale)) /* Ingore this entry. */ continue; } /* If the current locale value is C (or POSIX) we don't load a domain. Return the MSGID. */ if (strcmp (single_locale, "C") == 0 || strcmp (single_locale, "POSIX") == 0) { FREE_BLOCKS (block_list); __libc_rwlock_unlock (_nl_state_lock); __set_errno (saved_errno); return (plural == 0 ? (char *) msgid1 /* Use the Germanic plural rule. */ : n == 1 ? (char *) msgid1 : (char *) msgid2); } /* Find structure describing the message catalog matching the DOMAINNAME and CATEGORY. */ domain = _nl_find_domain (dirname, single_locale, xdomainname, binding); if (domain != NULL) { retval = _nl_find_msg (domain, binding, msgid1, &retlen); if (retval == NULL) { int cnt; for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) { retval = _nl_find_msg (domain->successor[cnt], binding, msgid1, &retlen); if (retval != NULL) { domain = domain->successor[cnt]; break; } } } if (retval != NULL) { /* Found the translation of MSGID1 in domain DOMAIN: starting at RETVAL, RETLEN bytes. */ FREE_BLOCKS (block_list); __set_errno (saved_errno); #if defined HAVE_TSEARCH || defined _LIBC if (foundp == NULL) { /* Create a new entry and add it to the search tree. */ struct known_translation_t *newp; newp = (struct known_translation_t *) malloc (offsetof (struct known_translation_t, msgid) + msgid_len + domainname_len + 1); if (newp != NULL) { newp->domainname = mempcpy (newp->msgid, msgid1, msgid_len); memcpy (newp->domainname, domainname, domainname_len + 1); newp->category = category; newp->counter = _nl_msg_cat_cntr; newp->domain = domain; newp->translation = retval; newp->translation_length = retlen; /* Insert the entry in the search tree. */ foundp = (struct known_translation_t **) tsearch (newp, &root, transcmp); if (foundp == NULL || __builtin_expect (*foundp != newp, 0)) /* The insert failed. */ free (newp); } } else { /* We can update the existing entry. */ (*foundp)->counter = _nl_msg_cat_cntr; (*foundp)->domain = domain; (*foundp)->translation = retval; (*foundp)->translation_length = retlen; } #endif /* Now deal with plural. */ if (plural) retval = plural_lookup (domain, n, retval, retlen); __libc_rwlock_unlock (_nl_state_lock); return retval; } } } /* NOTREACHED */ } char * internal_function _nl_find_msg (domain_file, domainbinding, msgid, lengthp) struct loaded_l10nfile *domain_file; struct binding *domainbinding; const char *msgid; size_t *lengthp; { struct loaded_domain *domain; nls_uint32 nstrings; size_t act; char *result; size_t resultlen; if (domain_file->decided == 0) _nl_load_domain (domain_file, domainbinding); if (domain_file->data == NULL) return NULL; domain = (struct loaded_domain *) domain_file->data; nstrings = domain->nstrings; /* Locate the MSGID and its translation. */ if (domain->hash_tab != NULL) { /* Use the hashing table. */ nls_uint32 len = strlen (msgid); nls_uint32 hash_val = hash_string (msgid); nls_uint32 idx = hash_val % domain->hash_size; nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); while (1) { nls_uint32 nstr = W (domain->must_swap_hash_tab, domain->hash_tab[idx]); if (nstr == 0) /* Hash table entry is empty. */ return NULL; nstr--; /* Compare msgid with the original string at index nstr. We compare the lengths with >=, not ==, because plural entries are represented by strings with an embedded NUL. */ if (nstr < nstrings ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len && (strcmp (msgid, domain->data + W (domain->must_swap, domain->orig_tab[nstr].offset)) == 0) : domain->orig_sysdep_tab[nstr - nstrings].length > len && (strcmp (msgid, domain->orig_sysdep_tab[nstr - nstrings].pointer) == 0)) { act = nstr; goto found; } if (idx >= domain->hash_size - incr) idx -= domain->hash_size - incr; else idx += incr; } /* NOTREACHED */ } else { /* Try the default method: binary search in the sorted array of messages. */ size_t top, bottom; bottom = 0; top = nstrings; while (bottom < top) { int cmp_val; act = (bottom + top) / 2; cmp_val = strcmp (msgid, (domain->data + W (domain->must_swap, domain->orig_tab[act].offset))); if (cmp_val < 0) top = act; else if (cmp_val > 0) bottom = act + 1; else goto found; } /* No translation was found. */ return NULL; } found: /* The translation was found at index ACT. If we have to convert the string to use a different character set, this is the time. */ if (act < nstrings) { result = (char *) (domain->data + W (domain->must_swap, domain->trans_tab[act].offset)); resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1; } else { result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer; resultlen = domain->trans_sysdep_tab[act - nstrings].length; } #if defined _LIBC || HAVE_ICONV if (domain->codeset_cntr != (domainbinding != NULL ? domainbinding->codeset_cntr : 0)) { /* The domain's codeset has changed through bind_textdomain_codeset() since the message catalog was initialized or last accessed. We have to reinitialize the converter. */ _nl_free_domain_conv (domain); _nl_init_domain_conv (domain_file, domain, domainbinding); } if ( # ifdef _LIBC domain->conv != (__gconv_t) -1 # else # if HAVE_ICONV domain->conv != (iconv_t) -1 # endif # endif ) { /* We are supposed to do a conversion. First allocate an appropriate table with the same structure as the table of translations in the file, where we can put the pointers to the converted strings in. There is a slight complication with plural entries. They are represented by consecutive NUL terminated strings. We handle this case by converting RESULTLEN bytes, including NULs. */ if (domain->conv_tab == NULL && ((domain->conv_tab = (char **) calloc (nstrings + domain->n_sysdep_strings, sizeof (char *))) == NULL)) /* Mark that we didn't succeed allocating a table. */ domain->conv_tab = (char **) -1; if (__builtin_expect (domain->conv_tab == (char **) -1, 0)) /* Nothing we can do, no more memory. */ goto converted; if (domain->conv_tab[act] == NULL) { /* We haven't used this string so far, so it is not translated yet. Do this now. */ /* We use a bit more efficient memory handling. We allocate always larger blocks which get used over time. This is faster than many small allocations. */ __libc_lock_define_initialized (static, lock) # define INITIAL_BLOCK_SIZE 4080 static unsigned char *freemem; static size_t freemem_size; const unsigned char *inbuf; unsigned char *outbuf; int malloc_count; # ifndef _LIBC transmem_block_t *transmem_list = NULL; # endif __libc_lock_lock (lock); inbuf = (const unsigned char *) result; outbuf = freemem + sizeof (size_t); malloc_count = 0; while (1) { transmem_block_t *newmem; # ifdef _LIBC size_t non_reversible; int res; if (freemem_size < sizeof (size_t)) goto resize_freemem; res = __gconv (domain->conv, &inbuf, inbuf + resultlen, &outbuf, outbuf + freemem_size - sizeof (size_t), &non_reversible); if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT) break; if (res != __GCONV_FULL_OUTPUT) { __libc_lock_unlock (lock); goto converted; } inbuf = result; # else # if HAVE_ICONV const char *inptr = (const char *) inbuf; size_t inleft = resultlen; char *outptr = (char *) outbuf; size_t outleft; if (freemem_size < sizeof (size_t)) goto resize_freemem; outleft = freemem_size - sizeof (size_t); if (iconv (domain->conv, (ICONV_CONST char **) &inptr, &inleft, &outptr, &outleft) != (size_t) (-1)) { outbuf = (unsigned char *) outptr; break; } if (errno != E2BIG) { __libc_lock_unlock (lock); goto converted; } # endif # endif resize_freemem: /* We must allocate a new buffer or resize the old one. */ if (malloc_count > 0) { ++malloc_count; freemem_size = malloc_count * INITIAL_BLOCK_SIZE; newmem = (transmem_block_t *) realloc (transmem_list, freemem_size); # ifdef _LIBC if (newmem != NULL) transmem_list = transmem_list->next; else { struct transmem_list *old = transmem_list; transmem_list = transmem_list->next; free (old); } # endif } else { malloc_count = 1; freemem_size = INITIAL_BLOCK_SIZE; newmem = (transmem_block_t *) malloc (freemem_size); } if (__builtin_expect (newmem == NULL, 0)) { freemem = NULL; freemem_size = 0; __libc_lock_unlock (lock); goto converted; } # ifdef _LIBC /* Add the block to the list of blocks we have to free at some point. */ newmem->next = transmem_list; transmem_list = newmem; freemem = newmem->data; freemem_size -= offsetof (struct transmem_list, data); # else transmem_list = newmem; freemem = newmem; # endif outbuf = freemem + sizeof (size_t); } /* We have now in our buffer a converted string. Put this into the table of conversions. */ *(size_t *) freemem = outbuf - freemem - sizeof (size_t); domain->conv_tab[act] = (char *) freemem; /* Shrink freemem, but keep it aligned. */ freemem_size -= outbuf - freemem; freemem = outbuf; freemem += freemem_size & (alignof (size_t) - 1); freemem_size = freemem_size & ~ (alignof (size_t) - 1); __libc_lock_unlock (lock); } /* Now domain->conv_tab[act] contains the translation of all the plural variants. */ result = domain->conv_tab[act] + sizeof (size_t); resultlen = *(size_t *) domain->conv_tab[act]; } converted: /* The result string is converted. */ #endif /* _LIBC || HAVE_ICONV */ *lengthp = resultlen; return result; } /* Look up a plural variant. */ static char * internal_function plural_lookup (domain, n, translation, translation_len) struct loaded_l10nfile *domain; unsigned long int n; const char *translation; size_t translation_len; { struct loaded_domain *domaindata = (struct loaded_domain *) domain->data; unsigned long int index; const char *p; index = plural_eval (domaindata->plural, n); if (index >= domaindata->nplurals) /* This should never happen. It means the plural expression and the given maximum value do not match. */ index = 0; /* Skip INDEX strings at TRANSLATION. */ p = translation; while (index-- > 0) { #ifdef _LIBC p = __rawmemchr (p, '\0'); #else p = strchr (p, '\0'); #endif /* And skip over the NUL byte. */ p++; if (p >= translation + translation_len) /* This should never happen. It means the plural expression evaluated to a value larger than the number of variants available for MSGID1. */ return (char *) translation; } return (char *) p; } /* Return string representation of locale CATEGORY. */ static const char * internal_function category_to_name (category) int category; { const char *retval; switch (category) { #ifdef LC_COLLATE case LC_COLLATE: retval = "LC_COLLATE"; break; #endif #ifdef LC_CTYPE case LC_CTYPE: retval = "LC_CTYPE"; break; #endif #ifdef LC_MONETARY case LC_MONETARY: retval = "LC_MONETARY"; break; #endif #ifdef LC_NUMERIC case LC_NUMERIC: retval = "LC_NUMERIC"; break; #endif #ifdef LC_TIME case LC_TIME: retval = "LC_TIME"; break; #endif #ifdef LC_MESSAGES case LC_MESSAGES: retval = "LC_MESSAGES"; break; #endif #ifdef LC_RESPONSE case LC_RESPONSE: retval = "LC_RESPONSE"; break; #endif #ifdef LC_ALL case LC_ALL: /* This might not make sense but is perhaps better than any other value. */ retval = "LC_ALL"; break; #endif default: /* If you have a better idea for a default value let me know. */ retval = "LC_XXX"; } return retval; } /* Guess value of current locale from value of the environment variables. */ static const char * internal_function guess_category_value (category, categoryname) int category; const char *categoryname; { const char *language; const char *retval; /* The highest priority value is the `LANGUAGE' environment variable. But we don't use the value if the currently selected locale is the C locale. This is a GNU extension. */ language = getenv ("LANGUAGE"); if (language != NULL && language[0] == '\0') language = NULL; /* We have to proceed with the POSIX methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some systems this can be done by the `setlocale' function itself. */ #ifdef _LIBC retval = setlocale (category, NULL); #else retval = _nl_locale_name (category, categoryname); #endif /* Ignore LANGUAGE if the locale is set to "C" because 1. "C" locale usually uses the ASCII encoding, and most international messages use non-ASCII characters. These characters get displayed as question marks (if using glibc's iconv()) or as invalid 8-bit characters (because other iconv()s refuse to convert most non-ASCII characters to ASCII). In any case, the output is ugly. 2. The precise output of some programs in the "C" locale is specified by POSIX and should not depend on environment variables like "LANGUAGE". We allow such programs to use gettext(). */ return language != NULL && strcmp (retval, "C") != 0 ? language : retval; } /* @@ begin of epilog @@ */ /* We don't want libintl.a to depend on any other library. So we avoid the non-standard function stpcpy. In GNU C Library this function is available, though. Also allow the symbol HAVE_STPCPY to be defined. */ #if !_LIBC && !HAVE_STPCPY static char * stpcpy (dest, src) char *dest; const char *src; { while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; return dest - 1; } #endif #if !_LIBC && !HAVE_MEMPCPY static void * mempcpy (dest, src, n) void *dest; const void *src; size_t n; { return (void *) ((char *) memcpy (dest, src, n) + n); } #endif #ifdef _LIBC /* If we want to free all resources we have to do some work at program's end. */ static void __attribute__ ((unused)) free_mem (void) { void *old; while (_nl_domain_bindings != NULL) { struct binding *oldp = _nl_domain_bindings; _nl_domain_bindings = _nl_domain_bindings->next; if (oldp->dirname != _nl_default_dirname) /* Yes, this is a pointer comparison. */ free (oldp->dirname); free (oldp->codeset); free (oldp); } if (_nl_current_default_domain != _nl_default_default_domain) /* Yes, again a pointer comparison. */ free ((char *) _nl_current_default_domain); /* Remove the search tree with the known translations. */ __tdestroy (root, free); root = NULL; while (transmem_list != NULL) { old = transmem_list; transmem_list = transmem_list->next; free (old); } } text_set_element (__libc_subfreeres, free_mem); #endif steghide-0.5.1/intl/ngettext.c0000644000076400001440000000375107735006035011761 /* Implementation of ngettext(3) function. Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #ifdef _LIBC # define __need_NULL # include #else # include /* Just for NULL. */ #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif #include /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define NGETTEXT __ngettext # define DCNGETTEXT INTUSE(__dcngettext) #else # define NGETTEXT libintl_ngettext # define DCNGETTEXT libintl_dcngettext #endif /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ char * NGETTEXT (msgid1, msgid2, n) const char *msgid1; const char *msgid2; unsigned long int n; { return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__ngettext, ngettext); #endif steghide-0.5.1/intl/gettextP.h0000644000076400001440000001676607735006035011742 /* Header describing internals of libintl library. Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc. Written by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETTEXTP_H #define _GETTEXTP_H #include /* Get size_t. */ #ifdef _LIBC # include "../iconv/gconv_int.h" #else # if HAVE_ICONV # include # endif #endif #include "loadinfo.h" #include "gmo.h" /* Get nls_uint32. */ /* @@ end of prolog @@ */ #ifndef PARAMS # if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES # define PARAMS(args) args # else # define PARAMS(args) () # endif #endif #ifndef internal_function # define internal_function #endif #ifndef attribute_hidden # define attribute_hidden #endif /* Tell the compiler when a conditional or integer expression is almost always true or almost always false. */ #ifndef HAVE_BUILTIN_EXPECT # define __builtin_expect(expr, val) (expr) #endif #ifndef W # define W(flag, data) ((flag) ? SWAP (data) : (data)) #endif #ifdef _LIBC # include # define SWAP(i) bswap_32 (i) #else static inline nls_uint32 SWAP (i) nls_uint32 i; { return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); } #endif /* In-memory representation of system dependent string. */ struct sysdep_string_desc { /* Length of addressed string, including the trailing NUL. */ size_t length; /* Pointer to addressed string. */ const char *pointer; }; /* The representation of an opened message catalog. */ struct loaded_domain { /* Pointer to memory containing the .mo file. */ const char *data; /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */ int use_mmap; /* Size of mmap()ed memory. */ size_t mmap_size; /* 1 if the .mo file uses a different endianness than this machine. */ int must_swap; /* Pointer to additional malloc()ed memory. */ void *malloced; /* Number of static strings pairs. */ nls_uint32 nstrings; /* Pointer to descriptors of original strings in the file. */ const struct string_desc *orig_tab; /* Pointer to descriptors of translated strings in the file. */ const struct string_desc *trans_tab; /* Number of system dependent strings pairs. */ nls_uint32 n_sysdep_strings; /* Pointer to descriptors of original sysdep strings. */ const struct sysdep_string_desc *orig_sysdep_tab; /* Pointer to descriptors of translated sysdep strings. */ const struct sysdep_string_desc *trans_sysdep_tab; /* Size of hash table. */ nls_uint32 hash_size; /* Pointer to hash table. */ const nls_uint32 *hash_tab; /* 1 if the hash table uses a different endianness than this machine. */ int must_swap_hash_tab; int codeset_cntr; #ifdef _LIBC __gconv_t conv; #else # if HAVE_ICONV iconv_t conv; # endif #endif char **conv_tab; struct expression *plural; unsigned long int nplurals; }; /* We want to allocate a string at the end of the struct. But ISO C doesn't allow zero sized arrays. */ #ifdef __GNUC__ # define ZERO 0 #else # define ZERO 1 #endif /* A set of settings bound to a message domain. Used to store settings from bindtextdomain() and bind_textdomain_codeset(). */ struct binding { struct binding *next; char *dirname; int codeset_cntr; /* Incremented each time codeset changes. */ char *codeset; char domainname[ZERO]; }; /* A counter which is incremented each time some previous translations become invalid. This variable is part of the external ABI of the GNU libintl. */ extern int _nl_msg_cat_cntr; #ifndef _LIBC const char *_nl_locale_name PARAMS ((int category, const char *categoryname)); #endif struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, char *__locale, const char *__domainname, struct binding *__domainbinding)) internal_function; void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain, struct binding *__domainbinding)) internal_function; void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) internal_function; const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file, struct loaded_domain *__domain, struct binding *__domainbinding)) internal_function; void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain)) internal_function; char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file, struct binding *domainbinding, const char *msgid, size_t *lengthp)) internal_function; #ifdef _LIBC extern char *__gettext PARAMS ((const char *__msgid)); extern char *__dgettext PARAMS ((const char *__domainname, const char *__msgid)); extern char *__dcgettext PARAMS ((const char *__domainname, const char *__msgid, int __category)); extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2, unsigned long int __n)); extern char *__dngettext PARAMS ((const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int n)); extern char *__dcngettext PARAMS ((const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category)); extern char *__dcigettext PARAMS ((const char *__domainname, const char *__msgid1, const char *__msgid2, int __plural, unsigned long int __n, int __category)); extern char *__textdomain PARAMS ((const char *__domainname)); extern char *__bindtextdomain PARAMS ((const char *__domainname, const char *__dirname)); extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname, const char *__codeset)); #else extern char *libintl_gettext PARAMS ((const char *__msgid)); extern char *libintl_dgettext PARAMS ((const char *__domainname, const char *__msgid)); extern char *libintl_dcgettext PARAMS ((const char *__domainname, const char *__msgid, int __category)); extern char *libintl_ngettext PARAMS ((const char *__msgid1, const char *__msgid2, unsigned long int __n)); extern char *libintl_dngettext PARAMS ((const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n)); extern char *libintl_dcngettext PARAMS ((const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category)); extern char *libintl_dcigettext PARAMS ((const char *__domainname, const char *__msgid1, const char *__msgid2, int __plural, unsigned long int __n, int __category)); extern char *libintl_textdomain PARAMS ((const char *__domainname)); extern char *libintl_bindtextdomain PARAMS ((const char *__domainname, const char *__dirname)); extern char *libintl_bind_textdomain_codeset PARAMS ((const char *__domainname, const char *__codeset)); #endif /* @@ begin of epilog @@ */ #endif /* gettextP.h */ steghide-0.5.1/intl/explodename.c0000644000076400001440000001105007735006035012407 /* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "loadinfo.h" /* On some strange systems still no definition of NULL is found. Sigh! */ #ifndef NULL # if defined __STDC__ && __STDC__ # define NULL ((void *) 0) # else # define NULL 0 # endif #endif /* @@ end of prolog @@ */ char * _nl_find_language (name) const char *name; { while (name[0] != '\0' && name[0] != '_' && name[0] != '@' && name[0] != '+' && name[0] != ',') ++name; return (char *) name; } int _nl_explode_name (name, language, modifier, territory, codeset, normalized_codeset, special, sponsor, revision) char *name; const char **language; const char **modifier; const char **territory; const char **codeset; const char **normalized_codeset; const char **special; const char **sponsor; const char **revision; { enum { undecided, xpg, cen } syntax; char *cp; int mask; *modifier = NULL; *territory = NULL; *codeset = NULL; *normalized_codeset = NULL; *special = NULL; *sponsor = NULL; *revision = NULL; /* Now we determine the single parts of the locale name. First look for the language. Termination symbols are `_' and `@' if we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ mask = 0; syntax = undecided; *language = cp = name; cp = _nl_find_language (*language); if (*language == cp) /* This does not make sense: language has to be specified. Use this entry as it is without exploding. Perhaps it is an alias. */ cp = strchr (*language, '\0'); else if (cp[0] == '_') { /* Next is the territory. */ cp[0] = '\0'; *territory = ++cp; while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@' && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') ++cp; mask |= TERRITORY; if (cp[0] == '.') { /* Next is the codeset. */ syntax = xpg; cp[0] = '\0'; *codeset = ++cp; while (cp[0] != '\0' && cp[0] != '@') ++cp; mask |= XPG_CODESET; if (*codeset != cp && (*codeset)[0] != '\0') { *normalized_codeset = _nl_normalize_codeset (*codeset, cp - *codeset); if (strcmp (*codeset, *normalized_codeset) == 0) free ((char *) *normalized_codeset); else mask |= XPG_NORM_CODESET; } } } if (cp[0] == '@' || (syntax != xpg && cp[0] == '+')) { /* Next is the modifier. */ syntax = cp[0] == '@' ? xpg : cen; cp[0] = '\0'; *modifier = ++cp; while (syntax == cen && cp[0] != '\0' && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') ++cp; mask |= XPG_MODIFIER | CEN_AUDIENCE; } if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_')) { syntax = cen; if (cp[0] == '+') { /* Next is special application (CEN syntax). */ cp[0] = '\0'; *special = ++cp; while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_') ++cp; mask |= CEN_SPECIAL; } if (cp[0] == ',') { /* Next is sponsor (CEN syntax). */ cp[0] = '\0'; *sponsor = ++cp; while (cp[0] != '\0' && cp[0] != '_') ++cp; mask |= CEN_SPONSOR; } if (cp[0] == '_') { /* Next is revision (CEN syntax). */ cp[0] = '\0'; *revision = ++cp; mask |= CEN_REVISION; } } /* For CEN syntax values it might be important to have the separator character in the file name, not for XPG syntax. */ if (syntax == xpg) { if (*territory != NULL && (*territory)[0] == '\0') mask &= ~TERRITORY; if (*codeset != NULL && (*codeset)[0] == '\0') mask &= ~XPG_CODESET; if (*modifier != NULL && (*modifier)[0] == '\0') mask &= ~XPG_MODIFIER; } return mask; } steghide-0.5.1/intl/Makefile.in0000644000076400001440000002515407735006035012021 # Makefile for directory with message catalog handling in GNU NLS Utilities. # Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ transform = @program_transform_name@ libdir = @libdir@ includedir = @includedir@ datadir = @datadir@ localedir = $(datadir)/locale gettextsrcdir = $(datadir)/gettext/intl aliaspath = $(localedir) subdir = intl INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` l = @INTL_LIBTOOL_SUFFIX_PREFIX@ AR = ar CC = @CC@ LIBTOOL = @LIBTOOL@ RANLIB = @RANLIB@ YACC = @INTLBISON@ -y -d YFLAGS = --name-prefix=__gettext DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ -DLIBDIR=\"$(libdir)\" -DIN_LIBINTL @DEFS@ CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) HEADERS = $(COMHDRS) libgnuintl.h loadinfo.h COMHDRS = gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h SOURCES = $(COMSRCS) intl-compat.c COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \ plural-exp.c localcharset.c localename.c osdep.c os2compat.c OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \ plural.$lo plural-exp.$lo localcharset.$lo localename.$lo osdep.$lo GETTOBJS = intl-compat.$lo DISTFILES.common = Makefile.in \ config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES) DISTFILES.generated = plural.c DISTFILES.normal = VERSION DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \ COPYING.LIB-2 gettext.h libgettext.h plural-eval.c # Libtool's library version information for libintl. # Before making a gettext release, the gettext maintainer must change this # according to the libtool documentation, section "Library interface versions". # Maintainers of other packages that include the intl directory must *not* # change these values. LTV_CURRENT=4 LTV_REVISION=0 LTV_AGE=2 .SUFFIXES: .SUFFIXES: .c .y .o .lo .sin .sed .c.o: $(COMPILE) $< .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) $< .y.c: $(YACC) $(YFLAGS) --output $@ $< rm -f $*.h .sin.sed: sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@ mv t-$@ $@ INCLUDES = -I.. -I. -I$(top_srcdir)/intl all: all-@USE_INCLUDED_LIBINTL@ all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed all-no: all-no-@BUILD_INCLUDED_LIBINTL@ all-no-yes: libgnuintl.$la all-no-no: libintl.a libgnuintl.a: $(OBJECTS) rm -f $@ $(AR) cru $@ $(OBJECTS) $(RANLIB) $@ libintl.la libgnuintl.la: $(OBJECTS) $(LIBTOOL) --mode=link \ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ $(OBJECTS) @LTLIBICONV@ -lc \ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ -rpath $(libdir) \ -no-undefined libintl.h: libgnuintl.h cp $(srcdir)/libgnuintl.h libintl.h charset.alias: config.charset $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ mv t-$@ $@ check: all # This installation goal is only used in GNU gettext. Packages which # only use the library should use install instead. # We must not install the libintl.h/libintl.a files if we are on a # system which has the GNU gettext() function in its C library or in a # separate library. # If you want to use the one which comes with this version of the # package, you have to use `configure --with-included-gettext'. install: install-exec install-data install-exec: all if test "$(PACKAGE)" = "gettext" \ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \ $(LIBTOOL) --mode=install \ $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \ else \ : ; \ fi if test '@USE_INCLUDED_LIBINTL@' = yes; then \ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ temp=$(DESTDIR)$(libdir)/t-charset.alias; \ dest=$(DESTDIR)$(libdir)/charset.alias; \ if test -f $(DESTDIR)$(libdir)/charset.alias; then \ orig=$(DESTDIR)$(libdir)/charset.alias; \ sed -f ref-add.sed $$orig > $$temp; \ $(INSTALL_DATA) $$temp $$dest; \ rm -f $$temp; \ else \ if test @GLIBC21@ = no; then \ orig=charset.alias; \ sed -f ref-add.sed $$orig > $$temp; \ $(INSTALL_DATA) $$temp $$dest; \ rm -f $$temp; \ fi; \ fi; \ $(mkinstalldirs) $(DESTDIR)$(localedir); \ test -f $(DESTDIR)$(localedir)/locale.alias \ && orig=$(DESTDIR)$(localedir)/locale.alias \ || orig=$(srcdir)/locale.alias; \ temp=$(DESTDIR)$(localedir)/t-locale.alias; \ dest=$(DESTDIR)$(localedir)/locale.alias; \ sed -f ref-add.sed $$orig > $$temp; \ $(INSTALL_DATA) $$temp $$dest; \ rm -f $$temp; \ else \ : ; \ fi install-data: all if test "$(PACKAGE)" = "gettext"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \ $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \ for file in $$dists; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \ dists="$(DISTFILES.generated)"; \ for file in $$dists; do \ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ $(INSTALL_DATA) $$dir/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ dists="$(DISTFILES.obsolete)"; \ for file in $$dists; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-strip: install installdirs: if test "$(PACKAGE)" = "gettext" \ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ else \ : ; \ fi if test '@USE_INCLUDED_LIBINTL@' = yes; then \ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ $(mkinstalldirs) $(DESTDIR)$(localedir); \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: if test "$(PACKAGE)" = "gettext" \ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ rm -f $(DESTDIR)$(includedir)/libintl.h; \ $(LIBTOOL) --mode=uninstall \ rm -f $(DESTDIR)$(libdir)/libintl.$la; \ else \ : ; \ fi if test '@USE_INCLUDED_LIBINTL@' = yes; then \ if test -f $(DESTDIR)$(libdir)/charset.alias; then \ temp=$(DESTDIR)$(libdir)/t-charset.alias; \ dest=$(DESTDIR)$(libdir)/charset.alias; \ sed -f ref-del.sed $$dest > $$temp; \ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ rm -f $$dest; \ else \ $(INSTALL_DATA) $$temp $$dest; \ fi; \ rm -f $$temp; \ fi; \ if test -f $(DESTDIR)$(localedir)/locale.alias; then \ temp=$(DESTDIR)$(localedir)/t-locale.alias; \ dest=$(DESTDIR)$(localedir)/locale.alias; \ sed -f ref-del.sed $$dest > $$temp; \ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ rm -f $$dest; \ else \ $(INSTALL_DATA) $$temp $$dest; \ fi; \ rm -f $$temp; \ fi; \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext"; then \ for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi info dvi: $(OBJECTS): ../config.h libgnuintl.h bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: gettextP.h gmo.h loadinfo.h dcigettext.$lo: hash-string.h explodename.$lo l10nflist.$lo: loadinfo.h dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: plural-exp.h dcigettext.$lo: eval-plural.h tags: TAGS TAGS: $(HEADERS) $(SOURCES) here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) id: ID ID: $(HEADERS) $(SOURCES) here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) mostlyclean: rm -f *.a *.la *.o *.lo core core.* rm -f libintl.h charset.alias ref-add.sed ref-del.sed rm -f -r .libs _libs clean: mostlyclean distclean: clean rm -f Makefile ID TAGS if test "$(PACKAGE)" = gettext; then \ rm -f ChangeLog.inst $(DISTFILES.normal); \ else \ : ; \ fi maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." # GNU gettext needs not contain the file `VERSION' but contains some # other files which should not be distributed in other packages. distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: Makefile if test "$(PACKAGE)" = gettext; then \ additional="$(DISTFILES.gettext)"; \ else \ additional="$(DISTFILES.normal)"; \ fi; \ $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \ for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ cp -p $$dir/$$file $(distdir); \ done Makefile: Makefile.in ../config.status cd .. \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: steghide-0.5.1/intl/l10nflist.c0000644000076400001440000003052007735006035011725 /* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Tell glibc's to provide a prototype for stpcpy(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif #include #if defined _LIBC || defined HAVE_ARGZ_H # include #endif #include #include #include #include "loadinfo.h" /* On some strange systems still no definition of NULL is found. Sigh! */ #ifndef NULL # if defined __STDC__ && __STDC__ # define NULL ((void *) 0) # else # define NULL 0 # endif #endif /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ # ifndef stpcpy # define stpcpy(dest, src) __stpcpy(dest, src) # endif #else # ifndef HAVE_STPCPY static char *stpcpy PARAMS ((char *dest, const char *src)); # endif #endif /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, it may be concatenated to a directory pathname. */ #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) #endif /* Define function which are usually not available. */ #if !defined _LIBC && !defined HAVE___ARGZ_COUNT /* Returns the number of strings in ARGZ. */ static size_t argz_count__ PARAMS ((const char *argz, size_t len)); static size_t argz_count__ (argz, len) const char *argz; size_t len; { size_t count = 0; while (len > 0) { size_t part_len = strlen (argz); argz += part_len + 1; len -= part_len + 1; count++; } return count; } # undef __argz_count # define __argz_count(argz, len) argz_count__ (argz, len) #else # ifdef _LIBC # define __argz_count(argz, len) INTUSE(__argz_count) (argz, len) # endif #endif /* !_LIBC && !HAVE___ARGZ_COUNT */ #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's except the last into the character SEP. */ static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); static void argz_stringify__ (argz, len, sep) char *argz; size_t len; int sep; { while (len > 0) { size_t part_len = strlen (argz); argz += part_len; len -= part_len + 1; if (len > 0) *argz++ = sep; } } # undef __argz_stringify # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) #else # ifdef _LIBC # define __argz_stringify(argz, len, sep) \ INTUSE(__argz_stringify) (argz, len, sep) # endif #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ #if !defined _LIBC && !defined HAVE___ARGZ_NEXT static char *argz_next__ PARAMS ((char *argz, size_t argz_len, const char *entry)); static char * argz_next__ (argz, argz_len, entry) char *argz; size_t argz_len; const char *entry; { if (entry) { if (entry < argz + argz_len) entry = strchr (entry, '\0') + 1; return entry >= argz + argz_len ? NULL : (char *) entry; } else if (argz_len > 0) return argz; else return 0; } # undef __argz_next # define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) #endif /* !_LIBC && !HAVE___ARGZ_NEXT */ /* Return number of bits set in X. */ static int pop PARAMS ((int x)); static inline int pop (x) int x; { /* We assume that no more than 16 bits are used. */ x = ((x & ~0x5555) >> 1) + (x & 0x5555); x = ((x & ~0x3333) >> 2) + (x & 0x3333); x = ((x >> 4) + x) & 0x0f0f; x = ((x >> 8) + x) & 0xff; return x; } struct loaded_l10nfile * _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, territory, codeset, normalized_codeset, modifier, special, sponsor, revision, filename, do_allocate) struct loaded_l10nfile **l10nfile_list; const char *dirlist; size_t dirlist_len; int mask; const char *language; const char *territory; const char *codeset; const char *normalized_codeset; const char *modifier; const char *special; const char *sponsor; const char *revision; const char *filename; int do_allocate; { char *abs_filename; struct loaded_l10nfile **lastp; struct loaded_l10nfile *retval; char *cp; size_t dirlist_count; size_t entries; int cnt; /* If LANGUAGE contains an absolute directory specification, we ignore DIRLIST. */ if (IS_ABSOLUTE_PATH (language)) dirlist_len = 0; /* Allocate room for the full file name. */ abs_filename = (char *) malloc (dirlist_len + strlen (language) + ((mask & TERRITORY) != 0 ? strlen (territory) + 1 : 0) + ((mask & XPG_CODESET) != 0 ? strlen (codeset) + 1 : 0) + ((mask & XPG_NORM_CODESET) != 0 ? strlen (normalized_codeset) + 1 : 0) + (((mask & XPG_MODIFIER) != 0 || (mask & CEN_AUDIENCE) != 0) ? strlen (modifier) + 1 : 0) + ((mask & CEN_SPECIAL) != 0 ? strlen (special) + 1 : 0) + (((mask & CEN_SPONSOR) != 0 || (mask & CEN_REVISION) != 0) ? (1 + ((mask & CEN_SPONSOR) != 0 ? strlen (sponsor) : 0) + ((mask & CEN_REVISION) != 0 ? strlen (revision) + 1 : 0)) : 0) + 1 + strlen (filename) + 1); if (abs_filename == NULL) return NULL; /* Construct file name. */ cp = abs_filename; if (dirlist_len > 0) { memcpy (cp, dirlist, dirlist_len); __argz_stringify (cp, dirlist_len, PATH_SEPARATOR); cp += dirlist_len; cp[-1] = '/'; } cp = stpcpy (cp, language); if ((mask & TERRITORY) != 0) { *cp++ = '_'; cp = stpcpy (cp, territory); } if ((mask & XPG_CODESET) != 0) { *cp++ = '.'; cp = stpcpy (cp, codeset); } if ((mask & XPG_NORM_CODESET) != 0) { *cp++ = '.'; cp = stpcpy (cp, normalized_codeset); } if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0) { /* This component can be part of both syntaces but has different leading characters. For CEN we use `+', else `@'. */ *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@'; cp = stpcpy (cp, modifier); } if ((mask & CEN_SPECIAL) != 0) { *cp++ = '+'; cp = stpcpy (cp, special); } if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0) { *cp++ = ','; if ((mask & CEN_SPONSOR) != 0) cp = stpcpy (cp, sponsor); if ((mask & CEN_REVISION) != 0) { *cp++ = '_'; cp = stpcpy (cp, revision); } } *cp++ = '/'; stpcpy (cp, filename); /* Look in list of already loaded domains whether it is already available. */ lastp = l10nfile_list; for (retval = *l10nfile_list; retval != NULL; retval = retval->next) if (retval->filename != NULL) { int compare = strcmp (retval->filename, abs_filename); if (compare == 0) /* We found it! */ break; if (compare < 0) { /* It's not in the list. */ retval = NULL; break; } lastp = &retval->next; } if (retval != NULL || do_allocate == 0) { free (abs_filename); return retval; } dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1); /* Allocate a new loaded_l10nfile. */ retval = (struct loaded_l10nfile *) malloc (sizeof (*retval) + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0)) * sizeof (struct loaded_l10nfile *))); if (retval == NULL) return NULL; retval->filename = abs_filename; /* We set retval->data to NULL here; it is filled in later. Setting retval->decided to 1 here means that retval does not correspond to a real file (dirlist_count > 1) or is not worth looking up (if an unnormalized codeset was specified). */ retval->decided = (dirlist_count > 1 || ((mask & XPG_CODESET) != 0 && (mask & XPG_NORM_CODESET) != 0)); retval->data = NULL; retval->next = *lastp; *lastp = retval; entries = 0; /* Recurse to fill the inheritance list of RETVAL. If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL entry does not correspond to a real file; retval->filename contains colons. In this case we loop across all elements of DIRLIST and across all bit patterns dominated by MASK. If the DIRLIST is a single directory or entirely redundant (i.e. DIRLIST_COUNT == 1), we loop across all bit patterns dominated by MASK, excluding MASK itself. In either case, we loop down from MASK to 0. This has the effect that the extra bits in the locale name are dropped in this order: first the modifier, then the territory, then the codeset, then the normalized_codeset. */ for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt) if ((cnt & ~mask) == 0 && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) { if (dirlist_count > 1) { /* Iterate over all elements of the DIRLIST. */ char *dir = NULL; while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) != NULL) retval->successor[entries++] = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, language, territory, codeset, normalized_codeset, modifier, special, sponsor, revision, filename, 1); } else retval->successor[entries++] = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, cnt, language, territory, codeset, normalized_codeset, modifier, special, sponsor, revision, filename, 1); } retval->successor[entries] = NULL; return retval; } /* Normalize codeset name. There is no standard for the codeset names. Normalization allows the user to use any of the common names. The return value is dynamically allocated and has to be freed by the caller. */ const char * _nl_normalize_codeset (codeset, name_len) const char *codeset; size_t name_len; { int len = 0; int only_digit = 1; char *retval; char *wp; size_t cnt; for (cnt = 0; cnt < name_len; ++cnt) if (isalnum ((unsigned char) codeset[cnt])) { ++len; if (isalpha ((unsigned char) codeset[cnt])) only_digit = 0; } retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); if (retval != NULL) { if (only_digit) wp = stpcpy (retval, "iso"); else wp = retval; for (cnt = 0; cnt < name_len; ++cnt) if (isalpha ((unsigned char) codeset[cnt])) *wp++ = tolower ((unsigned char) codeset[cnt]); else if (isdigit ((unsigned char) codeset[cnt])) *wp++ = codeset[cnt]; *wp = '\0'; } return (const char *) retval; } /* @@ begin of epilog @@ */ /* We don't want libintl.a to depend on any other library. So we avoid the non-standard function stpcpy. In GNU C Library this function is available, though. Also allow the symbol HAVE_STPCPY to be defined. */ #if !_LIBC && !HAVE_STPCPY static char * stpcpy (dest, src) char *dest; const char *src; { while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; return dest - 1; } #endif steghide-0.5.1/intl/VERSION0000644000076400001440000000005007735006035011010 GNU gettext library from gettext-0.11.5 steghide-0.5.1/intl/gettext.c0000644000076400001440000000357307735006035011605 /* Implementation of gettext(3) function. Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #ifdef _LIBC # define __need_NULL # include #else # include /* Just for NULL. */ #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define GETTEXT __gettext # define DCGETTEXT INTUSE(__dcgettext) #else # define GETTEXT libintl_gettext # define DCGETTEXT libintl_dcgettext #endif /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ char * GETTEXT (msgid) const char *msgid; { return DCGETTEXT (NULL, msgid, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__gettext, gettext); #endif steghide-0.5.1/intl/dcgettext.c0000644000076400001440000000350007735006035012102 /* Implementation of the dcgettext(3) function. Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DCGETTEXT __dcgettext # define DCIGETTEXT __dcigettext #else # define DCGETTEXT libintl_dcgettext # define DCIGETTEXT libintl_dcigettext #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ char * DCGETTEXT (domainname, msgid, category) const char *domainname; const char *msgid; int category; { return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ INTDEF(__dcgettext) weak_alias (__dcgettext, dcgettext); #endif steghide-0.5.1/intl/loadinfo.h0000644000076400001440000001373707735006035011724 /* Copyright (C) 1996-1999, 2000-2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _LOADINFO_H #define _LOADINFO_H 1 /* Declarations of locale dependent catalog lookup functions. Implemented in localealias.c Possibly replace a locale name by another. explodename.c Split a locale name into its various fields. l10nflist.c Generate a list of filenames of possible message catalogs. finddomain.c Find and open the relevant message catalogs. The main function _nl_find_domain() in finddomain.c is declared in gettextP.h. */ #ifndef PARAMS # if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES # define PARAMS(args) args # else # define PARAMS(args) () # endif #endif #ifndef internal_function # define internal_function #endif /* Tell the compiler when a conditional or integer expression is almost always true or almost always false. */ #ifndef HAVE_BUILTIN_EXPECT # define __builtin_expect(expr, val) (expr) #endif /* Separator in PATH like lists of pathnames. */ #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define PATH_SEPARATOR ';' #else /* Unix */ # define PATH_SEPARATOR ':' #endif /* Encoding of locale name parts. */ #define CEN_REVISION 1 #define CEN_SPONSOR 2 #define CEN_SPECIAL 4 #define XPG_NORM_CODESET 8 #define XPG_CODESET 16 #define TERRITORY 32 #define CEN_AUDIENCE 64 #define XPG_MODIFIER 128 #define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE) #define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER) struct loaded_l10nfile { const char *filename; int decided; const void *data; struct loaded_l10nfile *next; struct loaded_l10nfile *successor[1]; }; /* Normalize codeset name. There is no standard for the codeset names. Normalization allows the user to use any of the common names. The return value is dynamically allocated and has to be freed by the caller. */ extern const char *_nl_normalize_codeset PARAMS ((const char *codeset, size_t name_len)); /* Lookup a locale dependent file. *L10NFILE_LIST denotes a pool of lookup results of locale dependent files of the same kind, sorted in decreasing order of ->filename. DIRLIST and DIRLIST_LEN are an argz list of directories in which to look, containing at least one directory (i.e. DIRLIST_LEN > 0). MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER, SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as produced by _nl_explode_name(). FILENAME is the filename suffix. The return value is the lookup result, either found in *L10NFILE_LIST, or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL. If the return value is non-NULL, it is added to *L10NFILE_LIST, and its ->next field denotes the chaining inside *L10NFILE_LIST, and furthermore its ->successor[] field contains a list of other lookup results from which this lookup result inherits. */ extern struct loaded_l10nfile * _nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, const char *dirlist, size_t dirlist_len, int mask, const char *language, const char *territory, const char *codeset, const char *normalized_codeset, const char *modifier, const char *special, const char *sponsor, const char *revision, const char *filename, int do_allocate)); /* Lookup the real locale name for a locale alias NAME, or NULL if NAME is not a locale alias (but possibly a real locale name). The return value is statically allocated and must not be freed. */ extern const char *_nl_expand_alias PARAMS ((const char *name)); /* Split a locale name NAME into its pieces: language, modifier, territory, codeset, special, sponsor, revision. NAME gets destructively modified: NUL bytes are inserted here and there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY, *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a pointer into the old NAME string, or NULL. *NORMALIZED_CODESET gets assigned the expanded *CODESET, if it is different from *CODESET; this one is dynamically allocated and has to be freed by the caller. The return value is a bitmask, where each bit corresponds to one filled-in value: XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER, TERRITORY for *TERRITORY, XPG_CODESET for *CODESET, XPG_NORM_CODESET for *NORMALIZED_CODESET, CEN_SPECIAL for *SPECIAL, CEN_SPONSOR for *SPONSOR, CEN_REVISION for *REVISION. */ extern int _nl_explode_name PARAMS ((char *name, const char **language, const char **modifier, const char **territory, const char **codeset, const char **normalized_codeset, const char **special, const char **sponsor, const char **revision)); /* Split a locale name NAME into a leading language part and all the rest. Return a pointer to the first character after the language, i.e. to the first byte of the rest. */ extern char *_nl_find_language PARAMS ((const char *name)); #endif /* loadinfo.h */ steghide-0.5.1/intl/dcngettext.c0000644000076400001440000000361407735006035012266 /* Implementation of the dcngettext(3) function. Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DCNGETTEXT __dcngettext # define DCIGETTEXT __dcigettext #else # define DCNGETTEXT libintl_dcngettext # define DCIGETTEXT libintl_dcigettext #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ char * DCNGETTEXT (domainname, msgid1, msgid2, n, category) const char *domainname; const char *msgid1; const char *msgid2; unsigned long int n; int category; { return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ INTDEF(__dcngettext) weak_alias (__dcngettext, dcngettext); #endif steghide-0.5.1/intl/bindtextdom.c0000644000076400001440000002324007735006035012433 /* Implementation of the bindtextdomain(3) function Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #ifdef _LIBC # include #else # include "libgnuintl.h" #endif #include "gettextP.h" #ifdef _LIBC /* We have to handle multi-threaded applications. */ # include #else /* Provide dummy implementation if this is outside glibc. */ # define __libc_rwlock_define(CLASS, NAME) # define __libc_rwlock_wrlock(NAME) # define __libc_rwlock_unlock(NAME) #endif /* The internal variables in the standalone libintl.a must have different names than the internal variables in GNU libc, otherwise programs using libintl.a cannot be linked statically. */ #if !defined _LIBC # define _nl_default_dirname libintl_nl_default_dirname # define _nl_domain_bindings libintl_nl_domain_bindings #endif /* Some compilers, like SunOS4 cc, don't have offsetof in . */ #ifndef offsetof # define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) #endif /* @@ end of prolog @@ */ /* Contains the default location of the message catalogs. */ extern const char _nl_default_dirname[]; /* List with bindings of specific domains. */ extern struct binding *_nl_domain_bindings; /* Lock variable to protect the global data in the gettext implementation. */ __libc_rwlock_define (extern, _nl_state_lock attribute_hidden) /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define BINDTEXTDOMAIN __bindtextdomain # define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset # ifndef strdup # define strdup(str) __strdup (str) # endif #else # define BINDTEXTDOMAIN libintl_bindtextdomain # define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset #endif /* Prototypes for local functions. */ static void set_binding_values PARAMS ((const char *domainname, const char **dirnamep, const char **codesetp)); /* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP to be used for the DOMAINNAME message catalog. If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not modified, only the current value is returned. If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither modified nor returned. */ static void set_binding_values (domainname, dirnamep, codesetp) const char *domainname; const char **dirnamep; const char **codesetp; { struct binding *binding; int modified; /* Some sanity checks. */ if (domainname == NULL || domainname[0] == '\0') { if (dirnamep) *dirnamep = NULL; if (codesetp) *codesetp = NULL; return; } __libc_rwlock_wrlock (_nl_state_lock); modified = 0; for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) { int compare = strcmp (domainname, binding->domainname); if (compare == 0) /* We found it! */ break; if (compare < 0) { /* It is not in the list. */ binding = NULL; break; } } if (binding != NULL) { if (dirnamep) { const char *dirname = *dirnamep; if (dirname == NULL) /* The current binding has be to returned. */ *dirnamep = binding->dirname; else { /* The domain is already bound. If the new value and the old one are equal we simply do nothing. Otherwise replace the old binding. */ char *result = binding->dirname; if (strcmp (dirname, result) != 0) { if (strcmp (dirname, _nl_default_dirname) == 0) result = (char *) _nl_default_dirname; else { #if defined _LIBC || defined HAVE_STRDUP result = strdup (dirname); #else size_t len = strlen (dirname) + 1; result = (char *) malloc (len); if (__builtin_expect (result != NULL, 1)) memcpy (result, dirname, len); #endif } if (__builtin_expect (result != NULL, 1)) { if (binding->dirname != _nl_default_dirname) free (binding->dirname); binding->dirname = result; modified = 1; } } *dirnamep = result; } } if (codesetp) { const char *codeset = *codesetp; if (codeset == NULL) /* The current binding has be to returned. */ *codesetp = binding->codeset; else { /* The domain is already bound. If the new value and the old one are equal we simply do nothing. Otherwise replace the old binding. */ char *result = binding->codeset; if (result == NULL || strcmp (codeset, result) != 0) { #if defined _LIBC || defined HAVE_STRDUP result = strdup (codeset); #else size_t len = strlen (codeset) + 1; result = (char *) malloc (len); if (__builtin_expect (result != NULL, 1)) memcpy (result, codeset, len); #endif if (__builtin_expect (result != NULL, 1)) { if (binding->codeset != NULL) free (binding->codeset); binding->codeset = result; binding->codeset_cntr++; modified = 1; } } *codesetp = result; } } } else if ((dirnamep == NULL || *dirnamep == NULL) && (codesetp == NULL || *codesetp == NULL)) { /* Simply return the default values. */ if (dirnamep) *dirnamep = _nl_default_dirname; if (codesetp) *codesetp = NULL; } else { /* We have to create a new binding. */ size_t len = strlen (domainname) + 1; struct binding *new_binding = (struct binding *) malloc (offsetof (struct binding, domainname) + len); if (__builtin_expect (new_binding == NULL, 0)) goto failed; memcpy (new_binding->domainname, domainname, len); if (dirnamep) { const char *dirname = *dirnamep; if (dirname == NULL) /* The default value. */ dirname = _nl_default_dirname; else { if (strcmp (dirname, _nl_default_dirname) == 0) dirname = _nl_default_dirname; else { char *result; #if defined _LIBC || defined HAVE_STRDUP result = strdup (dirname); if (__builtin_expect (result == NULL, 0)) goto failed_dirname; #else size_t len = strlen (dirname) + 1; result = (char *) malloc (len); if (__builtin_expect (result == NULL, 0)) goto failed_dirname; memcpy (result, dirname, len); #endif dirname = result; } } *dirnamep = dirname; new_binding->dirname = (char *) dirname; } else /* The default value. */ new_binding->dirname = (char *) _nl_default_dirname; new_binding->codeset_cntr = 0; if (codesetp) { const char *codeset = *codesetp; if (codeset != NULL) { char *result; #if defined _LIBC || defined HAVE_STRDUP result = strdup (codeset); if (__builtin_expect (result == NULL, 0)) goto failed_codeset; #else size_t len = strlen (codeset) + 1; result = (char *) malloc (len); if (__builtin_expect (result == NULL, 0)) goto failed_codeset; memcpy (result, codeset, len); #endif codeset = result; new_binding->codeset_cntr++; } *codesetp = codeset; new_binding->codeset = (char *) codeset; } else new_binding->codeset = NULL; /* Now enqueue it. */ if (_nl_domain_bindings == NULL || strcmp (domainname, _nl_domain_bindings->domainname) < 0) { new_binding->next = _nl_domain_bindings; _nl_domain_bindings = new_binding; } else { binding = _nl_domain_bindings; while (binding->next != NULL && strcmp (domainname, binding->next->domainname) > 0) binding = binding->next; new_binding->next = binding->next; binding->next = new_binding; } modified = 1; /* Here we deal with memory allocation failures. */ if (0) { failed_codeset: if (new_binding->dirname != _nl_default_dirname) free (new_binding->dirname); failed_dirname: free (new_binding); failed: if (dirnamep) *dirnamep = NULL; if (codesetp) *codesetp = NULL; } } /* If we modified any binding, we flush the caches. */ if (modified) ++_nl_msg_cat_cntr; __libc_rwlock_unlock (_nl_state_lock); } /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ char * BINDTEXTDOMAIN (domainname, dirname) const char *domainname; const char *dirname; { set_binding_values (domainname, &dirname, NULL); return (char *) dirname; } /* Specify the character encoding in which the messages from the DOMAINNAME message catalog will be returned. */ char * BIND_TEXTDOMAIN_CODESET (domainname, codeset) const char *domainname; const char *codeset; { set_binding_values (domainname, NULL, &codeset); return (char *) codeset; } #ifdef _LIBC /* Aliases for function names in GNU C Library. */ weak_alias (__bindtextdomain, bindtextdomain); weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset); #endif steghide-0.5.1/intl/plural-exp.c0000644000076400001440000000771407735006035012213 /* Expression parsing for plural form selection. Copyright (C) 2000, 2001 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "plural-exp.h" #if (defined __GNUC__ && !defined __APPLE_CC__) \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) /* These structs are the constant expression for the germanic plural form determination. It represents the expression "n != 1". */ static const struct expression plvar = { .nargs = 0, .operation = var, }; static const struct expression plone = { .nargs = 0, .operation = num, .val = { .num = 1 } }; struct expression GERMANIC_PLURAL = { .nargs = 2, .operation = not_equal, .val = { .args = { [0] = (struct expression *) &plvar, [1] = (struct expression *) &plone } } }; # define INIT_GERMANIC_PLURAL() #else /* For compilers without support for ISO C 99 struct/union initializers: Initialization at run-time. */ static struct expression plvar; static struct expression plone; struct expression GERMANIC_PLURAL; static void init_germanic_plural () { if (plone.val.num == 0) { plvar.nargs = 0; plvar.operation = var; plone.nargs = 0; plone.operation = num; plone.val.num = 1; GERMANIC_PLURAL.nargs = 2; GERMANIC_PLURAL.operation = not_equal; GERMANIC_PLURAL.val.args[0] = &plvar; GERMANIC_PLURAL.val.args[1] = &plone; } } # define INIT_GERMANIC_PLURAL() init_germanic_plural () #endif void internal_function EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp) const char *nullentry; struct expression **pluralp; unsigned long int *npluralsp; { if (nullentry != NULL) { const char *plural; const char *nplurals; plural = strstr (nullentry, "plural="); nplurals = strstr (nullentry, "nplurals="); if (plural == NULL || nplurals == NULL) goto no_plural; else { char *endp; unsigned long int n; struct parse_args args; /* First get the number. */ nplurals += 9; while (*nplurals != '\0' && isspace ((unsigned char) *nplurals)) ++nplurals; if (!(*nplurals >= '0' && *nplurals <= '9')) goto no_plural; #if defined HAVE_STRTOUL || defined _LIBC n = strtoul (nplurals, &endp, 10); #else for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++) n = n * 10 + (*endp - '0'); #endif if (nplurals == endp) goto no_plural; *npluralsp = n; /* Due to the restrictions bison imposes onto the interface of the scanner function we have to put the input string and the result passed up from the parser into the same structure which address is passed down to the parser. */ plural += 7; args.cp = plural; if (PLURAL_PARSE (&args) != 0) goto no_plural; *pluralp = args.res; } } else { /* By default we are using the Germanic form: singular form only for `one', the plural form otherwise. Yes, this is also what English is using since English is a Germanic language. */ no_plural: INIT_GERMANIC_PLURAL (); *pluralp = &GERMANIC_PLURAL; *npluralsp = 2; } } steghide-0.5.1/intl/plural-exp.h0000644000076400001440000001030407735006035012205 /* Expression parsing and evaluation for plural form selection. Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _PLURAL_EXP_H #define _PLURAL_EXP_H #ifndef PARAMS # if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES # define PARAMS(args) args # else # define PARAMS(args) () # endif #endif #ifndef internal_function # define internal_function #endif #ifndef attribute_hidden # define attribute_hidden #endif /* This is the representation of the expressions to determine the plural form. */ struct expression { int nargs; /* Number of arguments. */ enum operator { /* Without arguments: */ var, /* The variable "n". */ num, /* Decimal number. */ /* Unary operators: */ lnot, /* Logical NOT. */ /* Binary operators: */ mult, /* Multiplication. */ divide, /* Division. */ module, /* Modulo operation. */ plus, /* Addition. */ minus, /* Subtraction. */ less_than, /* Comparison. */ greater_than, /* Comparison. */ less_or_equal, /* Comparison. */ greater_or_equal, /* Comparison. */ equal, /* Comparison for equality. */ not_equal, /* Comparison for inequality. */ land, /* Logical AND. */ lor, /* Logical OR. */ /* Ternary operators: */ qmop /* Question mark operator. */ } operation; union { unsigned long int num; /* Number value for `num'. */ struct expression *args[3]; /* Up to three arguments. */ } val; }; /* This is the data structure to pass information to the parser and get the result in a thread-safe way. */ struct parse_args { const char *cp; struct expression *res; }; /* Names for the libintl functions are a problem. This source code is used 1. in the GNU C Library library, 2. in the GNU libintl library, 3. in the GNU gettext tools. The function names in each situation must be different, to allow for binary incompatible changes in 'struct expression'. Furthermore, 1. in the GNU C Library library, the names have a __ prefix, 2.+3. in the GNU libintl library and in the GNU gettext tools, the names must follow ANSI C and not start with __. So we have to distinguish the three cases. */ #ifdef _LIBC # define FREE_EXPRESSION __gettext_free_exp # define PLURAL_PARSE __gettextparse # define GERMANIC_PLURAL __gettext_germanic_plural # define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural #elif defined (IN_LIBINTL) # define FREE_EXPRESSION libintl_gettext_free_exp # define PLURAL_PARSE libintl_gettextparse # define GERMANIC_PLURAL libintl_gettext_germanic_plural # define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural #else # define FREE_EXPRESSION free_plural_expression # define PLURAL_PARSE parse_plural_expression # define GERMANIC_PLURAL germanic_plural # define EXTRACT_PLURAL_EXPRESSION extract_plural_expression #endif extern void FREE_EXPRESSION PARAMS ((struct expression *exp)) internal_function; extern int PLURAL_PARSE PARAMS ((void *arg)); extern struct expression GERMANIC_PLURAL attribute_hidden; extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry, struct expression **pluralp, unsigned long int *npluralsp)) internal_function; #if !defined (_LIBC) && !defined (IN_LIBINTL) extern unsigned long int plural_eval PARAMS ((struct expression *pexp, unsigned long int n)); #endif #endif /* _PLURAL_EXP_H */ steghide-0.5.1/intl/hash-string.h0000644000076400001440000000357407735006035012356 /* Description of GNU message catalog format: string hashing function. Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* @@ end of prolog @@ */ #ifndef PARAMS # if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES # define PARAMS(Args) Args # else # define PARAMS(Args) () # endif #endif /* We assume to have `unsigned long int' value with at least 32 bits. */ #define HASHWORDBITS 32 /* Defines the so called `hashpjw' function by P.J. Weinberger [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, 1986, 1987 Bell Telephone Laboratories, Inc.] */ static unsigned long int hash_string PARAMS ((const char *__str_param)); static inline unsigned long int hash_string (str_param) const char *str_param; { unsigned long int hval, g; const char *str = str_param; /* Compute the hash value for the given string. */ hval = 0; while (*str != '\0') { hval <<= 4; hval += (unsigned long int) *str++; g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); if (g != 0) { hval ^= g >> (HASHWORDBITS - 8); hval ^= g; } } return hval; } steghide-0.5.1/intl/intl-compat.c0000644000076400001440000000576707735006035012357 /* intl-compat.c - Stub functions to call gettext functions from GNU gettext Library. Copyright (C) 1995, 2000-2002 Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #define _INTL_REDIRECT_MACROS #include "libgnuintl.h" #include "gettextP.h" /* @@ end of prolog @@ */ /* This file redirects the gettext functions (without prefix) to those defined in the included GNU libintl library (with "libintl_" prefix). It is compiled into libintl in order to make the AM_GNU_GETTEXT test of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which has the redirections primarily in the include file. */ #undef gettext #undef dgettext #undef dcgettext #undef ngettext #undef dngettext #undef dcngettext #undef textdomain #undef bindtextdomain #undef bind_textdomain_codeset char * gettext (msgid) const char *msgid; { return libintl_gettext (msgid); } char * dgettext (domainname, msgid) const char *domainname; const char *msgid; { return libintl_dgettext (domainname, msgid); } char * dcgettext (domainname, msgid, category) const char *domainname; const char *msgid; int category; { return libintl_dcgettext (domainname, msgid, category); } char * ngettext (msgid1, msgid2, n) const char *msgid1; const char *msgid2; unsigned long int n; { return libintl_ngettext (msgid1, msgid2, n); } char * dngettext (domainname, msgid1, msgid2, n) const char *domainname; const char *msgid1; const char *msgid2; unsigned long int n; { return libintl_dngettext (domainname, msgid1, msgid2, n); } char * dcngettext (domainname, msgid1, msgid2, n, category) const char *domainname; const char *msgid1; const char *msgid2; unsigned long int n; int category; { return libintl_dcngettext (domainname, msgid1, msgid2, n, category); } char * textdomain (domainname) const char *domainname; { return libintl_textdomain (domainname); } char * bindtextdomain (domainname, dirname) const char *domainname; const char *dirname; { return libintl_bindtextdomain (domainname, dirname); } char * bind_textdomain_codeset (domainname, codeset) const char *domainname; const char *codeset; { return libintl_bind_textdomain_codeset (domainname, codeset); } steghide-0.5.1/intl/osdep.c0000644000076400001440000000164307735006035011227 /* OS dependent parts of libintl. Copyright (C) 2001-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #if defined __EMX__ # include "os2compat.c" #else /* Avoid AIX compiler warning. */ typedef int dummy; #endif steghide-0.5.1/intl/eval-plural.h0000644000076400001440000000544207735006035012347 /* Plural expression evaluation. Copyright (C) 2000-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef STATIC #define STATIC static #endif /* Evaluate the plural expression and return an index value. */ STATIC unsigned long int plural_eval PARAMS ((struct expression *pexp, unsigned long int n)) internal_function; STATIC unsigned long int internal_function plural_eval (pexp, n) struct expression *pexp; unsigned long int n; { switch (pexp->nargs) { case 0: switch (pexp->operation) { case var: return n; case num: return pexp->val.num; default: break; } /* NOTREACHED */ break; case 1: { /* pexp->operation must be lnot. */ unsigned long int arg = plural_eval (pexp->val.args[0], n); return ! arg; } case 2: { unsigned long int leftarg = plural_eval (pexp->val.args[0], n); if (pexp->operation == lor) return leftarg || plural_eval (pexp->val.args[1], n); else if (pexp->operation == land) return leftarg && plural_eval (pexp->val.args[1], n); else { unsigned long int rightarg = plural_eval (pexp->val.args[1], n); switch (pexp->operation) { case mult: return leftarg * rightarg; case divide: if (rightarg == 0) raise (SIGFPE); return leftarg / rightarg; case module: if (rightarg == 0) raise (SIGFPE); return leftarg % rightarg; case plus: return leftarg + rightarg; case minus: return leftarg - rightarg; case less_than: return leftarg < rightarg; case greater_than: return leftarg > rightarg; case less_or_equal: return leftarg <= rightarg; case greater_or_equal: return leftarg >= rightarg; case equal: return leftarg == rightarg; case not_equal: return leftarg != rightarg; default: break; } } /* NOTREACHED */ break; } case 3: { /* pexp->operation must be qmop. */ unsigned long int boolarg = plural_eval (pexp->val.args[0], n); return plural_eval (pexp->val.args[boolarg ? 1 : 2], n); } } /* NOTREACHED */ return 0; } steghide-0.5.1/intl/localealias.c0000644000076400001440000002330307735006035012363 /* Handle aliases for locale names. Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Tell glibc's to provide a prototype for mempcpy(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif #include #include #if defined _LIBC || defined HAVE___FSETLOCKING # include #endif #include #ifdef __GNUC__ # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif #endif #include #include #include "gettextP.h" /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ # define strcasecmp __strcasecmp # ifndef mempcpy # define mempcpy __mempcpy # endif # define HAVE_MEMPCPY 1 # define HAVE___FSETLOCKING 1 /* We need locking here since we can be called from different places. */ # include __libc_lock_define_initialized (static, lock); #endif #ifndef internal_function # define internal_function #endif /* Some optimizations for glibc. */ #ifdef _LIBC # define FEOF(fp) feof_unlocked (fp) # define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp) #else # define FEOF(fp) feof (fp) # define FGETS(buf, n, fp) fgets (buf, n, fp) #endif /* For those losing systems which don't have `alloca' we have to add some additional code emulating it. */ #ifdef HAVE_ALLOCA # define freea(p) /* nothing */ #else # define alloca(n) malloc (n) # define freea(p) free (p) #endif #if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED # undef fgets # define fgets(buf, len, s) fgets_unlocked (buf, len, s) #endif #if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED # undef feof # define feof(s) feof_unlocked (s) #endif struct alias_map { const char *alias; const char *value; }; static char *string_space; static size_t string_space_act; static size_t string_space_max; static struct alias_map *map; static size_t nmap; static size_t maxmap; /* Prototypes for local functions. */ static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) internal_function; static int extend_alias_table PARAMS ((void)); static int alias_compare PARAMS ((const struct alias_map *map1, const struct alias_map *map2)); const char * _nl_expand_alias (name) const char *name; { static const char *locale_alias_path; struct alias_map *retval; const char *result = NULL; size_t added; #ifdef _LIBC __libc_lock_lock (lock); #endif if (locale_alias_path == NULL) locale_alias_path = LOCALE_ALIAS_PATH; do { struct alias_map item; item.alias = name; if (nmap > 0) retval = (struct alias_map *) bsearch (&item, map, nmap, sizeof (struct alias_map), (int (*) PARAMS ((const void *, const void *)) ) alias_compare); else retval = NULL; /* We really found an alias. Return the value. */ if (retval != NULL) { result = retval->value; break; } /* Perhaps we can find another alias file. */ added = 0; while (added == 0 && locale_alias_path[0] != '\0') { const char *start; while (locale_alias_path[0] == PATH_SEPARATOR) ++locale_alias_path; start = locale_alias_path; while (locale_alias_path[0] != '\0' && locale_alias_path[0] != PATH_SEPARATOR) ++locale_alias_path; if (start < locale_alias_path) added = read_alias_file (start, locale_alias_path - start); } } while (added != 0); #ifdef _LIBC __libc_lock_unlock (lock); #endif return result; } static size_t internal_function read_alias_file (fname, fname_len) const char *fname; int fname_len; { FILE *fp; char *full_fname; size_t added; static const char aliasfile[] = "/locale.alias"; full_fname = (char *) alloca (fname_len + sizeof aliasfile); #ifdef HAVE_MEMPCPY mempcpy (mempcpy (full_fname, fname, fname_len), aliasfile, sizeof aliasfile); #else memcpy (full_fname, fname, fname_len); memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); #endif fp = fopen (full_fname, "r"); freea (full_fname); if (fp == NULL) return 0; #ifdef HAVE___FSETLOCKING /* No threads present. */ __fsetlocking (fp, FSETLOCKING_BYCALLER); #endif added = 0; while (!FEOF (fp)) { /* It is a reasonable approach to use a fix buffer here because a) we are only interested in the first two fields b) these fields must be usable as file names and so must not be that long */ char buf[BUFSIZ]; char *alias; char *value; char *cp; if (FGETS (buf, sizeof buf, fp) == NULL) /* EOF reached. */ break; /* Possibly not the whole line fits into the buffer. Ignore the rest of the line. */ if (strchr (buf, '\n') == NULL) { char altbuf[BUFSIZ]; do if (FGETS (altbuf, sizeof altbuf, fp) == NULL) /* Make sure the inner loop will be left. The outer loop will exit at the `feof' test. */ break; while (strchr (altbuf, '\n') == NULL); } cp = buf; /* Ignore leading white space. */ while (isspace ((unsigned char) cp[0])) ++cp; /* A leading '#' signals a comment line. */ if (cp[0] != '\0' && cp[0] != '#') { alias = cp++; while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) ++cp; /* Terminate alias name. */ if (cp[0] != '\0') *cp++ = '\0'; /* Now look for the beginning of the value. */ while (isspace ((unsigned char) cp[0])) ++cp; if (cp[0] != '\0') { size_t alias_len; size_t value_len; value = cp++; while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) ++cp; /* Terminate value. */ if (cp[0] == '\n') { /* This has to be done to make the following test for the end of line possible. We are looking for the terminating '\n' which do not overwrite here. */ *cp++ = '\0'; *cp = '\n'; } else if (cp[0] != '\0') *cp++ = '\0'; if (nmap >= maxmap) if (__builtin_expect (extend_alias_table (), 0)) return added; alias_len = strlen (alias) + 1; value_len = strlen (value) + 1; if (string_space_act + alias_len + value_len > string_space_max) { /* Increase size of memory pool. */ size_t new_size = (string_space_max + (alias_len + value_len > 1024 ? alias_len + value_len : 1024)); char *new_pool = (char *) realloc (string_space, new_size); if (new_pool == NULL) return added; if (__builtin_expect (string_space != new_pool, 0)) { size_t i; for (i = 0; i < nmap; i++) { map[i].alias += new_pool - string_space; map[i].value += new_pool - string_space; } } string_space = new_pool; string_space_max = new_size; } map[nmap].alias = memcpy (&string_space[string_space_act], alias, alias_len); string_space_act += alias_len; map[nmap].value = memcpy (&string_space[string_space_act], value, value_len); string_space_act += value_len; ++nmap; ++added; } } } /* Should we test for ferror()? I think we have to silently ignore errors. --drepper */ fclose (fp); if (added > 0) qsort (map, nmap, sizeof (struct alias_map), (int (*) PARAMS ((const void *, const void *))) alias_compare); return added; } static int extend_alias_table () { size_t new_size; struct alias_map *new_map; new_size = maxmap == 0 ? 100 : 2 * maxmap; new_map = (struct alias_map *) realloc (map, (new_size * sizeof (struct alias_map))); if (new_map == NULL) /* Simply don't extend: we don't have any more core. */ return -1; map = new_map; maxmap = new_size; return 0; } #ifdef _LIBC static void __attribute__ ((unused)) free_mem (void) { if (string_space != NULL) free (string_space); if (map != NULL) free (map); } text_set_element (__libc_subfreeres, free_mem); #endif static int alias_compare (map1, map2) const struct alias_map *map1; const struct alias_map *map2; { #if defined _LIBC || defined HAVE_STRCASECMP return strcasecmp (map1->alias, map2->alias); #else const unsigned char *p1 = (const unsigned char *) map1->alias; const unsigned char *p2 = (const unsigned char *) map2->alias; unsigned char c1, c2; if (p1 == p2) return 0; do { /* I know this seems to be odd but the tolower() function in some systems libc cannot handle nonalpha characters. */ c1 = isupper (*p1) ? tolower (*p1) : *p1; c2 = isupper (*p2) ? tolower (*p2) : *p2; if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); return c1 - c2; #endif } steghide-0.5.1/intl/ref-add.sin0000644000076400001440000000210107735006035011754 # Add this package to a list of references stored in a text file. # # Copyright (C) 2000 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// ta :a s/ @PACKAGE@ / @PACKAGE@ / tb s/ $/ @PACKAGE@ / :b s/^/# Packages using this file:/ } steghide-0.5.1/intl/loadmsgcat.c0000644000076400001440000010322207735006035012227 /* Load needed message catalogs. Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Tell glibc's to provide a prototype for mempcpy(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #ifdef __GNUC__ # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif #endif #include #include #if defined HAVE_UNISTD_H || defined _LIBC # include #endif #ifdef _LIBC # include # include #endif #if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ || (defined _LIBC && defined _POSIX_MAPPED_FILES) # include # undef HAVE_MMAP # define HAVE_MMAP 1 #else # undef HAVE_MMAP #endif #if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC # include #endif #if defined HAVE_INTTYPES_H || defined _LIBC # include #endif #include "gmo.h" #include "gettextP.h" #include "hash-string.h" #include "plural-exp.h" #ifdef _LIBC # include "../locale/localeinfo.h" #endif /* Provide fallback values for macros that ought to be defined in . Note that our fallback values need not be literal strings, because we don't use them with preprocessor string concatenation. */ #if !defined PRId8 || PRI_MACROS_BROKEN # undef PRId8 # define PRId8 "d" #endif #if !defined PRIi8 || PRI_MACROS_BROKEN # undef PRIi8 # define PRIi8 "i" #endif #if !defined PRIo8 || PRI_MACROS_BROKEN # undef PRIo8 # define PRIo8 "o" #endif #if !defined PRIu8 || PRI_MACROS_BROKEN # undef PRIu8 # define PRIu8 "u" #endif #if !defined PRIx8 || PRI_MACROS_BROKEN # undef PRIx8 # define PRIx8 "x" #endif #if !defined PRIX8 || PRI_MACROS_BROKEN # undef PRIX8 # define PRIX8 "X" #endif #if !defined PRId16 || PRI_MACROS_BROKEN # undef PRId16 # define PRId16 "d" #endif #if !defined PRIi16 || PRI_MACROS_BROKEN # undef PRIi16 # define PRIi16 "i" #endif #if !defined PRIo16 || PRI_MACROS_BROKEN # undef PRIo16 # define PRIo16 "o" #endif #if !defined PRIu16 || PRI_MACROS_BROKEN # undef PRIu16 # define PRIu16 "u" #endif #if !defined PRIx16 || PRI_MACROS_BROKEN # undef PRIx16 # define PRIx16 "x" #endif #if !defined PRIX16 || PRI_MACROS_BROKEN # undef PRIX16 # define PRIX16 "X" #endif #if !defined PRId32 || PRI_MACROS_BROKEN # undef PRId32 # define PRId32 "d" #endif #if !defined PRIi32 || PRI_MACROS_BROKEN # undef PRIi32 # define PRIi32 "i" #endif #if !defined PRIo32 || PRI_MACROS_BROKEN # undef PRIo32 # define PRIo32 "o" #endif #if !defined PRIu32 || PRI_MACROS_BROKEN # undef PRIu32 # define PRIu32 "u" #endif #if !defined PRIx32 || PRI_MACROS_BROKEN # undef PRIx32 # define PRIx32 "x" #endif #if !defined PRIX32 || PRI_MACROS_BROKEN # undef PRIX32 # define PRIX32 "X" #endif #if !defined PRId64 || PRI_MACROS_BROKEN # undef PRId64 # define PRId64 (sizeof (long) == 8 ? "ld" : "lld") #endif #if !defined PRIi64 || PRI_MACROS_BROKEN # undef PRIi64 # define PRIi64 (sizeof (long) == 8 ? "li" : "lli") #endif #if !defined PRIo64 || PRI_MACROS_BROKEN # undef PRIo64 # define PRIo64 (sizeof (long) == 8 ? "lo" : "llo") #endif #if !defined PRIu64 || PRI_MACROS_BROKEN # undef PRIu64 # define PRIu64 (sizeof (long) == 8 ? "lu" : "llu") #endif #if !defined PRIx64 || PRI_MACROS_BROKEN # undef PRIx64 # define PRIx64 (sizeof (long) == 8 ? "lx" : "llx") #endif #if !defined PRIX64 || PRI_MACROS_BROKEN # undef PRIX64 # define PRIX64 (sizeof (long) == 8 ? "lX" : "llX") #endif #if !defined PRIdLEAST8 || PRI_MACROS_BROKEN # undef PRIdLEAST8 # define PRIdLEAST8 "d" #endif #if !defined PRIiLEAST8 || PRI_MACROS_BROKEN # undef PRIiLEAST8 # define PRIiLEAST8 "i" #endif #if !defined PRIoLEAST8 || PRI_MACROS_BROKEN # undef PRIoLEAST8 # define PRIoLEAST8 "o" #endif #if !defined PRIuLEAST8 || PRI_MACROS_BROKEN # undef PRIuLEAST8 # define PRIuLEAST8 "u" #endif #if !defined PRIxLEAST8 || PRI_MACROS_BROKEN # undef PRIxLEAST8 # define PRIxLEAST8 "x" #endif #if !defined PRIXLEAST8 || PRI_MACROS_BROKEN # undef PRIXLEAST8 # define PRIXLEAST8 "X" #endif #if !defined PRIdLEAST16 || PRI_MACROS_BROKEN # undef PRIdLEAST16 # define PRIdLEAST16 "d" #endif #if !defined PRIiLEAST16 || PRI_MACROS_BROKEN # undef PRIiLEAST16 # define PRIiLEAST16 "i" #endif #if !defined PRIoLEAST16 || PRI_MACROS_BROKEN # undef PRIoLEAST16 # define PRIoLEAST16 "o" #endif #if !defined PRIuLEAST16 || PRI_MACROS_BROKEN # undef PRIuLEAST16 # define PRIuLEAST16 "u" #endif #if !defined PRIxLEAST16 || PRI_MACROS_BROKEN # undef PRIxLEAST16 # define PRIxLEAST16 "x" #endif #if !defined PRIXLEAST16 || PRI_MACROS_BROKEN # undef PRIXLEAST16 # define PRIXLEAST16 "X" #endif #if !defined PRIdLEAST32 || PRI_MACROS_BROKEN # undef PRIdLEAST32 # define PRIdLEAST32 "d" #endif #if !defined PRIiLEAST32 || PRI_MACROS_BROKEN # undef PRIiLEAST32 # define PRIiLEAST32 "i" #endif #if !defined PRIoLEAST32 || PRI_MACROS_BROKEN # undef PRIoLEAST32 # define PRIoLEAST32 "o" #endif #if !defined PRIuLEAST32 || PRI_MACROS_BROKEN # undef PRIuLEAST32 # define PRIuLEAST32 "u" #endif #if !defined PRIxLEAST32 || PRI_MACROS_BROKEN # undef PRIxLEAST32 # define PRIxLEAST32 "x" #endif #if !defined PRIXLEAST32 || PRI_MACROS_BROKEN # undef PRIXLEAST32 # define PRIXLEAST32 "X" #endif #if !defined PRIdLEAST64 || PRI_MACROS_BROKEN # undef PRIdLEAST64 # define PRIdLEAST64 PRId64 #endif #if !defined PRIiLEAST64 || PRI_MACROS_BROKEN # undef PRIiLEAST64 # define PRIiLEAST64 PRIi64 #endif #if !defined PRIoLEAST64 || PRI_MACROS_BROKEN # undef PRIoLEAST64 # define PRIoLEAST64 PRIo64 #endif #if !defined PRIuLEAST64 || PRI_MACROS_BROKEN # undef PRIuLEAST64 # define PRIuLEAST64 PRIu64 #endif #if !defined PRIxLEAST64 || PRI_MACROS_BROKEN # undef PRIxLEAST64 # define PRIxLEAST64 PRIx64 #endif #if !defined PRIXLEAST64 || PRI_MACROS_BROKEN # undef PRIXLEAST64 # define PRIXLEAST64 PRIX64 #endif #if !defined PRIdFAST8 || PRI_MACROS_BROKEN # undef PRIdFAST8 # define PRIdFAST8 "d" #endif #if !defined PRIiFAST8 || PRI_MACROS_BROKEN # undef PRIiFAST8 # define PRIiFAST8 "i" #endif #if !defined PRIoFAST8 || PRI_MACROS_BROKEN # undef PRIoFAST8 # define PRIoFAST8 "o" #endif #if !defined PRIuFAST8 || PRI_MACROS_BROKEN # undef PRIuFAST8 # define PRIuFAST8 "u" #endif #if !defined PRIxFAST8 || PRI_MACROS_BROKEN # undef PRIxFAST8 # define PRIxFAST8 "x" #endif #if !defined PRIXFAST8 || PRI_MACROS_BROKEN # undef PRIXFAST8 # define PRIXFAST8 "X" #endif #if !defined PRIdFAST16 || PRI_MACROS_BROKEN # undef PRIdFAST16 # define PRIdFAST16 "d" #endif #if !defined PRIiFAST16 || PRI_MACROS_BROKEN # undef PRIiFAST16 # define PRIiFAST16 "i" #endif #if !defined PRIoFAST16 || PRI_MACROS_BROKEN # undef PRIoFAST16 # define PRIoFAST16 "o" #endif #if !defined PRIuFAST16 || PRI_MACROS_BROKEN # undef PRIuFAST16 # define PRIuFAST16 "u" #endif #if !defined PRIxFAST16 || PRI_MACROS_BROKEN # undef PRIxFAST16 # define PRIxFAST16 "x" #endif #if !defined PRIXFAST16 || PRI_MACROS_BROKEN # undef PRIXFAST16 # define PRIXFAST16 "X" #endif #if !defined PRIdFAST32 || PRI_MACROS_BROKEN # undef PRIdFAST32 # define PRIdFAST32 "d" #endif #if !defined PRIiFAST32 || PRI_MACROS_BROKEN # undef PRIiFAST32 # define PRIiFAST32 "i" #endif #if !defined PRIoFAST32 || PRI_MACROS_BROKEN # undef PRIoFAST32 # define PRIoFAST32 "o" #endif #if !defined PRIuFAST32 || PRI_MACROS_BROKEN # undef PRIuFAST32 # define PRIuFAST32 "u" #endif #if !defined PRIxFAST32 || PRI_MACROS_BROKEN # undef PRIxFAST32 # define PRIxFAST32 "x" #endif #if !defined PRIXFAST32 || PRI_MACROS_BROKEN # undef PRIXFAST32 # define PRIXFAST32 "X" #endif #if !defined PRIdFAST64 || PRI_MACROS_BROKEN # undef PRIdFAST64 # define PRIdFAST64 PRId64 #endif #if !defined PRIiFAST64 || PRI_MACROS_BROKEN # undef PRIiFAST64 # define PRIiFAST64 PRIi64 #endif #if !defined PRIoFAST64 || PRI_MACROS_BROKEN # undef PRIoFAST64 # define PRIoFAST64 PRIo64 #endif #if !defined PRIuFAST64 || PRI_MACROS_BROKEN # undef PRIuFAST64 # define PRIuFAST64 PRIu64 #endif #if !defined PRIxFAST64 || PRI_MACROS_BROKEN # undef PRIxFAST64 # define PRIxFAST64 PRIx64 #endif #if !defined PRIXFAST64 || PRI_MACROS_BROKEN # undef PRIXFAST64 # define PRIXFAST64 PRIX64 #endif #if !defined PRIdMAX || PRI_MACROS_BROKEN # undef PRIdMAX # define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld") #endif #if !defined PRIiMAX || PRI_MACROS_BROKEN # undef PRIiMAX # define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli") #endif #if !defined PRIoMAX || PRI_MACROS_BROKEN # undef PRIoMAX # define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo") #endif #if !defined PRIuMAX || PRI_MACROS_BROKEN # undef PRIuMAX # define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu") #endif #if !defined PRIxMAX || PRI_MACROS_BROKEN # undef PRIxMAX # define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx") #endif #if !defined PRIXMAX || PRI_MACROS_BROKEN # undef PRIXMAX # define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX") #endif #if !defined PRIdPTR || PRI_MACROS_BROKEN # undef PRIdPTR # define PRIdPTR \ (sizeof (void *) == sizeof (long) ? "ld" : \ sizeof (void *) == sizeof (int) ? "d" : \ "lld") #endif #if !defined PRIiPTR || PRI_MACROS_BROKEN # undef PRIiPTR # define PRIiPTR \ (sizeof (void *) == sizeof (long) ? "li" : \ sizeof (void *) == sizeof (int) ? "i" : \ "lli") #endif #if !defined PRIoPTR || PRI_MACROS_BROKEN # undef PRIoPTR # define PRIoPTR \ (sizeof (void *) == sizeof (long) ? "lo" : \ sizeof (void *) == sizeof (int) ? "o" : \ "llo") #endif #if !defined PRIuPTR || PRI_MACROS_BROKEN # undef PRIuPTR # define PRIuPTR \ (sizeof (void *) == sizeof (long) ? "lu" : \ sizeof (void *) == sizeof (int) ? "u" : \ "llu") #endif #if !defined PRIxPTR || PRI_MACROS_BROKEN # undef PRIxPTR # define PRIxPTR \ (sizeof (void *) == sizeof (long) ? "lx" : \ sizeof (void *) == sizeof (int) ? "x" : \ "llx") #endif #if !defined PRIXPTR || PRI_MACROS_BROKEN # undef PRIXPTR # define PRIXPTR \ (sizeof (void *) == sizeof (long) ? "lX" : \ sizeof (void *) == sizeof (int) ? "X" : \ "llX") #endif /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ISO C functions. This is required by the standard because some ISO C functions will require linking with this object file and the name space must not be polluted. */ # define open __open # define close __close # define read __read # define mmap __mmap # define munmap __munmap #endif /* For those losing systems which don't have `alloca' we have to add some additional code emulating it. */ #ifdef HAVE_ALLOCA # define freea(p) /* nothing */ #else # define alloca(n) malloc (n) # define freea(p) free (p) #endif /* For systems that distinguish between text and binary I/O. O_BINARY is usually declared in . */ #if !defined O_BINARY && defined _O_BINARY /* For MSC-compatible compilers. */ # define O_BINARY _O_BINARY # define O_TEXT _O_TEXT #endif #ifdef __BEOS__ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT #endif /* On reasonable systems, binary I/O is the default. */ #ifndef O_BINARY # define O_BINARY 0 #endif /* Prototypes for local functions. Needed to ensure compiler checking of function argument counts despite of K&R C function definition syntax. */ static const char *get_sysdep_segment_value PARAMS ((const char *name)); /* We need a sign, whether a new catalog was loaded, which can be associated with all translations. This is important if the translations are cached by one of GCC's features. */ int _nl_msg_cat_cntr; /* Expand a system dependent string segment. Return NULL if unsupported. */ static const char * get_sysdep_segment_value (name) const char *name; { /* Test for an ISO C 99 section 7.8.1 format string directive. Syntax: P R I { d | i | o | u | x | X } { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */ /* We don't use a table of 14 times 6 'const char *' strings here, because data relocations cost startup time. */ if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I') { if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u' || name[3] == 'x' || name[3] == 'X') { if (name[4] == '8' && name[5] == '\0') { if (name[3] == 'd') return PRId8; if (name[3] == 'i') return PRIi8; if (name[3] == 'o') return PRIo8; if (name[3] == 'u') return PRIu8; if (name[3] == 'x') return PRIx8; if (name[3] == 'X') return PRIX8; abort (); } if (name[4] == '1' && name[5] == '6' && name[6] == '\0') { if (name[3] == 'd') return PRId16; if (name[3] == 'i') return PRIi16; if (name[3] == 'o') return PRIo16; if (name[3] == 'u') return PRIu16; if (name[3] == 'x') return PRIx16; if (name[3] == 'X') return PRIX16; abort (); } if (name[4] == '3' && name[5] == '2' && name[6] == '\0') { if (name[3] == 'd') return PRId32; if (name[3] == 'i') return PRIi32; if (name[3] == 'o') return PRIo32; if (name[3] == 'u') return PRIu32; if (name[3] == 'x') return PRIx32; if (name[3] == 'X') return PRIX32; abort (); } if (name[4] == '6' && name[5] == '4' && name[6] == '\0') { if (name[3] == 'd') return PRId64; if (name[3] == 'i') return PRIi64; if (name[3] == 'o') return PRIo64; if (name[3] == 'u') return PRIu64; if (name[3] == 'x') return PRIx64; if (name[3] == 'X') return PRIX64; abort (); } if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A' && name[7] == 'S' && name[8] == 'T') { if (name[9] == '8' && name[10] == '\0') { if (name[3] == 'd') return PRIdLEAST8; if (name[3] == 'i') return PRIiLEAST8; if (name[3] == 'o') return PRIoLEAST8; if (name[3] == 'u') return PRIuLEAST8; if (name[3] == 'x') return PRIxLEAST8; if (name[3] == 'X') return PRIXLEAST8; abort (); } if (name[9] == '1' && name[10] == '6' && name[11] == '\0') { if (name[3] == 'd') return PRIdLEAST16; if (name[3] == 'i') return PRIiLEAST16; if (name[3] == 'o') return PRIoLEAST16; if (name[3] == 'u') return PRIuLEAST16; if (name[3] == 'x') return PRIxLEAST16; if (name[3] == 'X') return PRIXLEAST16; abort (); } if (name[9] == '3' && name[10] == '2' && name[11] == '\0') { if (name[3] == 'd') return PRIdLEAST32; if (name[3] == 'i') return PRIiLEAST32; if (name[3] == 'o') return PRIoLEAST32; if (name[3] == 'u') return PRIuLEAST32; if (name[3] == 'x') return PRIxLEAST32; if (name[3] == 'X') return PRIXLEAST32; abort (); } if (name[9] == '6' && name[10] == '4' && name[11] == '\0') { if (name[3] == 'd') return PRIdLEAST64; if (name[3] == 'i') return PRIiLEAST64; if (name[3] == 'o') return PRIoLEAST64; if (name[3] == 'u') return PRIuLEAST64; if (name[3] == 'x') return PRIxLEAST64; if (name[3] == 'X') return PRIXLEAST64; abort (); } } if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S' && name[7] == 'T') { if (name[8] == '8' && name[9] == '\0') { if (name[3] == 'd') return PRIdFAST8; if (name[3] == 'i') return PRIiFAST8; if (name[3] == 'o') return PRIoFAST8; if (name[3] == 'u') return PRIuFAST8; if (name[3] == 'x') return PRIxFAST8; if (name[3] == 'X') return PRIXFAST8; abort (); } if (name[8] == '1' && name[9] == '6' && name[10] == '\0') { if (name[3] == 'd') return PRIdFAST16; if (name[3] == 'i') return PRIiFAST16; if (name[3] == 'o') return PRIoFAST16; if (name[3] == 'u') return PRIuFAST16; if (name[3] == 'x') return PRIxFAST16; if (name[3] == 'X') return PRIXFAST16; abort (); } if (name[8] == '3' && name[9] == '2' && name[10] == '\0') { if (name[3] == 'd') return PRIdFAST32; if (name[3] == 'i') return PRIiFAST32; if (name[3] == 'o') return PRIoFAST32; if (name[3] == 'u') return PRIuFAST32; if (name[3] == 'x') return PRIxFAST32; if (name[3] == 'X') return PRIXFAST32; abort (); } if (name[8] == '6' && name[9] == '4' && name[10] == '\0') { if (name[3] == 'd') return PRIdFAST64; if (name[3] == 'i') return PRIiFAST64; if (name[3] == 'o') return PRIoFAST64; if (name[3] == 'u') return PRIuFAST64; if (name[3] == 'x') return PRIxFAST64; if (name[3] == 'X') return PRIXFAST64; abort (); } } if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X' && name[7] == '\0') { if (name[3] == 'd') return PRIdMAX; if (name[3] == 'i') return PRIiMAX; if (name[3] == 'o') return PRIoMAX; if (name[3] == 'u') return PRIuMAX; if (name[3] == 'x') return PRIxMAX; if (name[3] == 'X') return PRIXMAX; abort (); } if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R' && name[7] == '\0') { if (name[3] == 'd') return PRIdPTR; if (name[3] == 'i') return PRIiPTR; if (name[3] == 'o') return PRIoPTR; if (name[3] == 'u') return PRIuPTR; if (name[3] == 'x') return PRIxPTR; if (name[3] == 'X') return PRIXPTR; abort (); } } } /* Other system dependent strings are not valid. */ return NULL; } /* Initialize the codeset dependent parts of an opened message catalog. Return the header entry. */ const char * internal_function _nl_init_domain_conv (domain_file, domain, domainbinding) struct loaded_l10nfile *domain_file; struct loaded_domain *domain; struct binding *domainbinding; { /* Find out about the character set the file is encoded with. This can be found (in textual form) in the entry "". If this entry does not exist or if this does not contain the `charset=' information, we will assume the charset matches the one the current locale and we don't have to perform any conversion. */ char *nullentry; size_t nullentrylen; /* Preinitialize fields, to avoid recursion during _nl_find_msg. */ domain->codeset_cntr = (domainbinding != NULL ? domainbinding->codeset_cntr : 0); #ifdef _LIBC domain->conv = (__gconv_t) -1; #else # if HAVE_ICONV domain->conv = (iconv_t) -1; # endif #endif domain->conv_tab = NULL; /* Get the header entry. */ nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen); if (nullentry != NULL) { #if defined _LIBC || HAVE_ICONV const char *charsetstr; charsetstr = strstr (nullentry, "charset="); if (charsetstr != NULL) { size_t len; char *charset; const char *outcharset; charsetstr += strlen ("charset="); len = strcspn (charsetstr, " \t\n"); charset = (char *) alloca (len + 1); # if defined _LIBC || HAVE_MEMPCPY *((char *) mempcpy (charset, charsetstr, len)) = '\0'; # else memcpy (charset, charsetstr, len); charset[len] = '\0'; # endif /* The output charset should normally be determined by the locale. But sometimes the locale is not used or not correctly set up, so we provide a possibility for the user to override this. Moreover, the value specified through bind_textdomain_codeset overrides both. */ if (domainbinding != NULL && domainbinding->codeset != NULL) outcharset = domainbinding->codeset; else { outcharset = getenv ("OUTPUT_CHARSET"); if (outcharset == NULL || outcharset[0] == '\0') { # ifdef _LIBC outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string; # else # if HAVE_ICONV extern const char *locale_charset PARAMS ((void)); outcharset = locale_charset (); # endif # endif } } # ifdef _LIBC /* We always want to use transliteration. */ outcharset = norm_add_slashes (outcharset, "TRANSLIT"); charset = norm_add_slashes (charset, NULL); if (__gconv_open (outcharset, charset, &domain->conv, GCONV_AVOID_NOCONV) != __GCONV_OK) domain->conv = (__gconv_t) -1; # else # if HAVE_ICONV /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5, we want to use transliteration. */ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \ || _LIBICONV_VERSION >= 0x0105 if (strchr (outcharset, '/') == NULL) { char *tmp; len = strlen (outcharset); tmp = (char *) alloca (len + 10 + 1); memcpy (tmp, outcharset, len); memcpy (tmp + len, "//TRANSLIT", 10 + 1); outcharset = tmp; domain->conv = iconv_open (outcharset, charset); freea (outcharset); } else # endif domain->conv = iconv_open (outcharset, charset); # endif # endif freea (charset); } #endif /* _LIBC || HAVE_ICONV */ } return nullentry; } /* Frees the codeset dependent parts of an opened message catalog. */ void internal_function _nl_free_domain_conv (domain) struct loaded_domain *domain; { if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1) free (domain->conv_tab); #ifdef _LIBC if (domain->conv != (__gconv_t) -1) __gconv_close (domain->conv); #else # if HAVE_ICONV if (domain->conv != (iconv_t) -1) iconv_close (domain->conv); # endif #endif } /* Load the message catalogs specified by FILENAME. If it is no valid message catalog do nothing. */ void internal_function _nl_load_domain (domain_file, domainbinding) struct loaded_l10nfile *domain_file; struct binding *domainbinding; { int fd; size_t size; #ifdef _LIBC struct stat64 st; #else struct stat st; #endif struct mo_file_header *data = (struct mo_file_header *) -1; int use_mmap = 0; struct loaded_domain *domain; int revision; const char *nullentry; domain_file->decided = 1; domain_file->data = NULL; /* Note that it would be useless to store domainbinding in domain_file because domainbinding might be == NULL now but != NULL later (after a call to bind_textdomain_codeset). */ /* If the record does not represent a valid locale the FILENAME might be NULL. This can happen when according to the given specification the locale file name is different for XPG and CEN syntax. */ if (domain_file->filename == NULL) return; /* Try to open the addressed file. */ fd = open (domain_file->filename, O_RDONLY | O_BINARY); if (fd == -1) return; /* We must know about the size of the file. */ if ( #ifdef _LIBC __builtin_expect (fstat64 (fd, &st) != 0, 0) #else __builtin_expect (fstat (fd, &st) != 0, 0) #endif || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0) || __builtin_expect (size < sizeof (struct mo_file_header), 0)) { /* Something went wrong. */ close (fd); return; } #ifdef HAVE_MMAP /* Now we are ready to load the file. If mmap() is available we try this first. If not available or it failed we try to load it. */ data = (struct mo_file_header *) mmap (NULL, size, PROT_READ, MAP_PRIVATE, fd, 0); if (__builtin_expect (data != (struct mo_file_header *) -1, 1)) { /* mmap() call was successful. */ close (fd); use_mmap = 1; } #endif /* If the data is not yet available (i.e. mmap'ed) we try to load it manually. */ if (data == (struct mo_file_header *) -1) { size_t to_read; char *read_ptr; data = (struct mo_file_header *) malloc (size); if (data == NULL) return; to_read = size; read_ptr = (char *) data; do { long int nb = (long int) read (fd, read_ptr, to_read); if (nb <= 0) { #ifdef EINTR if (nb == -1 && errno == EINTR) continue; #endif close (fd); return; } read_ptr += nb; to_read -= nb; } while (to_read > 0); close (fd); } /* Using the magic number we can test whether it really is a message catalog file. */ if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED, 0)) { /* The magic number is wrong: not a message catalog file. */ #ifdef HAVE_MMAP if (use_mmap) munmap ((caddr_t) data, size); else #endif free (data); return; } domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); if (domain == NULL) return; domain_file->data = domain; domain->data = (char *) data; domain->use_mmap = use_mmap; domain->mmap_size = size; domain->must_swap = data->magic != _MAGIC; domain->malloced = NULL; /* Fill in the information about the available tables. */ revision = W (domain->must_swap, data->revision); /* We support only the major revision 0. */ switch (revision >> 16) { case 0: domain->nstrings = W (domain->must_swap, data->nstrings); domain->orig_tab = (const struct string_desc *) ((char *) data + W (domain->must_swap, data->orig_tab_offset)); domain->trans_tab = (const struct string_desc *) ((char *) data + W (domain->must_swap, data->trans_tab_offset)); domain->hash_size = W (domain->must_swap, data->hash_tab_size); domain->hash_tab = (domain->hash_size > 2 ? (const nls_uint32 *) ((char *) data + W (domain->must_swap, data->hash_tab_offset)) : NULL); domain->must_swap_hash_tab = domain->must_swap; /* Now dispatch on the minor revision. */ switch (revision & 0xffff) { case 0: domain->n_sysdep_strings = 0; domain->orig_sysdep_tab = NULL; domain->trans_sysdep_tab = NULL; break; case 1: default: { nls_uint32 n_sysdep_strings; if (domain->hash_tab == NULL) /* This is invalid. These minor revisions need a hash table. */ goto invalid; n_sysdep_strings = W (domain->must_swap, data->n_sysdep_strings); if (n_sysdep_strings > 0) { nls_uint32 n_sysdep_segments; const struct sysdep_segment *sysdep_segments; const char **sysdep_segment_values; const nls_uint32 *orig_sysdep_tab; const nls_uint32 *trans_sysdep_tab; size_t memneed; char *mem; struct sysdep_string_desc *inmem_orig_sysdep_tab; struct sysdep_string_desc *inmem_trans_sysdep_tab; nls_uint32 *inmem_hash_tab; unsigned int i; /* Get the values of the system dependent segments. */ n_sysdep_segments = W (domain->must_swap, data->n_sysdep_segments); sysdep_segments = (const struct sysdep_segment *) ((char *) data + W (domain->must_swap, data->sysdep_segments_offset)); sysdep_segment_values = alloca (n_sysdep_segments * sizeof (const char *)); for (i = 0; i < n_sysdep_segments; i++) { const char *name = (char *) data + W (domain->must_swap, sysdep_segments[i].offset); nls_uint32 namelen = W (domain->must_swap, sysdep_segments[i].length); if (!(namelen > 0 && name[namelen - 1] == '\0')) { freea (sysdep_segment_values); goto invalid; } sysdep_segment_values[i] = get_sysdep_segment_value (name); } orig_sysdep_tab = (const nls_uint32 *) ((char *) data + W (domain->must_swap, data->orig_sysdep_tab_offset)); trans_sysdep_tab = (const nls_uint32 *) ((char *) data + W (domain->must_swap, data->trans_sysdep_tab_offset)); /* Compute the amount of additional memory needed for the system dependent strings and the augmented hash table. */ memneed = 2 * n_sysdep_strings * sizeof (struct sysdep_string_desc) + domain->hash_size * sizeof (nls_uint32); for (i = 0; i < 2 * n_sysdep_strings; i++) { const struct sysdep_string *sysdep_string = (const struct sysdep_string *) ((char *) data + W (domain->must_swap, i < n_sysdep_strings ? orig_sysdep_tab[i] : trans_sysdep_tab[i - n_sysdep_strings])); size_t need = 0; const struct segment_pair *p = sysdep_string->segments; if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END) for (p = sysdep_string->segments;; p++) { nls_uint32 sysdepref; need += W (domain->must_swap, p->segsize); sysdepref = W (domain->must_swap, p->sysdepref); if (sysdepref == SEGMENTS_END) break; if (sysdepref >= n_sysdep_segments) { /* Invalid. */ freea (sysdep_segment_values); goto invalid; } need += strlen (sysdep_segment_values[sysdepref]); } memneed += need; } /* Allocate additional memory. */ mem = (char *) malloc (memneed); if (mem == NULL) goto invalid; domain->malloced = mem; inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem; mem += n_sysdep_strings * sizeof (struct sysdep_string_desc); inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem; mem += n_sysdep_strings * sizeof (struct sysdep_string_desc); inmem_hash_tab = (nls_uint32 *) mem; mem += domain->hash_size * sizeof (nls_uint32); /* Compute the system dependent strings. */ for (i = 0; i < 2 * n_sysdep_strings; i++) { const struct sysdep_string *sysdep_string = (const struct sysdep_string *) ((char *) data + W (domain->must_swap, i < n_sysdep_strings ? orig_sysdep_tab[i] : trans_sysdep_tab[i - n_sysdep_strings])); const char *static_segments = (char *) data + W (domain->must_swap, sysdep_string->offset); const struct segment_pair *p = sysdep_string->segments; /* Concatenate the segments, and fill inmem_orig_sysdep_tab[i] (for i < n_sysdep_strings) and inmem_trans_sysdep_tab[i-n_sysdep_strings] (for i >= n_sysdep_strings). */ if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END) { /* Only one static segment. */ inmem_orig_sysdep_tab[i].length = W (domain->must_swap, p->segsize); inmem_orig_sysdep_tab[i].pointer = static_segments; } else { inmem_orig_sysdep_tab[i].pointer = mem; for (p = sysdep_string->segments;; p++) { nls_uint32 segsize = W (domain->must_swap, p->segsize); nls_uint32 sysdepref = W (domain->must_swap, p->sysdepref); size_t n; if (segsize > 0) { memcpy (mem, static_segments, segsize); mem += segsize; static_segments += segsize; } if (sysdepref == SEGMENTS_END) break; n = strlen (sysdep_segment_values[sysdepref]); memcpy (mem, sysdep_segment_values[sysdepref], n); mem += n; } inmem_orig_sysdep_tab[i].length = mem - inmem_orig_sysdep_tab[i].pointer; } } /* Compute the augmented hash table. */ for (i = 0; i < domain->hash_size; i++) inmem_hash_tab[i] = W (domain->must_swap_hash_tab, domain->hash_tab[i]); for (i = 0; i < n_sysdep_strings; i++) { const char *msgid = inmem_orig_sysdep_tab[i].pointer; nls_uint32 hash_val = hash_string (msgid); nls_uint32 idx = hash_val % domain->hash_size; nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); for (;;) { if (inmem_hash_tab[idx] == 0) { /* Hash table entry is empty. Use it. */ inmem_hash_tab[idx] = 1 + domain->nstrings + i; break; } if (idx >= domain->hash_size - incr) idx -= domain->hash_size - incr; else idx += incr; } } freea (sysdep_segment_values); domain->n_sysdep_strings = n_sysdep_strings; domain->orig_sysdep_tab = inmem_orig_sysdep_tab; domain->trans_sysdep_tab = inmem_trans_sysdep_tab; domain->hash_tab = inmem_hash_tab; domain->must_swap_hash_tab = 0; } else { domain->n_sysdep_strings = 0; domain->orig_sysdep_tab = NULL; domain->trans_sysdep_tab = NULL; } } break; } break; default: /* This is an invalid revision. */ invalid: /* This is an invalid .mo file. */ if (domain->malloced) free (domain->malloced); #ifdef HAVE_MMAP if (use_mmap) munmap ((caddr_t) data, size); else #endif free (data); free (domain); domain_file->data = NULL; return; } /* Now initialize the character set converter from the character set the file is encoded with (found in the header entry) to the domain's specified character set or the locale's character set. */ nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding); /* Also look for a plural specification. */ EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals); } #ifdef _LIBC void internal_function _nl_unload_domain (domain) struct loaded_domain *domain; { if (domain->plural != &__gettext_germanic_plural) __gettext_free_exp (domain->plural); _nl_free_domain_conv (domain); if (domain->malloced) free (domain->malloced); # ifdef _POSIX_MAPPED_FILES if (domain->use_mmap) munmap ((caddr_t) domain->data, domain->mmap_size); else # endif /* _POSIX_MAPPED_FILES */ free ((void *) domain->data); free (domain); } #endif steghide-0.5.1/intl/dgettext.c0000644000076400001440000000343007735006035011741 /* Implementation of the dgettext(3) function. Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include "gettextP.h" #ifdef _LIBC # include #else # include "libgnuintl.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DGETTEXT __dgettext # define DCGETTEXT INTUSE(__dcgettext) #else # define DGETTEXT libintl_dgettext # define DCGETTEXT libintl_dcgettext #endif /* Look up MSGID in the DOMAINNAME message catalog of the current LC_MESSAGES locale. */ char * DGETTEXT (domainname, msgid) const char *domainname; const char *msgid; { return DCGETTEXT (domainname, msgid, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__dgettext, dgettext); #endif steghide-0.5.1/intl/textdomain.c0000644000076400001440000001071007735006035012264 /* Implementation of the textdomain(3) function. Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #ifdef _LIBC # include #else # include "libgnuintl.h" #endif #include "gettextP.h" #ifdef _LIBC /* We have to handle multi-threaded applications. */ # include #else /* Provide dummy implementation if this is outside glibc. */ # define __libc_rwlock_define(CLASS, NAME) # define __libc_rwlock_wrlock(NAME) # define __libc_rwlock_unlock(NAME) #endif /* The internal variables in the standalone libintl.a must have different names than the internal variables in GNU libc, otherwise programs using libintl.a cannot be linked statically. */ #if !defined _LIBC # define _nl_default_default_domain libintl_nl_default_default_domain # define _nl_current_default_domain libintl_nl_current_default_domain #endif /* @@ end of prolog @@ */ /* Name of the default text domain. */ extern const char _nl_default_default_domain[] attribute_hidden; /* Default text domain in which entries for gettext(3) are to be found. */ extern const char *_nl_current_default_domain attribute_hidden; /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define TEXTDOMAIN __textdomain # ifndef strdup # define strdup(str) __strdup (str) # endif #else # define TEXTDOMAIN libintl_textdomain #endif /* Lock variable to protect the global data in the gettext implementation. */ __libc_rwlock_define (extern, _nl_state_lock attribute_hidden) /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ char * TEXTDOMAIN (domainname) const char *domainname; { char *new_domain; char *old_domain; /* A NULL pointer requests the current setting. */ if (domainname == NULL) return (char *) _nl_current_default_domain; __libc_rwlock_wrlock (_nl_state_lock); old_domain = (char *) _nl_current_default_domain; /* If domain name is the null string set to default domain "messages". */ if (domainname[0] == '\0' || strcmp (domainname, _nl_default_default_domain) == 0) { _nl_current_default_domain = _nl_default_default_domain; new_domain = (char *) _nl_current_default_domain; } else if (strcmp (domainname, old_domain) == 0) /* This can happen and people will use it to signal that some environment variable changed. */ new_domain = old_domain; else { /* If the following malloc fails `_nl_current_default_domain' will be NULL. This value will be returned and so signals we are out of core. */ #if defined _LIBC || defined HAVE_STRDUP new_domain = strdup (domainname); #else size_t len = strlen (domainname) + 1; new_domain = (char *) malloc (len); if (new_domain != NULL) memcpy (new_domain, domainname, len); #endif if (new_domain != NULL) _nl_current_default_domain = new_domain; } /* We use this possibility to signal a change of the loaded catalogs since this is most likely the case and there is no other easy we to do it. Do it only when the call was successful. */ if (new_domain != NULL) { ++_nl_msg_cat_cntr; if (old_domain != new_domain && old_domain != _nl_default_default_domain) free (old_domain); } __libc_rwlock_unlock (_nl_state_lock); return new_domain; } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__textdomain, textdomain); #endif steghide-0.5.1/depcomp0000755000076400001440000002753307634203260010363 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. We will use -o /dev/null later, # however we can't do the remplacement now because # `-o $object' might simply not be used IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; -*) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 steghide-0.5.1/LEAME0000644000076400001440000001555407742455473007573 Introducción : ============== Steghide es un programa de steganografía que puede ocultar información adentro de varios tipos de archivos de imagen y de audio. Se respetan las respectivas frecuencias de muestreo de colores por lo que sus adjuntos no se ven afectados por las pruebas estadísticas de primer orden. La versión actual de steghide es la 0.5.1 Características: *) compresión de datos adjuntos *) encriptado de datos adjuntos *) se adjunta la checksum para verificación de integridad de los datos extraídos *) reconoce archivos JPEG, BMP, WAV y AU Esteganografía : =============== Esteganografía significa literalmente, escritura encubierta. Su objetivo es ocultar el hecho de que se esta enviando información. Esto suele lograrse usando un archivo portada (algo extenso) y adjuntado un mensaje secreto (más corto) en este archivo. El resultado es un archivo de apariencia inocua (el archivo stego) que contiene el mensaje secreto. Compilación e Instalación : =========================== Dependencias : -------------- Deberíamos tener las siguientes librerias instaladas para usar steghide. * libmhash Una librería que tiene varios hash de algoritmos y claves criptográficas de generación de algoritmos. Steghide necesita esta librería para transformar el salvoconducto en una forma que pueda usarse como entrada de algoritmos criptográficos y esteganográficos. Puede obtenerse en: http://mhash.sourceforge.net/ * libmcrypt Una librería que tiene varios algoritmos de encriptado simétricos. Si compilamos steghide sin libmcrypt no podremos usar a steghide para encriptar datos antes de adjuntarlos ni extraer información encriptada (aunque conozcamos el salvoconducto apropiado). Puede obtenerse en: http://mcrypt.sourceforge.net/ * libjpeg Una librería que usa compactado de imágenes jpeg. Sin esta libería, no podremos adjuntar datos en archivos jpeg ni extraer datos en archivos jpeg. Puede obtenerse en: http://www.ijg.org/ * zlib Una librería de compactado sin pérdida de datos. Si compilamos steghide sin tener instalada esta librería no podremos usar steghide para compactar los datos antes de adjuntarlos ni extraer datos compactados de un archivo stego. Puede obtenerse en: http://www.gzip.org/zlib/ Libmhash es imprecindible para compilar steghide. Aunque se puede compilar sin las otras liberías se recomienda encarecidamente incluirlas ya que sino perdería muchas de sus grandes habilidades. Linux / Unix : -------------- Una vez desempaquetado la distribución fuente, ingresar los siguientes comandos: 1) ./configure 2) make 3) make check 4) make install (como root) Para mas información, ver las instrucciones de instalación genéricas en el archivo INSTALL que vino con la distribución. Si falla alguno de estos comandos, por favor, enviarme un email a la lista de correo de steghide (steghide-devel@lists.sourceforge.net) describiendo el error. Windows : --------- La forma más simple es descargar el binario precompilado (que incluye las versiones de Windows de todas las librerías necesarias) desde la sede de steghide: http://steghide.sourceforge.net/index.php Si quisiéramos compilar las fuentes necesitaremos un compilador de C++. La forma de compilar el código fuente dependerá del compilador que usemos: Por favor, consultar la documentación del compilador. Steghide puede compilarse con gcc en un entorno cygwin (http://www.cygwin.com/) que es una capa de emulación unix para Windows siguiendo el procedimiento antes descrito para la compilación Linux/Unix. Pronto Inicio : ============= He aquí algunos ejemplos de como puede usarse steghide. Echarle una mirada para hacernos una idea. Si necesitamos información más detallada por favor, leer la página man. Básicamente, se usa así: $ steghide embed -cf imagen.jpg -ef secreto.txt Ingrese salvoconducto: Re-ingrese el salvoconducto: adjuntando "secreto.txt" en "imagen.jpg"... hecho Este comando adjuntará el archivo secreto.txt en el archivo de portada imagen.jpg. Una vez adjuntado los datos secretos como se vió antes podemos enviar el archivo imagen.jpg a la persona que debería recibir el mensaje secreto. El receptor debe usar steghide de la siguiente manera: $ steghide extract -sf imagen.jpg Ingrese salvoconducto: los datos extraídos se grabaron en "secreto.txt". Si el salvoconducto declarado es el correcto, el contenido del archivo original secreto.txt se extraerá del archivo stego imagen.jpg y se grabará en el directorio actual. Si hemos recibido un archivo que contiene datos adjuntos y quisiéramos tener más información sobre el mismo antes de extraerlo, usaremos el comando info: $ steghide info archivo_recibido.wav "archivo_recibido.wav": formato: wave audio, PCM encoding capacidad: 3.5 KB ¿ Intento extraer información sobre los datos adjuntos? (y/n) y Ingrese salvoconducto: archivo adjunto "secreto.txt": tamaño: 1.6 KB encriptado: rijndael-128, cbc comprimido: si Luego de emitir algunos datos generales sobre el archivo stego (formato, capacidad) se nos preguntará si queremos que steghide obtenga información sobre los datos adjuntos. Si respondemos con yes tendremos que declarar un salvoconducto. Steghide entonces intentará extraer los datos adjuntos con ese salvoconducto y - si tiene 'éxito - emitirá un informe sobre el mismo. Contacto: ========= La Sede : --------- La versión más reciente de steghide e información adicional y la documentación pueden obtenerse de la sede WWW steghide en: http://steghide.sourceforge.net/ Listas de Correo : ------------------ Si encontramos algún fallo o si tenemos preguntas, comentarios, sugerencias, etc. por favor, enviarme un email a la lista de correo de desarrollo: steghide-devel@lists.sourceforge.net Para recibir emails enviados a esta lista, podemos suscribirnos en : http://lists.sourceforge.net/lists/listinfo/steghide-devel Si queremos mantenernos informados de cuando aparece una nueva versión de steghide por favor, suscribirse a la lista de correo de anuncios de steghide en: http://lists.sourceforge.net/lists/listinfo/steghide-announce Acceso a CVS anónimo : ---------------------- Podemos acceder al código de desarrollo más reciente mediante cvs anónimo. Solo hay que escribir las siguientes líneas: $ cvs -d:pserver:anonymous@cvs.steghide.sourceforge.net:/cvsroot/steghide login CVS password: [ Acá pulsar RETURN ] $ cvs -z3 -d:pserver:anonymous@cvs.steghide.sourceforge.net:/cvsroot/steghide co steghide También podemos navegar por el repositorio de cvs en WWW: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/steghide/ Autor : ------- Pueden contactarme (Stefan Hetzl) por e-mail: shetzl@chello.at Traducción al castellano : -------------------------- versión 1 - Alberto Adrián Schiano (chanio@users.sourceforge.net) steghide-0.5.1/aclocal.m40000644000076400001440000031364607743177316010666 # generated automatically by aclocal 1.7.2 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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. # Do all the work for Automake. -*- Autoconf -*- # 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. # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 8 # 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... AC_PREREQ([2.54]) # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow # the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl # 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_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # 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], [_am_stamp_count=`expr ${_am_stamp_count-0} + 1` echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 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. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.7.2])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # -*- Autoconf -*- # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_AUX_DIR_EXPAND # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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. # Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50]) AC_DEFUN([AM_AUX_DIR_EXPAND], [ # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # AM_PROG_INSTALL_STRIP # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # 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="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # serial 4 -*- Autoconf -*- # Copyright 1999, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # 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. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_$1_dependencies_compiler_type=$depmode break 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], [rm -f .deps 2>/dev/null mkdir .deps 2>/dev/null if test -d .deps; then DEPDIR=.deps else # MS-DOS does not allow filenames that begin with a dot. DEPDIR=_deps fi rmdir .deps 2>/dev/null AC_SUBST([DEPDIR]) ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # 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 -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST(am__include) AC_SUBST(am__quote) AC_MSG_RESULT($_am_result) rm -f confinc confmf ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 5 AC_PREREQ(2.52) # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) 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])]) # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_PREREQ([2.52]) # serial 6 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # gettext.m4 serial 17 (gettext-0.11.5) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2002. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define(gt_included_intl, ifelse([$1], [external], [no], [yes])) define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. dnl Add a version number to the cache macros. define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, [AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], gt_cv_func_gnugettext_libc=yes, gt_cv_func_gnugettext_libc=no)]) if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], gt_cv_func_gnugettext_libintl, [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias ();], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], gt_cv_func_gnugettext_libintl=yes, gt_cv_func_gnugettext_libintl=no) dnl Now see whether libintl exists and depends on libiconv. if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias ();], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" gt_cv_func_gnugettext_libintl=yes ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if test "$gt_cv_func_gnugettext_libc" = "yes" \ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ && test "$PACKAGE" != gettext; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. INTLOBJS="\$(GETTOBJS)" BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE(HAVE_GETTEXT, 1, [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE(HAVE_DCGETTEXT, 1, [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATOBJEXT) AC_SUBST(INTLOBJS) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST(DATADIRNAME) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST(GENCAT) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST(INTLLIBS) dnl Make all documented variables known to autoconf. AC_SUBST(LIBINTL) AC_SUBST(LTLIBINTL) AC_SUBST(POSUB) ]) dnl Checks for all prerequisites of the po subdirectory, dnl except for USE_NLS. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_MKINSTALLDIRS])dnl dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) dnl Search for GNU xgettext 0.11 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU msgfmt. if test "$GMSGFMT" != ":"; then dnl If it is no GNU msgfmt we define it as : so that the dnl Makefiles still can work. if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` AC_MSG_RESULT( [found $GMSGFMT program is not GNU msgfmt; ignore it]) GMSGFMT=":" fi fi dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is no GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po fi AC_OUTPUT_COMMANDS([ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' fi case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= GMOFILES= UPDATEPOFILES= DUMMYPOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it # from automake. eval 'ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Checks for all prerequisites of the intl subdirectory, dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. AC_DEFUN([AM_INTL_SUBDIR], [ AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_MKINSTALLDIRS])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([jm_GLIBC21])dnl AC_REQUIRE([gt_INTDIV0])dnl AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl AC_REQUIRE([gt_INTTYPES_PRI])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) AM_ICONV AM_LANGINFO_CODESET if test $ac_cv_header_locale_h = yes; then AM_LC_MESSAGES fi dnl intl/plural.c is generated from intl/plural.y. It requires bison, dnl because plural.y uses bison specific features. It requires at least dnl bison-1.26 because earlier versions generate a plural.c that doesn't dnl compile. dnl bison is only needed for the maintainer (who touches plural.y). But in dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put dnl the rule in general Makefile. Now, some people carelessly touch the dnl files or have a broken "make" program, hence the plural.c rule will dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not dnl present or too old. AC_CHECK_PROGS([INTLBISON], [bison]) if test -z "$INTLBISON"; then ac_verc_fail=yes else dnl Found it, now check the version. AC_MSG_CHECKING([version of bison]) changequote(<<,>>)dnl ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) changequote([,])dnl ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac AC_MSG_RESULT([$ac_prog_version]) fi if test $ac_verc_fail = yes; then INTLBISON=: fi ]) AC_DEFUN([AM_MKINSTALLDIRS], [ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but $(top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) # lib-prefix.m4 serial 1 (gettext-0.11) dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/lib"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) # lib-link.m4 serial 3 (gettext-0.11.3) dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, dnl hardcode_direct, hardcode_minus_L, dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec. AC_DEFUN([AC_LIB_RPATH], [ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH([lib$1-prefix], [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib$1-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */lib | */lib/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/lib"; then haveit= if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) # lib-ld.m4 serial 1 (gettext-0.11) dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no fi]) with_gnu_ld=$acl_cv_prog_gnu_ld ]) dnl From libtool-1.4. Sets the variable LD. AC_DEFUN([AC_LIB_PROG_LD], [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) # iconv.m4 serial AM4 (gettext-0.11.3) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) # progtest.m4 serial 2 (gettext-0.10.40) dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # isc-posix.m4 serial 2 (gettext-0.11.2) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. # This test replaces the one in autoconf. # Currently this macro should have the same name as the autoconf macro # because gettext's gettext.m4 (distributed in the automake package) # still uses it. Otherwise, the use in gettext.m4 makes autoheader # give these diagnostics: # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX undefine([AC_ISC_POSIX]) AC_DEFUN([AC_ISC_POSIX], [ dnl This test replaces the obsolescent AC_ISC_POSIX kludge. AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) ] ) # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. # Test for the GNU C Library, version 2.1 or newer. # From Bruno Haible. AC_DEFUN([jm_GLIBC21], [ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, ac_cv_gnu_library_2_1, [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif ], ac_cv_gnu_library_2_1=yes, ac_cv_gnu_library_2_1=no) ] ) AC_SUBST(GLIBC21) GLIBC21="$ac_cv_gnu_library_2_1" ] ) # intdiv0.m4 serial 1 (gettext-0.11.3) dnl Copyright (C) 2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([gt_INTDIV0], [ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], gt_cv_int_divbyzero_sigfpe, [ AC_TRY_RUN([ #include #include static void #ifdef __cplusplus sigfpe_handler (int sig) #else sigfpe_handler (sig) int sig; #endif { /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ exit (sig != SIGFPE); } int x = 1; int y = 0; int z; int nan; int main () { signal (SIGFPE, sigfpe_handler); /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) signal (SIGTRAP, sigfpe_handler); #endif /* Linux/SPARC yields signal SIGILL. */ #if defined (__sparc__) && defined (__linux__) signal (SIGILL, sigfpe_handler); #endif z = x / y; nan = y / y; exit (1); } ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, [ # Guess based on the CPU. case "$host_cpu" in alpha* | i[34567]86 | m68k | s390*) gt_cv_int_divbyzero_sigfpe="guessing yes";; *) gt_cv_int_divbyzero_sigfpe="guessing no";; esac ]) ]) case "$gt_cv_int_divbyzero_sigfpe" in *yes) value=1;; *) value=0;; esac AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, [Define if integer division by zero raises signal SIGFPE.]) ]) # uintmax_t.m4 serial 6 (gettext-0.11) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. AC_PREREQ(2.13) # Define uintmax_t to `unsigned long' or `unsigned long long' # if does not exist. AC_DEFUN([jm_AC_TYPE_UINTMAX_T], [ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) AC_REQUIRE([jm_AC_HEADER_STDINT_H]) if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) test $ac_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, [Define to unsigned long or unsigned long long if and don't define.]) fi ]) # inttypes_h.m4 serial 4 (gettext-0.11.4) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([jm_AC_HEADER_INTTYPES_H], [ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1;], jm_ac_cv_header_inttypes_h=yes, jm_ac_cv_header_inttypes_h=no)]) if test $jm_ac_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) # stdint_h.m4 serial 2 (gettext-0.11.4) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_STDINT_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([jm_AC_HEADER_STDINT_H], [ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1;], jm_ac_cv_header_stdint_h=yes, jm_ac_cv_header_stdint_h=no)]) if test $jm_ac_cv_header_stdint_h = yes; then AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) # ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], [ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], [unsigned long long ullmax = (unsigned long long) -1; return ull << i | ull >> i | ullmax / ull | ullmax % ull;], ac_cv_type_unsigned_long_long=yes, ac_cv_type_unsigned_long_long=no)]) if test $ac_cv_type_unsigned_long_long = yes; then AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, [Define if you have the unsigned long long type.]) fi ]) # inttypes.m4 serial 1 (gettext-0.11.4) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_INTTYPES_H if exists and doesn't clash with # . AC_DEFUN([gt_HEADER_INTTYPES_H], [ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, [ AC_TRY_COMPILE( [#include #include ], [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) ]) if test $gt_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, [Define if exists and doesn't clash with .]) fi ]) # inttypes-pri.m4 serial 1 (gettext-0.11.4) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. # Define PRI_MACROS_BROKEN if exists and defines the PRI* # macros to non-string values. This is the case on AIX 4.3.3. AC_DEFUN([gt_INTTYPES_PRI], [ AC_REQUIRE([gt_HEADER_INTTYPES_H]) if test $gt_cv_header_inttypes_h = yes; then AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], gt_cv_inttypes_pri_broken, [ AC_TRY_COMPILE([#include #ifdef PRId32 char *p = PRId32; #endif ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) ]) fi if test "$gt_cv_inttypes_pri_broken" = yes; then AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, [Define if exists and defines unusable PRI* macros.]) fi ]) # codeset.m4 serial AM1 (gettext-0.10.40) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET);], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE(HAVE_LANGINFO_CODESET, 1, [Define if you have and nl_langinfo(CODESET).]) fi ]) # lcmessage.m4 serial 3 (gettext-0.11.3) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995. # Check whether LC_MESSAGES is available in . AC_DEFUN([AM_LC_MESSAGES], [ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi ]) steghide-0.5.1/tests/0000777000076400001440000000000007743177376010245 5steghide-0.5.1/tests/data/0000777000076400001440000000000007743177376011156 5steghide-0.5.1/tests/data/pcm8_std.wav0000644000076400001440000000432407627445707013332 RIFFÌWAVEfmt +"Vdata¨zŠ{{z‹{Š‚‹Œ‹‹†…ƒƒƒ|…yƒv€r‚s…v†x†yƒw‚{„}yyvuuvuytypvktnuuwyt~r~s€v‡yŠ||Ž}Ž‚Œ„‰„‰†…ˆ€Œ{‰vˆuˆtƒqqƒuzy{vwttyw}ˆ‚Œ‚Œƒ†’†Ž‰‹‹‡‹ƒŽƒ’x“wŽy‡……€‚~~€|€x~s€s€o}kyjqinur€qm}g|b|f~jzhpgigfjipmslsovsyu||~}zzz|z€u€ky]tTrXrZt[p[hZm]pgonrnqots}u}r€o…n„sŠ’Š‘’“’–š”ž•›”˜”’‘‹‹ŽŠ‹ˆ‹Š‹ŠŒ’‹Ž„‹ƒŒ…‹†‹ŠŠ‰…††‰‹Šˆ–‡—…”‡•‰™Šž•š—š™š™›ž™Ÿš›£›©›®›¯ž©˜ ‘šŒ”‰Ž‹x‡x†|‡‹‚‹…Š‹Œ‹ŒŠ‹’‹’Œ•œˆ›…ž„¤‚Ÿ†œ‹˜–—’”“ޒЉŒ‡ˆ„‚€{|rxnsnorowp}m~e€`‡bŠdŠg…eybtcrcuhxjtgxjmn‚ml}msxtuntiwjxpwmpgicgbffgfhaf`g_k`n`qZq]rhwp|z‚‚……„‰…‹‰‹ŽŒ„Ž~Œ€‚’}‹|‡~‡~‡z~tvuxwytxqypwowszvwxt|x€zƒ{‡{‰{‹‚…ƒ„‰‚„ˆ„‹‚Š~€ƒ‘€”~”}•€—†‡…|{vvurwqxq{pzmxkwiumvvwyryn}nƒo‰uŽ|Œ~†ƒ‡‰ŠŒŽŠ‰Š‰…Œ}ˆuƒn~myouqsuqxn{k~e~e€i€jzkslmnmrrutyszszu{x}y{yy|z{ytwozj|g}g~g{g{k}k}jylwouoroplngocp\nYk[natixmztz}zƒ‚Œ•‘‘’“™˜š™™”—–”œ–Ÿ—›‘”Œ’Œ’Œ‹ˆ‹„Š„ŠŠ‰„„”†–‰—Œ™™ž˜£žž™›˜™Ÿœž ¤š¥–¦–§”¦¤“¤— ™˜˜’–Œ•‹™Ž—•”ŒŽ‰‹†ˆ„…‚…}‚z€xspˆqq‹pŠuŠ}Œ„‹“Ž‘Ž˜š’—’‹‡…ƒ…€‚ƒ}}xrxl{i‚iˆi‰f„`€_~c}h|jvgrfwls„s„pm€m„q„v~vrrjrlunvounrnpprprnqprstwxv}lwar_t_t`tbrbkfiklootsrtptszt~t‚w‡zŠ}‹€„’†Ž†Œ…Š…‰‡Š‡‰„†|v~w|x{uwsrusxszty„{ˆ~‹‚‹„Š„‹„‹„Œ…Œ„‹‚€‹}’€˜”’‚~‡}†~‚~€}‚}‡}Ž€’Ž|…u~r{qztuxju_p]tdyi{gxhtpvu|~ƒ„„ƒƒƒ†‚ˆ€‹~‰y†x‡x…{„‚‚ƒ{‚u†q‡m„k€iyhuiqjkjkoownyqytytyx{|~}}{v|sp€noi|dzhyhwhwlxnvtxz{y}z€x€n{fveufuhthsgogmnqyz||xzy||€„‡‹ŒŽŽ–‘ž–Ÿ–š’œ“œ•™š™ž”™Ž’norowp}m~e€`‡bŠdŠg…eybtcrcuhxjtgxjmn‚ml}msxtuntiwjxpwmpgicgbffgfhaf`g_k`n`qZq]rhwp|z‚‚……„‰…‹‰‹ŽŒ„Ž~Œ€‚’}‹|‡~‡~‡z~tvuxwytxqypwowszvwxt|x€zƒ{‡{‰{‹‚…ƒ„‰‚„ˆ„‹‚Š~€ƒ‘€”~”}•€—†‡…|{vvurwqxq{pzmxkwiumvvwyryn}nƒo‰uŽ|Œ~†ƒ‡‰ŠŒŽŠ‰Š‰…Œ}ˆuƒn~myouqsuqxn{k~e~e€i€jzkslmnmrrutyszszu{x}y{yy|z{ytwozj|g}g~g{g{k}k}jylwouoroplngocp\nYk[natixmztz}zƒ‚Œ•‘‘’“™˜š™™”—–”œ–Ÿ—›‘”Œ’Œ’Œ‹ˆ‹„Š„ŠŠ‰„„”†–‰—Œ™™ž˜£žž™›˜™Ÿœž ¤š¥–¦–§”¦¤“¤— ™˜˜’–Œ•‹™Ž—•”ŒŽ‰‹†ˆ„…‚…}‚z€xspˆqq‹pŠuŠ}Œ„‹“Ž‘Ž˜š’—’‹‡…ƒ…€‚ƒ}}xrxl{i‚iˆi‰f„`€_~c}h|jvgrfwls„s„pm€m„q„v~vrrjrlunvounrnpprprnqprstwxv}lwar_t_t`tbrbkfiklootsrtptszt~t‚w‡zŠ}‹€„’†Ž†Œ…Š…‰‡Š‡‰„†|v~w|x{uwsrusxszty„{ˆ~‹‚‹„Š„‹„‹„Œ…Œ„‹‚€‹}’€˜”’‚~‡}†~‚~€}‚}‡}Ž€’Ž|…u~r{qztuxju_p]tdyi{gxhtpvu|~ƒ„„ƒƒƒ†‚ˆ€‹~‰y†x‡x…{„‚‚ƒ{‚u†q‡m„k€iyhuiqjkjkoownyqytytyx{|~}}{v|sp€noi|dzhyhwhwlxnvtxz{y}z€x€n{fveufuhthsgogmnqyz||xzy||€„‡‹ŒŽŽ–‘ž–Ÿ–š’œ“œ•™š™ž”™Ž’steghide-0.5.1/tests/data/std.jpg0000644000076400001440000000541307672100610012343 ÿØÿàJFIF__ÿþCreated with The GIMPÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀhh"ÿÄÿÄ3!1A"Qq2aB#‘Á±$3br¡ÿÄÿÄ!!1Q"AbÿÚ ?[ ¡&Ft\w ŠÍÍúSE¹vè]O»<àn§ë$m´íÿÖ‰†DXò‘…ŸI׌¥(ôÏJ8£F ÿ§ìÜÃ|vÿä„WQ§sƒ“¨ #·¤ÖóríÎòj‡±b°ªy§ìï}ô_ÓK¥G9”¬—xu(Øí&@w±ì=é‰lðˆõá*¿qçØ‘HÝ»c(Ö’öíáUÝm6?qÏHÖ:`f{~kÝnòH[ „DG‚ !½œInˆê[hʲùTlË“#M¤9¹×ȇNG r£Í¤ÛÅq²ð\¤N{©9#æ±_Ã,Ë‘Ô/?浨"eYÃëFQâv9Êze©o/ô»Ž½¼¶òDÞ’Êy‹»Öï=L.gµ}ëN´ºBŒN[à MyúkNÔLÄ-%OOR1ß"Ÿà»EgŽIhÂ.±{ßêàö'ƒR´2~…½PZà•GŽA©Z<˜™ìuq8Yeö€Mš”ÒJÖÖÏž7“â¼ÒÿN0^äH­ÎÆ+Û­³í¤]ÝÕÁÍd|yhØ›¡Üvwí'rA«ÒxW9÷ÝYV»ýOo#Å‹•QÊhk}_’XÒKw›Šð+¼m«°<‰vlú7j3Áv;³J沞[•–êöVbp8ªåÔ/ìà2Jñ°çG5Üw·/f™ö‚¾Ÿ4©ŸÈ‹é‚_XÍ,N¨’¼Ç9¥Íg*BÛ‘¶‘’¾E6¹¾¹@Œ’bR¹qM Ö:IrY\FÚ¢me%FjKºŒ«v9æè÷l]-…ÙgîWª‰"õI"2Å£öššd ÷Ïujë¹IœqФ­‡êF˜ÇxH‹÷+ø£"ˆ=£“o¶B1“Žk%¨ëøŽ+Õ N=5}ž¥5´(ìO;ÅEÁÕ›^hÅìwj— ‡s)|ãÞ¥[cr·‰´È#“98©R¢±š’´[õÊB8+ÝÜP÷Œ†fŽ9B!»sŸ?â³wš„Ð\²‚Û³ûhK{ÙÉ)´æ¨±·ÐÒ_J–÷&UšTÀÃlüÓ;8 ³É&îAÎ{Ö*}`ÍN™PG|óZÍ:ök}*Á˜É>ÿÍ4àâ•’–X¢½@M§Hú¢n6¸ã?Š¤É RÃzg”7ƒíŸÆóÖyNCŽÍÚƒ{EkT·˜ %[ÛÜQƒ]3 é7EJ!Œ¼$@ï<Ñv’âÙ=°É1Œ÷¥‹bðclŒAäø&»i —ÊQÏL\mþ(´›Ñ2Ë›{q<Œ²2¦w•i>9ö  ?Ka4“ "a'8ý⊕•ã’Ü‚  ƒäך” –£bã`HàšnÎEo6©©™#$ó¹¸íOŒF8zòíhÆ}.±úÅGŽ8] ãq 9­7SÙtîÌR àc4fÕ—I8Ò)Ó/#ÿqˆ– óR¨M)ïJ½‰ †åÏí©SiĤ–ŒXžS.z‡žç4ÖÛK¸»UeC†Þݪû=[Ûçv„$a¾ÓÆê{ˆ"†1°Ã¶CØŽàÕ2dÝD“ËHÊÃhÍ|°H¸!½@ûVúÉí§‰-án|<Òó¥ÕÄRˆðcäIžOÍ’Æ…âªy%9ȨÎ|„ym¡hãèÈæ=;—à C¨^²j&ÞG· âœ[´×ßQ›0wßæ—\i©ŸõIÒ9_Îk¢ÕìYogŠÏIüîlnÙ[xQÀ€JÄá[>4¦âøÜÇ-º)êgxÀäDXȯo‡wÕËmÍW艰Ý;©12¸Û³*ÇŸš¶6]@¼rF2‡'[Ha€±fHãmÄ“ÕÂI<íÖ·„)’=#a6÷AØ´Q’íe>ö¦(,î`Ì2lãÞ”Ø/Zâb©°îÉUa“Lí-]Ö^¬E˜•PFO摪e1ú/]:þtú!88©FZ_Ș€XÏÛöñR›“F¥é‰/.d >×àºwCK¥ˆFeWu`—ÇQéÉ4Ûƒ2Ž@8 Uwᘸ·‘$~ØuÁ#ò)UkV(ÓLp$·SÿTïÂ"öþÔÛê „¬»'kýé\:ŠôÖ$¶ 2œÓ(eµžYºÊ m9½¿šiÝÛ@/·’êBè ú»¶1‘FͤÅqÛ‘X Ãw'â¸Ñ"KidY&H£ œ/±£&ÌèTãÇ~Õ9%lG}¤ÆpÊ$ëÍ.HQfg´˜€ûšÑ0ŠÚæ)Â’+1<X_r7±Þ®‡ûÓã“zª µ—aXœ}[ÇoŠ"ÎñྖÎV-»H#ÍS³"ĨìÏŽ@ù«.4Û‹«‹{˜#% üÿö©¥ØÚ]¼#K¿…ĉ¹TàS­ê{ˆã‘ÎIÉøªïtƒsÒ"HÌ‹…+øù®/^KYà´¶RÛNïHÿ“S•MZ Ó´mãëà 5( kÀÒ€açœóR„ZfÕ’Ìx†K HÍ,9B2}D‚ =å¿Òh£~øûS £ ͇^4èÌ€÷’òÊ2û׃ŽAnÿšäb’§¡&¢#†ê6ØÂ'$…^êÍq;˜d쯇vÅYr×Bá–7RG¥3ŸÍa ·Eiܳnþ ñƒíWº[ïO¼†iÑ·OgIäšfº¬ªî »vGܾ+;« @U`B¿ïZªÎÞ[@³9ÂŒ‘ãMr cùn^öõ>’NIÀe~h]KN{Xºó‡”œ‚Êrûþ)…¤P騡öFÙûÀïK¯u;¹RàD:gE$nþ½ ö$²I'½HñÔC„Ûœm·ÞÞVDB#Dß?‘húM“®Vf<¶ŸÍ;Y¡¶†F#׎A9þÔr¸ÉÐAEì¯$…ÞB¸ïüÓ¯WèBŠ´åI䟚C=´w¦Éš1ÎAìjý&ÚG°&y•2£p©Ê1«9 t«§x7cÞ¢x©W-¸KxÒÈ2Ê­ÙªT§z –$¶«Ô³º ºœ#"’ÞZ¤LK†8ÜO©R´ 6&ºœBèÎCã*J÷#Þ‰± "²Fåñœwù©R«%õ±@®!inb´‹Õ)!œûWwkô—m÷ï,§œT©]{H_Фê^Úïy60\¨sÞ»0mþñä‘äT©SäÓ£–‚´˜´cRÁ†àÞ~)¹¶µ¸¶+3í—â¥J¾E½tÙn’ti±†Æqâ‹K2-–)X&Ì`¯“R¥,¤ì4u%È€»n·Œö"¥J”cÖÀÿÙsteghide-0.5.1/tests/data/pcm8_std.au0000644000076400001440000000450407640356462013134 .snd %@16.wavùøûÿüúùûÿ ÿþÿþüùûþûø÷øûÿüÿ÷öùøùý üööùýþøõýý þü ûøöñëîòõý÷ïëðõûýøùñéñþøø üûÿ òô õóþõðö þñîøýþÿýùñëô üÿ þûôêñ ôöûùöðóüüóíïôøÿ  üûü  ý ýÿÿöøÿ)+ üôññóòìååù ÿúúùüúöóóöóóüþþüíÛØæÿ    ûôðõúðÚÐØáôþëîøü þÿþ÷ þÿ÷éáæñûòåÚâòû ÿýù +3'àÞåâãéðèÑÁÊðÿóëî øéëôüùþ ûðíòòòú  ÿþ  (úõôþþ÷õý!éåêù íÏÎÞõþüþö ôëãÚãêßÝåçèèåàäö  +%ôøþ(-! ü÷óñ÷üúöøõìñýñâæíó þóõ øèäù ùîîøþ  øèÕÙé÷ñ×Óãú üù òæëü ý÷ýÿüôîêðùúõìéô ÿýüþþôòú õâÛâíòìáßåíôøÿþöòõùý  üïíðõýü÷óòøüûõõþúîèîþ  ûðïúóççïû  þýõíâÖÝ÷õâÝÝåòúý  þþ þþýÿýñèö ÷üþÿ ÿüøýüñðð÷þøïâÝçéíü  ýïêîòñíæãêôü øóÿ öäãìîõ$   úðîðóðãáîþ ûýû þýýûöû ûïï÷ý÷àØÞâñøðëïþ  ÿúùùøóóòðùþ  ýíõúóïðý  ÷öøúûùø÷öõöûÿÿþÿ õï÷ÿûøúúüûøûûôíë÷ ýýûùúííðïïõ þýþÿýü ÿ ÿúîæèìóùùøüþøôøý ýþÿüôíñû   ûóóññõüýùû  ÿýûüùñòú ûöùý  ü÷ûÿÿýûúùøøúýûùûú÷õ÷ûÿÿûöñò÷ÿ úú þûþùùúþù÷þÿüúúþ úùÿ ÷ïú"ÿ øóöûýúôòôöúúôñ÷ýøìéîñ÷ûûýîéûû þû  óïóø  öò óèïÿþú÷òóøý ôîõøùüíåèìôïåòýéìöúÿ ýÿ!þû!(,& ûöÿýêäîùÿûúöõøûùôïñôøþüõïôþüöûÿúýïõýóèê÷   ýøòö  ÿýùúøôøùò÷òëö  þöÿ úøûÿüùüöüüôèðþöîÿ  ÿ    ýþööóéæðû÷ïêéóôíïùûìçðöÿ  ÿü  þõêòúü ýôøúüúôöüüýþúûÿùðîñöúúòïõñæéùþéàëó üþøôøý ýþÿüôíñû   ûóóññõüýùû  ÿýûüùñòú ûöùý  ü÷ûÿÿýûúùøøúýûùûú÷õ÷ûÿÿûöñò÷ÿ úú þûþùùúþù÷þÿüúúþ úùÿ ÷ïú"ÿ øóöûýúôòôöúúôñ÷ýøìéîñ÷ûûýîéûû þû  óïóø  öò óèïÿþú÷òóøý ôîõøùüíåèìôïåòýéìöúÿ ýÿ!þû!(,& ûöÿýêäîùÿûúöõøûùôïñôøþüõïôþüöûÿúýïõýóèê÷   ýøòö  ÿýùúøôøùò÷òëö  þöÿ úøûÿüùüöüüôèðþöîÿ  ÿ    ýþööóéæðû÷ïêéóôíïùûìçðöÿ  ÿü  þõêòúü ýôøúüúôöüüýþúûÿùðîñöúúòïõñæéùþéàëó steghide-0.5.1/tests/data/Makefile.am0000644000076400001440000000035407735612012013106 EXTRA_DIST = \ os21x1_std.bmp os21x4_std.bmp os21x8_std.bmp os21x24_std.bmp \ win3x1_std.bmp win3x4_std.bmp win3x8_std.bmp win3x24_std.bmp \ mulaw_std.au pcm8_std.au pcm16_std.au \ pcm8_std.wav pcm16_std.wav \ std.jpg prog.jpg \ rnd100 steghide-0.5.1/tests/data/Makefile.in0000644000076400001440000001762707743177331013143 # Makefile.in generated by automake 1.7.2 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_INTLDIR_FALSE = @USE_INTLDIR_FALSE@ USE_INTLDIR_TRUE = @USE_INTLDIR_TRUE@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_cv_prog_doxygen = @ac_cv_prog_doxygen@ ac_cv_prog_perl = @ac_cv_prog_perl@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ EXTRA_DIST = \ os21x1_std.bmp os21x4_std.bmp os21x8_std.bmp os21x24_std.bmp \ win3x1_std.bmp win3x4_std.bmp win3x8_std.bmp win3x24_std.bmp \ mulaw_std.au pcm8_std.au pcm16_std.au \ pcm8_std.wav pcm16_std.wav \ std.jpg prog.jpg \ rnd100 subdir = tests/data mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = DIST_SOURCES = DIST_COMMON = Makefile.am Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --foreign tests/data/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am info info-am install \ install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: steghide-0.5.1/tests/data/win3x24_std.bmp0000644000076400001440000001546607613727351013664 BM66(00  wny‚mq‘EO¶?Z Idkiqdirlks}np}_^qc\€r^sq\u€\ac\°{T¹‚c—okuS†xU©{fÁtU¼b©’k¿‰[ЃMÈ‚RÂ{TÀvQÃxLÉM³^€”Xd¤T` G^š@h’AyIƒ†L‚ƒN}‡PrŒJr‰GeC^Fd®Tv±c…©m{u}ER¡EP»C_ Pintvjovyot€ed†`YŠY[MTŽJUŠLW‹XR†hXzkQ}mOvH’|W«xg¼vWÂgº“dЃPÉ„P̓QËTÆ€Z¸zUÁpMÒ|P­‘Zp—\gT}T™ƒR«„K¯ƒN®„O­‡T¦„T‡Ry‰Ot…G_•Hg³Vy¹dƒ\hŸ?TžCV°C^˜Qdpsqjjoxkm‚__ˆQT“?T‡;P‰;R“:TB^ŒNY‘dV›vY˜}X‘ƒZ¤|dÂuUÈ€\Á†dÒ€ZÍ„JÓ‹>Ò†CÊ‚OÁ„^¹qRÓpH̆Wˆ“^q˜^ŒT±ƒX¯ƒM©~V¬}T°}M½†P·…P—ƒO‰†Ou…Db—Gp®ZŒAO«BZ¦J`·Qi™Tcxjmoejyhh‡[`Š@RAY“Sh”ViI\Š;M”GV“NY‘T\›i\˜€] }a¹uYÆyUÉ`Ѐ]ÓƒRÙ„YØ€Q̓S¾ˆ^»pVÌkGÜzO¤^v”a‰†Z †\›ƒW™„c¤a¸€YÂKņJ³„U‡€P{ˆLj„Ea–Jœ=N¦D]®N`¹Tf¡UgzZhp_e}hf„QX‘;X•Ve•O\OX‘\b‘I`‹]„A^‚8Z….U„4KOU¸\a¡R_¤Vd­YY©X\“LcŠDW§IM®P?º\CÁ[MÊaDÌ_>Ì]EÍ_HÇbIÀfM¾mR¶qWµuW¯zX¤~WŸ|Wœ\ŽY„W†ŒYv€Kl{Om‹m}t‚y‡®?sn5Sr3Hm.Af.=]1Xh1JU.?B3>91;?.8A(RœNXšZZ³`_º_a¹_h¥_Z [O­WTŠC`‡=S²F>Ãc3Ã[5ÁUK´SU¥WQšUT“QPŒOM‡OL‚OM†UL‰aNˆmS†pK‡rM„qL‚rL|nHwsKb‰s›k„‚zN…{^8OW0AA4@PI[LC`G9\,.B-(>D,3a)6h13m2Ao0Hz;QO[œRR¥]Y©__­`a§_U¢YQ£T[…>]}=Y¯H6Â^?µXKªXK¡TLžLM›LP›LV—JS”MNŠMJˆQF…_HkL~fB‚fIƒdI…gH„iFqtMmŠwœem††asoT8LC8@LGWs\sš{–‘{–]Kl'K2'BH#:]&.j0=m1Ep4G‡@UœR^PR¥US¨XT¡VOžVU—N\x5[‡B]¨K4´YE¥KSŸKQ›JRšFW™DY“>Y‘;\Œ:[ˆ?Z‹FYŒRTˆZM…_Jˆ`N‰]OŒ_P…^K}mTf}l{zƒoˆ€a|ph8SO9DIET‹zŒt‡Žsˆšv‘4+Y"&@9%0X"0i0@l1Ji+Mn.O‚=\—La R^ŸS^›R`J_}9Uz:\—FS©S5¦NIHM£KQŸEU—t‰@r|;i€Fe‰U`ˆVVŽ\YŒVWŽTYŠYP}dNktXo†ofŽ„\“ˆŽKrN|€;n„Dc‰UcŠW_Xd‡K_‰L]uVWwdXwm[nzch„j¦J{RzfKhZHdvTu¡cˆœjW#?C1b+4`#Fi"Je'Ti'Wf'\g,ak-_j._u0_s:[„DW“B@«X9ªQ@ JL¤CP'W™ U–*G”/H•5Iœ9P¤9Z 6c—3w;€‚=m‚FbŒUp‡Pi…H]€H[{L^wS]u\Z{eX€nU…Ku¡Nx®S„¯U¦X{¤h…M3g M #:M.b&;bHmC_BO6B3E7O:U%E_4MpGQ‹@?¨J4¬a7O>¥HQ (Z˜#N™1J•7C‹4Hˆ6AŒ:>š@E¢?R7d”4v’;‚‰@q†Eg‡Kb†I^}IfvEesJcqO^qQ`qR]VAm‡P€ŒY|ŒUlEy)TG D("6U0` >eHe8F 2.5+;.>39A1W(?vCI˜?8´W5¨\/¡PC¤BM$L˜+J“/Oˆ"P‚#P‚+Rƒ3Lˆ9DšAF¢@Sš4g”1‚Œ;~ŒEl…G^HezCpx>ty=wz>vvAvvCy C GCE H KC)6+.\8c!?cCU 115FNH B5C@4b1BƒBA§Z9®W2¬KEž>H•"G”(TŠ"R#T!S!Qz*O:M‰9B¢GNš8X’1zŠ<‚ŒHm†Je|Fq|>vƒ:…†4‘Œ7š:¤Š:§ ? B B E @:&8$4/+Y6f!HaDO 2% <(T3T8Q(BE=>I4z;IŸS9°Z4¢N@ž@D%G&SŽ,H¡B>@;’3EƒVu1M7L’?H§BT’0sŽ>€†@n@k…Bz‡>‘1š‘.«Š7§—:œ›? B @ =#4*1&3"9"7/+U1]G[FQ 18:7G5D@O4HE/CB/g2D”M<¯[6¥T@ŸGD‹&BŽ&M“.DŸ@4ŸT6—H@‹%Tv'Kƒ=U‰7F¥@T’0pŽ?}†>jˆBoŽ@‚“/–‘1©™9 °L\ƒ–cƒBCC4#5703+-K3Y?[MU6G6@6A>GL;FD#KE!1V'>ˆHC­^9¥W;¦SFŽ4=)Dš/C™6/™T.”T4Ž1OsI>Y†8MŸ:Q’0l=~Š>kAu5‹‘-¨¡:›XІxirr?VP!BH887$."%**6=6\8XI_EVDT@VLNM<?&FMN&3P"<DH¨[6¥Y6¥XD›J?“,<˜'=ž69ŸS4–[29NkGy;Wˆ:Tž8R”2k8‰9m—@˜0˜›1¨˜W‡Žro…tp—pi”ph)F(%K'A6"1"'#!""*-6E8X":`!=[EQGSHHH0DL.NF-2J%9sAG–MAª[<¢^8¨UFŸKB—E8šL6ŸZ-’O7ƒ3NnAy>Uƒ>Pœ;P™4n‘4€5s–9‹•/ª¤>™lnœmm°\k·Nq·Ol/F!,F'&G8,$(&% $,.&(43B6N?OJLLDH.D#JI7!LI(0R 6b=IJEžY?¤`8¦b8¦`;£[9¢[7œS+H8y,JgB~?U†=NŸ=Q›6n3€‘4x›9‘—/©¦OŠŸrmªZp¿K~ÈJËI†FR{"0I"+H%.G)3&4.3+--.01, '% /. 3070>0@(AFK'M<,ED$.P2V1Gj@KNE‘Y@¡_8¢]4£X4N0ŒJ9‚*<) 9% 8%=#AEK#X8$V;0=>(1D/L6X1Ib@MpJH}NBP;†P9ŠM%/G#L:U,Jg©/Ÿ–(¢S’‘kŠm£tg¥@Gm!-L#2D%:9'4I%NSO'a"7o-At,6o!0e53`=._=+R?&=C#/P+Q5R:X;^Ca#Cb"B_B]Bf(K{9X‡;W‘8G™CI¥EQ­>]•1€Œ.‰¥4š (­¦4¡ºI†½D†ÂOލ1 ˜*¢•Q•‘a‘Œm i«NO} -Q$1N$;G#9X2Z"SWDwS{'U{/Ku,>jB9fD.f<'S@;K-\":~2Q>`ªCe¦Ee¤F`£G`š>\”^G`B`<`8a,bBl€€—’!‚/VsC?hX1_`'R6]Gf–F\{^h€wx}†t~‡p„yuƒds…R]ŠGT¤Ri´Zu±Xo¸Ti²DZ¯;a¥3s¡2‡™(Šœ( )ޤ(¤&‘£%‘¤'¤*…ª4~:V@YG]KbJeJf Kb F_>\7[5eVrƒ~$„4RtZ=ci2W:_E^OdŠco}tx{xyysvwqxtv}{y„}€{{vm|ƒXbNc´^yµVoµKeµBc«8l¦;‚¥9~­;~¶B¸F}¾G~ÀJ|¾Jy¾Hz»E|ºNyQiToRoSn UkUjSoSqKk>b=dly"~=SwV;b5Xˆ=[?_qDieGiaGgiGjeHkoDgpEftXsml{it‡zƒš{wŽ}kq…Tf³\wºPk¯Fe±9q¬5v¬Cx¿EyÀBm»?a´@\¶@^¸D[¹E^ÀGjÄLt¿Tu+OKPI"QM'PO#ST__[hWuZuDgWplz7_uW:ef5ZoCaZ[tSoŒMzšO€›T~šZy›Zoag‡i^€n[}jddl‰f„œt‚—pxak¯[q¸Hl³Bp°;nÁFyÁDoº8[°:N­=F²=F®EC¯OB³RF´JI¶GT¼GUKz\"cKNIMK)SM&YQW_ZibmDf_r1qƒNLkX0X]TmK}ˆK”™bŒ—j†Žl†‰hˆŠf•e“Ÿ^‹œ[‚ Ss›[m\p’l†Ÿ…„—rz~cl«\q°EiµCt¾Fx¾Dp¯9Yª:R¬CW¯J]²Kb±F\°CO°HF¯PDµUG·aQ‰m€j dYRI"QI(ULSVd\ qiFhiv6e{fGj_QpA…Š^—›Šw€wƒ~iŒ‹W’ˆ\…n{~o„‚r”Ži‹o‡ž`„ bƒ k‡ž†€’…qz€bk®_t°GjºIuÃIwµ=cª=X¯J`¾RpÀOs¿Pv¯V{¬Sv§GZ²LI°PCª_Osbƒj~hbTOF"UP"UTjR#|dHilu9awpLqMg{V“”ƒts„R‡p={iQub[xea‰w[r{_‚r“q‰y’€ƒ›|•“wŒ‘r~‡`jµ`v¶Gj¾OrÅJrµ`³HdÁHkÄAlÁ?lÌAhÉCx«W‚¥Rj§PL¨[I‘ŒL|gue mf\N!SOQR!nY*™emfVu p†AVnPYp>‡‹†y„ƒw†dƒ–9‚’'^ŽbQmhkyl]k€X{„c–Žz~„’jw¦lz³jy«o~£mu¬iu»\w¹Hn¿Es¿ErµBi«>b±;bº;hÀ>oÆ?gÎ?y¯S†¥Ww¥OK¨]J¡„E‡j lbd_ XK!OQVU%yV" i"œzQk[v,qˆ1]rGgvGyƒO}‰E}‹'l‡^ˆj‡S€fl{kif…Xq€Vœ‡s‡ƒ›hr»hyÀfzÄh~¿j¼g}Åf‚¿W{»Hu¸BoºHoºJr¼Js½DoÀ>kÇHrÂC{¨X‡£Ss–OWªaKuŽ[qYa[SRRIOT^P,Œ_¨x­‡’„Pl Qw(n*t+kz)n{2q|#w~€/pq^{db}rdZ„\rT¦‚q†ƒ¢cs¾e{µc{µa{´c¸g‡½jŠ¿kŠÁ^ƒÂSz¾Nq»Lr¹Lq¿KpÉKrÃLy­P‚b…§N_]@ƒ`D5‰dZUPUO[Q[VT#tR!¢l²{³‹³‘(Ÿ•h{JnPt[‡eŠk~_r@ZZ_qeVi\o}qR‡X~}[®~ww€²c{³h²zŒ«‹ªv…«h~²d‚­bгc†»b‡½\ˆÃT„ÇL~ÃK{¸S~©W†£_‹¦Up¤QSŒ\bG9‘bWRPaUlY|Z]£h³o¹z'·Š+®)¨% š•”!|„ r~lw=hpTij:{pG~kdtzmRƒhgy[ |d«}k{·i¹”º—®|“¯|’³€’®z†¬i«b{¯]}²X€¸W„«Zƒ¢_ƒ¡aƒ¨g Vm©PV¦cO¥vR•]UiQ—n¡n¦g²i½oÆqÉx#Â|-¾ƒ%º•&±›% Ÿ&•¢¦ޤ…>}ybxpeizb[zuY‰XŒg[ºwd§x˜h|¹q…³€•´r•®r‘ªt“ª‘©‰‹«…–£x‘ŸoŽ o’rŠ™u‹¢n„¥_vªT^ SU¤`VoUŽ•bžkKsteghide-0.5.1/tests/data/win3x4_std.bmp0000644000076400001440000000236607613727351013575 BMöv(00€   Ô¹,4FWH\x,.5Rm–š“ŽçÉ’Qs¤ëïó V1EwUJÚ)jÓÿ¶3yÖ™™™—Tå@@M2ä$Ã2ýÐÝßÝÝÝ™™™yq$H $ÆRéMÝÔ ÝÿÝý™™gççžã@8LÔDD…ÂìíÿÝÐÝÿÿß™–¶yy~TOM Ãã>íýÿÔMÝÿÿ™{¶îîîT@LD$DålìÍÿýÝ$Ýßß™wvçw–$@VD$öHåýÿßýÔÝÝÿ™wáfžè4ˆâ@$9<ìÝÿßÝÝ"ÝÝ—wwk~æ$Rb@ @.,èýÿÝÿÝÒMØ—wqfwå"(ÃÐ@H3=ýÿÿßÝÝ$$wwwkkk$%è D@S?ÝßÝýÿÝÝD—wqffe3Eã$DL"OßßÝÝÿÝýÒwwwkkk0EÃ$†?ÿÿýýýÝßýwwqfffbHl$ LÌmÿÿýÿýÝÝýwwzkgã@ì€ æ-ÿÝÝßÿýÝýwwzffn掄àEÌ-ÿÝßÜÿßßýww{fknî4(æÄdSÎýýÝßÏýÿÝwwvçfn~âÆ‚H.äMýßßÿÿÿÝßwwwîf·îæ.eƒŽâ]ßýýßÿýÝÝwwvçknîînÈ3 BŒÈÿÝÝÝÿßßÝwwvîfgî~æå% 2îÏýÿÿÝÿýÝý—wvîîîvîîîf@ålÿýÝÏýÌýÝý—wv~îîîîîîæTCÃloÝÝÿüÿýÝÝëwvî~îîîîîî~nîîÍÝÝÏÏÿÝÝݺ»~îîîîîé~~îçîwÍýýÿÿÝÝÝݪºîçnçîîçffafçmßÿÿÿÝÝÝÝ«º¶îîînîîwwwwJmÿÿýÿÿÝÝЪº«¾îîîîçwwwwBoßÿÿÿýÝÓªª«ºgîîî~wwwwKoÏÿüÿÝ$ߪ«º¤«nîîîwwwwBüÏÿüÿÔE̪««ªJ»nîîwwwwCÿüÿüüÃüÿªªº¤ªª»¶îwwwwJÏÌÿüÿ /Ïÿªª«ªJªºº»·wwwBÏÌÿÿPEÿÿÿªªº¤ªª«º 6ff#µÏüýÔ_ÿÿÿªª«ªª«ªª5UU…Cýüó?ýÝýÿªª«ªªªª¤E…ˆCÝÒ(ýßÿýÿªª«ª««»°UUX3ÔMÿßÿýÿÿªJ««ªªºD2#TMÿýßÿÿøÏ¤ª««ªºª 2@P-ÏÏÿÏýÿßÝ Jª«ªªª2E2UýÏüÿÏÿÿÏß ªªªªª«0Õ4=]ßýÿÿßüÿÝ ªª«ªºªUˆˆ-øÿÿý_ÿÿÝüDJªºªº«"X…?ýüÏÿßÝßÏ@ªªª«ª¢ˆÿÿÿýýßÝÿýDªªªª«»@ˆüøÿÿÝÝÝßÌýDJªªJº£0XÌÏÌßßÿÿÿÏóDªªªJ«ª5@ÌÌÿÿÿßýÝÿÕD¤ªªDªª£SUU3ˆXÌÌÿßÿÿýÿÿØjDª¤DJJ£XXˆˆƒßÏÿÿßÿÿÿÿ3steghide-0.5.1/tests/data/os21x4_std.bmp0000644000076400001440000000231207616470064013467 BMÊJ 00€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿÿÿwww‡3W7ws™7s7y1wxsw3swxsaswƒ‰w“————›—·w1‡w‡7‡‰ƒ7—7·9q37w‰‡˜1‡xw28xw‡ys———3———›w·1‡ˆ2Swxy7wƒ—·x7—y·yys11‡ƒcsSxw—˜s—›—s“1“—7“1w77qx‡7p!x—x{—“9yy1“scw77ˆWQ8ƒ˜˜x313s91#7vxˆwP8q78‰‰q09y‘w5#yˆx‡1x‡˜¸‹w17“1swcC7ˆ—wSxqxx˜yq0qsw% 7uuˆq8‹‡·s111qy1ssrrss7yq!y‡˜w—1qsS37“'ssRqy93“y8›ƒSq1yy3srss77s““S‘—“˜“‰s—1777xw67Rsswy59999y·“yssSS“x‡psrRW“““““993““97——979xwcwrss‰991—“““—“—··xqww6747x9y9y‘9193µsswsSw7rRsw˜““19“‘199—·wwwswrwRxy9y199“y‡sw7vv667w·——y3“‘‘9117ˆwwwcswccsS[yˆ—“““1xˆ7'cwg'sGswywƒ99y“ˆ‡vwwrww'''—¹yy5“‘93Sxˆƒsrww'aaasx—ˆ‰y1“—5ˆ‹wwgvrww6668xˆ‡“8‡w‡‡scssu'7%%%7x˜ˆˆ0¸xwsgwgvrw'ccCy‡‡ˆˆ…w·ww677wwSwwww‹ˆˆˆˆ6ww7cvv6667‡ˆw8wˆøˆˆ‡0wwwgw7wwSWsˆˆsxxˆˆˆ˜ˆqSx‡sw7g'''''ˆwy‡ˆˆ‰93ˆ'ˆwwvsrWsRSWˆ77xˆˆ…1ˆƒSww§swg6447‡sy‡ˆˆ‰ˆwpwwwwswssrˆw8ˆø‡pˆw0ccz‡wv6v7psx75yˆˆˆw87swww7sg7ww7www7xˆˆsssssssswwsg67g'scsSwwˆˆ77·77w773sw7ww7wb7u7S777wsw7sssw777ssww'#Sw7q7{w72'7zs#c#cvw'7&44'0pCw‡70sv72600!crwgb@ !'370s$7w42rCscw 4 !`0`7q7S3ˆssc!a 4 $'w7#'gˆs!`40a $0% $0p#‡wprSˆs! 0 0c"CA %7ƒssscx60404!B%40`8w'r7C72! Rsteghide-0.5.1/tests/data/rnd1000000644000076400001440000000014407642652327012010 t•XÁ8qGúɨ½ŒMk¦%cõšóB—`Ê^ø†‡MR¨ iQ_ÇjºZÞZcd£AŒ€]ò<½:Å5¤ ü°v¿7^<))uB&BDƒN?P§ÃAZÛ¸0steghide-0.5.1/tests/data/pcm16_std.wav0000644000076400001440000001250607627443776013416 RIFF>WAVEfmt +"VdataWþôýÇý#ýµüÛüü±üXÿ€ÿŽþœþ¿ýþvÿˆóø‹åáÔ®€ëc~þó aÙlÖ ÿïýeüŸü=ýþæþøýòý¬ýmü†ü’ýÈþ)ÿùþÿ:ÿ/ÿÖÿ×ÿAÿn¹áqFõÄÉ‘“â¿ìþÿ¡?„ÿ›ÿÔÿyÿ)ÿÝÿíq§ÿsÿ”ÿÆÿGBÛ˜PõÝ”"aÿ©ÿöþ[þ³þE×ÿÊþC/ÿyýÿM-þ©ýÚþíþ%ýTü—þÿÝý„ÿ>ÿ ýÂýøý«ýVþ‘þ¤ÿ€úF€ ôÍ}š_Ž‹¶—y{F0ÿ:^9þÉÿ®ÿ#ý¹ûüÁýDý´ûùû²ü»ýÏýüýÎÿRÿ¥ýŸûÍù,ûmüÔüþòTLýTýæþcÿ•ÿ5ýÿ|]¾ý\ÿ¶¥IÞGüÝ 4B¥'\lC§2QS¡òê²Çÿ HÿÈûÐù:ùú*ü®üzýýûû¿øòöÿøÙø5ù:ü…ýìüüüôý3ÿ•þfFœýIÿ@‚•r¬ 5R´MnÀ Þ  Å Ep m¹¾ÿSþ|ú%úwû/ûÚù÷Àõ«ôèñQðLóöô|ö­ùáøùNûdüþ’ý]þTþé5 A Õ ¶ Æ ÁçÑZ ÈOF{VH®çþ¢üÏùüö×ø¶úNú§÷põlöŒöõèõôuò\óÓóÌó9ôÑóÃôøûyûMú`÷xõoøýüÑ?0Tf‰_¯ ö £ ø ©²>D2Š Œ F €f<ÜQ \$ ýþø9ø±÷ïõ´ö7÷£õuòKóÎ÷–û&ý[ûäù“ùùùÅû*ªDÿ¾ `ÿôÿ®þ¦ûÐü«þgI6üjþŠQj q6ëÿþÀ¨d& æÎgÿxe!ÙwûþÓý[ý<û ùQ÷áôóÀðlî‹òÔô·ònõàù®û}ú­ô—ò‡÷¤ú2ý²ÍÐT† ‰œÌ Î  o = _£€à J $ –*e xûú@u ýÓûõûïÍþHó—ñõÆóÞótó÷óÂõ¶òÄîVî2ð?ñ(óWõ¡õªøPøôzô¦÷3ý½¹vÌ 6 Â{} $< « X À .Úô | }$ûAùøôøñøù ÿ´ÿIü ùýõÌô/÷Ÿø6÷ˆúåçþðùêühÙqlh¾çÿÿµ;º+£‚óÿ j`‹ÎSŽQ ˜ ü±ª<xܤ  Lí2„~•úŠ÷ø9úÁû…ûI÷‹óø•ýRúôñô õ#ð"îŒò¼ø)ú}ø$ú¿þœþù¹÷±ø&úúrý;RUÈý†ÿOwÿpü²ÿ·ÿ œ a ’~q q’  0 n ‰ MÜ@šýØ-Ïÿƒö'ó@ú"û$õ»ø:ý&ú´öìôtô4ö‘ú[“…iº´ÿ¾(•^ } „’  ºé äúKüéüdûƒú‘úzÿÈÒû'ö]õ÷aôöŽü*þGvs¼þÌã+þåú þºÿ™øÉõ±ýÿ† ÿ\ýüFüüünû ýƒ‰¢ý¹¥Üö÷"‹\È/NÞ}i5¯èÞÊþüûû:þÕü¿ùZùÌ÷¿ùÎÿΖý‘þÿ»ý”¶²€y„ÿž”Y+F"öZmý›õ9öTøÖô÷=üÏû:ülüËùÒú«üþQþ©ü4ÿ¥mÊ® |wAŒGý`þѲkþ¾ü(û*ùnö¨ó¾öæø ÷aù°ùîõö7øüÿäþ‡¶oý‘û¹ $ ë9 f ½‰þdÕÃ\a^<ìÄ{ÄÞ^4þŒþÔÄǺÔé°ýPæþ[÷á÷N‘—ÿ9ûÜøbøN÷©õ¬ó3ôõ>õ‘÷&ú;ýé#ÿ_ýKÿöþý®iúJ?Ü ® Ý;áºÿ´þ¥jåÿþéü>ü{ú€øóúCû‰÷vø¢ýSÿýdþü`·¦dÿæ¢K¬ %Ë |¶“ûÿVú¥÷‹úšþåüÀø•û›ÿõÿòþßù™õ•÷„ú‡üðÿðƒ¯Ž™ã ß i;0j)M™ $ 7,;úÓù†ÿ]'þ—û@üSÿ>ÿý¹ý„þ¯ü·ý9ýBùòúœþàÿZÿ‹ý#þÈý€÷ó øÛû±ø ÷öùóû û?ø÷öºù8ü²ÿé_ÿhþÄÿg*™9Bá ë + ¬ÌL,•þ÷ù_ù#ù}ùòûUûªúVüýû¹üÞüúùíù<ü«œpÿñ¶y” …ࣂì³ÿÿÿô† ý¥ûë÷–õu÷Äú»þìü­öùúÊfÿŽûü¬ü¹ÿ3×ÿE¥ƒ£éiêúþ÷ûPýçÿÈ^@ý üjþ9oþ¬ú7ûÝø›õøöWúþ?ÿ%ýFÿ?Õªÿ¼úù"ÿäÿýÿþÛø¡Ðÿ‡]ýlú>úKÿÿÒù*ýGo ©Á›üvþ˜ú)ëÔ í© Æ £ Ø 'åÛZ?–ûJü>Ôþ}úvújø÷J÷’ö¶øÞûÚûÿûÄý<~Øû©ú_þªÿu4Ú!dö /NUBßüü'þKû‹÷Júðù†øFýÄÿúçóVö÷ù¹÷ÕöcùYüϱDsÿ\I;ÿ¾šªÏ™ è rX€\Gýoi‰‘å²c)ÿuÿ7› 6µ7‰ûGþŒ¤Q°úÆùiþ¢ýù‡ú–ýçú0ô.ôzúPý‹û¡ø¨÷‹ûIXRUñ"jíE0)\Yâû:üךþ=øø ú ü™ýCüïú¬üpüMúåø!ù®ú?úûwX¾€lØÿh…8¡ ñá!ÿ¼ÿþ_û;ýUüwú+ýÞü€ø‰ùŽÿóýúüþ›xÎÿ Á0´Û l šá3H@Ø+Ïk ü¦û.þdýcücýü‘ý\•û®úž{—ú¡øèüIýn÷Ñõ5ûÿëÌàýiùû–ü<ùÛö¶ú¶ûø½øü—þZÆÿúOü†”ÿÿ/ 9Ê€ Ë ˆ œöK¤¼ÿ y› üùÿú÷ûúûVúIøLúëþ‹þøÆù«WþtøAýêçǨd c Ð7†Úü¥ü[ÿsÿ ›;üþ~øúVøEüLÿºú€ô÷õêúþuÓÉÿþñ]ÿ,ÿ_Wçå˜9ýžÿÏþløúåÿ‰ÿYü›þ†õþfgþŠùèýjþŸû`<ÿÇü¿ýØ„£R‡ü.þ•þáú5“ûñö™ø7ûþHÿZý.ÿÌêˆ$Ç) ›â1ßQ9$F û"wmèú±÷û,ÿkÿþÉûVùqûÊý[û"ú]ýDþZü­ü=ÿ@‹oû´t È€ Êþ+üZMBÔûuùý<ûV÷bû;þúËö‚õø´ý ÿ§ý¶ý“YæYýo¥ÀE'H5¸#ä¯Ùlôþ,žþ(úübîkfÿùúçýþxþª1Ëü-ü˜þ#i×#‰;ÿ€ûýÚý¿úmùWù˜úBþvùÿœþ6:Œþ¿×±t>Êq ¿<ô qøš<ÿûXû =ÿ;ûF÷:õÙúVý[øµù6þý‡ûúaúzÿ#íØ¢QŽ‹Ú«ÿüUÿòlëþ÷ûmü)ÿ£ý–ûÖüˆû@øõfó‡øðý•þ§YÃîNÿásRùrûÍÑ·—¡Éïq‡+ÿeÿW=]tüyüþåýU§8ÿÒý6þ‰¯bÕDÿÕý²ÿoüZú,ýý;ýû°ö’øÒü–ü¬úû„þG¹þÀþ—«^|ÿ˜¾X•ø|° û : :Gãþúìù½ýþ¾ü6ûóùdü€ý üêüKýüû“úúXýž@Õæµ_K½Ž|)´Û ¾ŒþÿÊýÿÄþHþ¡ý©úbùÿøÅø²üÀÿ$ÿÞÿVþýëãÛéÿW|õˆÿ×zż|-.úZ ÿhûÌúÍûjýÿ•þü´úçü×Þ×ÿƒÿîþ­ú/ù\ýŠþ•ýz=MÁý|ýÐûUú ü§ûÆø-øœúäý¦ÿgþnýPÿÄÌþ ýZÿ§¹ÿŽ–V   “ÑÛ  ªÐJÊéÿ þÜü’üý»ü½ü¬ûfûdÿÙVü ú‰û.üýcÐçþ‚ø®˜Ò[þ¯þËQ5cÿöý2ÿ2—ËüwùóùÄú£ù…ùûû'ü”UmQó^ÿ#ýX¬ŠýòüÓûSHºáµe„ÿúý®ûØúfþÏ=gaeÿQÿ/,ÓQB*ÙÒ§aÆ5£ „Õ$ÿ™ü1üwûPúÅû×ü'ùrølþûüý ÿª6í*Ç</ W Ee HéþVþÑŠÇ:þüèÿ2ÿ ûûÖü×úw÷uølþÍÐ'ÿWüöSòûÔýyÿ5ÿÿUEÖûÊý7û“üÛýšú\÷éûéþuü©ýƒþÕvØÿaþÐ Üß§_iƲ"¾×¯ÿp¥ Ò›þ$þý”ú¸ù•ùBùû3þµÿTÿÅÿßÿ°üNüòÿ`ÿ¦ügý‹ýûý5Oìº ïÆýzþ„ýYûªü'ÿ‡ÿôÿÿ®úžúëÿrÿzùnøÊúìûNþ„~ã¿|ÅLÿ¢0éx"À©ÿ4ø êü9û0[âþ’þþ~þ=ÿjýçü]Úaé;y(IíŠyþXþœ×éü@øõfó‡øðý•þ§YÃîNÿásRùrûÍÑ·—¡Éïq‡+ÿeÿW=]tüyüþåýU§8ÿÒý6þ‰¯bÕDÿÕý²ÿoüZú,ýý;ýû°ö’øÒü–ü¬úû„þG¹þÀþ—«^|ÿ˜¾X•ø|° û : :Gãþúìù½ýþ¾ü6ûóùdü€ý üêüKýüû“úúXýž@Õæµ_K½Ž|)´Û ¾ŒþÿÊýÿÄþHþ¡ý©úbùÿøÅø²üÀÿ$ÿÞÿVþýëãÛéÿW|õˆÿ×zż|-.úZ ÿhûÌúÍûjýÿ•þü´úçü×Þ×ÿƒÿîþ­ú/ù\ýŠþ•ýz=MÁý|ýÐûUú ü§ûÆø-øœúäý¦ÿgþnýPÿÄÌþ ýZÿ§¹ÿŽ–V   “ÑÛ  ªÐJÊéÿ þÜü’üý»ü½ü¬ûfûdÿÙVü ú‰û.üýcÐçþ‚ø®˜Ò[þ¯þËQ5cÿöý2ÿ2—ËüwùóùÄú£ù…ùûû'ü”UmQó^ÿ#ýX¬ŠýòüÓûSHºáµe„ÿúý®ûØúfþÏ=gaeÿQÿ/,ÓQB*ÙÒ§aÆ5£ „Õ$ÿ™ü1üwûPúÅû×ü'ùrølþûüý ÿª6í*Ç</ W Ee HéþVþÑŠÇ:þüèÿ2ÿ ûûÖü×úw÷uølþÍÐ'ÿWüöSòûÔýyÿ5ÿÿUEÖûÊý7û“üÛýšú\÷éûéþuü©ýƒþÕvØÿaþÐ Üß§_iƲ"¾×¯ÿp¥ Ò›þ$þý”ú¸ù•ùBùû3þµÿTÿÅÿßÿ°üNüòÿ`ÿ¦ügý‹ýûý5Oìº ïÆýzþ„ýYûªü'ÿ‡ÿôÿÿ®úžúëÿrÿzùnøÊúìûNþ„~ã¿|ÅLÿ¢0éx"À©ÿ4ø êü9û0[âþ’þþ~þ=ÿjýçü]Úaé;y(IíŠyþXþœ×éüsteghide-0.5.1/tests/data/mulaw_std.au0000644000076400001440000000450407640356224013406 .snd %@48.wavà73NÒ¼¦›˜–”—œ£§¡¦²¸Þ4+(%!! %$"9ZS¾´¾¿²¬¦ª¼°§¯º­³H2# ''4?>6)(%*& !*-3+,I.->dÊÅÍ¿ÄrZm`>BD.1?`ËÀª›˜›ž¡¤§¬«´ØÏº¬­®¡¢ª¬³¹¾µ¢ž©À¼³Àuν̿²·Ì¸©ÆIÕÏÈÇdzºy̳®®µ¼¿êD^üCβÊãË\4/EÏÏb9M»ÌYHGVNVA3*%-.2ûȬ«±±¾°¨²½ÒC, #$#!*45B»¿KиÆnPïÓ·ªÍU½Ã¸Á@Fl¿»­ÅH⺳ºËĶªŸ›œ žŸ©««£ž¢§ª¹À¸¼×O7/.=µ¯¿¯®ÀÖE?G-.WÖÚzɼº®¬­°«Ÿ£«¥©Ä_>9I3-99HùUJ;0.6KjjVÜ»±®­¬®¹ÇÎáß}?354)%"'+ (( #+266W¯±ÏȾ»±¬¬­½QNJ;<47[ľöhæÏ«žž ªÇ·¥¨Ÿ™ž žªº¯«©¢ ¢¦»düÇ·¹qp¶³ÊôñØÓÐÀÄ9''*/Oºª¥ œ ·Ñ·®¨Ÿ¦«¯G58),A=Ak8*+2?g¾½Ø<,6@L´¡£¬Ø352.7KÕÁ¹Å:#))#'#.>Gj··ÕÎ˲¨ª¡¢´U9E^I>:Eº¶Î±ª­¨««žŸ¶¸«¶®¢£¢¦¯¬ª«¦¨¦šŸ¬²´®³Ø]]]]?JÂý:;?VÚö¹ØëÕÒóL;,"%%")$ ("$;@EØÌ¹µ·±¸¶«§©ÄN·¯Ô\CZ¶«¨­¼ÁºÄϼ¹µ¨ŸœœžŸ›ž¥¤¨¤¦²°ª§¨­¼Ï\, !%0;5>UG89Bô¼­§¯¿ça¾»¼²­¦¨½ÛÁ«ž¡¸ÇË9*=[CHIKÞð?EI31==9MZMoѾÛÖ«§¯e.>dO?0-+"'*,+&##&""*(*4B7Al__.$5?W¹¸³¯áÛ²w8[>)#&-1;HâÏÊV-.GW3&%/^^g×Ç©›–•—›œœ¡²ÎÎý?UÚÉÁϰ¢¢£¨¬¬­©¬Î<6CG98ImµŸš™›—•¤«°¶ÜC7.,/-(3mnæ^10>Lƺ¿¿xB=2?SRµ©žœ›œž¢§º=5=E4%-\ÔáÁ½Ä¸ÀÕÒ=,'"*U¹Æ>7,*-(%$%()+*+:NV¼¯²¤ ®½Ðe:'%*"!;Óµ¬ž”ŽŽŒŽ”’“¨©ª¯¯¦¡ªËZÅÊ<,&(-:;-2(!&'$ #&-+:̹©š™ž˜™¤ª¨­¹c@ȺÃäEoÉxVO>H½¸ØÍ¼¸¯¬¬©¥˜šžŸžœ œ–šŸŸ©³¬¶?)$!"3V鲤ž¥¥ ¢«¶³Ã;<<-)!!I³¤ž¡žšœž¥£¨ÆdP9*.=JmHJÊÏeK-$ (/4N¶¢  žŸ¬¹¿G/*$ &+**.ACNµ¯¯¬»¿ÅQ[¸­²¯¶ùл½­­·ªŸ“‘‹ŠŽ™Ÿ¥²ÞK9)&.84(,J?Gd8&"",>×ËÆ¹¾hݯ¦¤¥¥žš›Ÿž›œª°³p2* (!(8õ»¹½·®²¼ÐØ¿²»><3×Ç©›–•—›œœ¡²ÎÎý?UÚÉÁϰ¢¢£¨¬¬­©¬Î<6CG98ImµŸš™›—•¤«°¶ÜC7.,/-(3mnæ^10>Lƺ¿¿xB=2?SRµ©žœ›œž¢§º=5=E4%-\ÔáÁ½Ä¸ÀÕÒ=,'"*U¹Æ>7,*-(%$%()+*+:NV¼¯²¤ ®½Ðe:'%*"!;Óµ¬ž”ŽŽŒŽ”’“¨©ª¯¯¦¡ªËZÅÊ<,&(-:;-2(!&'$ #&-+:̹©š™ž˜™¤ª¨­¹c@ȺÃäEoÉxVO>H½¸ØÍ¼¸¯¬¬©¥˜šžŸžœ œ–šŸŸ©³¬¶?)$!"3V鲤ž¥¥ ¢«¶³Ã;<<-)!!I³¤ž¡žšœž¥£¨ÆdP9*.=JmHJÊÏeK-$ (/4N¶¢  žŸ¬¹¿G/*$ &+**.ACNµ¯¯¬»¿ÅQ[¸­²¯¶ùл½­­·ªŸ“‘‹ŠŽ™Ÿ¥²ÞK9)&.84(,J?Gd8&"",>×ËÆ¹¾hݯ¦¤¥¥žš›Ÿž›œª°³p2* (!(8õ»¹½·®²¼ÐØ¿²»><3steghide-0.5.1/tests/data/pcm16_std.au0000644000076400001440000001115107640356730013205 .sndJ@19.wavPáÿ´—¹ xEÿ3Ø~Ðè_€Øý‚"½"¼/Ø·W U·¦µº¶Ø¨Þ¦üþûRù÷ùú ù“øà÷®ö¦ö¨öŒ÷ºúÀý{üôù¹÷Lööoøåýïï"{£7– ܯŠS Of õrË ³ É ] { ' ÈŠ.£uô%–w ~ð%ÿÑÿ¨F Ú!› ¿u[Nȃÿ˜ü!ø³ù<ùø€ý=ÿËýùºõÍõžø.ù¯þ›+#R­ h∠†O¬Òþ*üègTþæþÊýtû’ù¤÷D÷Mü8ÿ ý_ýùóõ9öIùzûˆý„ü öÝóò—ñ ñ*ôTô×ò‘ñ`í`êîtð˜ïýðdîÕí¬ìÈè¤æ6ç¹êÚð ôwöšö‘òMîþñô¤õðóüñ6ï_í¤ïõ/ýDÅü¿›þ§þ4ÿUë:Ç î õƬŠ, -­Xo´À ,  -hDò³š $°åþvüÚý‘ץϸýO÷òTð‡ñFò{ô7õòËñÕôÛù5þ Dý™Zì‡ * ¬KEóE= Ò ï I á5ømývûýý–ž ¥ Ø ‹ÕþÆý×þ¯ÿYÿjývúƒ÷4õø&ü¿Gëùü’ø’õ‡õm÷.øÞû%üóþ ÿHÿÿÿS& ýøâöÜùJÿ  q· 3õàw–‚žÓB' „ — P5Hý¼û ú`ýF}xÿkýÝüÎý›þ(üùa÷ ÷ˆ÷çúÆ‘ÉùûOô-õdø£ú9ûÏù&ô×ñÊíëjï¶óóõeôÅñÝï§ðòžöˆû/®Úš0 € ›œÏ ƒü Bs- Á©Žh m  ¾CþŽøh÷Sû#6vý+ùô_òAñGñ$ôâ÷Uöõ-óæõ/÷´÷ç÷èù öîò/î¢ëÏí­ô2úåΗÿ™û±û8ýN'*”Vÿšs ÷m¬X _þ-– – æ Ý Í % ) Ø  œ Ì µ˜Ù¾¬æOœlÁÿ¿ü5þ[®‹t+úÓõÖõÇúUÿÛ<þö¯ñýð¦ï°ïYïôðoïÅì¸í.ó.øÌþåé4w{±) 5¸g ‡ i¬û ôìþêì=ñ¥øÒüøú”ôì±èèmêëXìë4éœèsêBï6ó@õô÷›öxò‡íTê(êìÝññõø7ú/ùÈøöûùEÿuJ­ÿYüýpy ™vá M ¬ô ·§uÖ ô œ Á!p×6 8 ë  ô j!á[ K ‚ #Ù H1≇΀T -}ƒÌý P!kûzö¥ôdõûúþ«þíý˜û‹÷í÷2ùüÄÍ¥ m¯ùõÈÆG”+ÿeýÊÒÞ¾O`úsóìòóö÷àöTñTìé¹ì=ñÌõ©öHòÆìÍèrå7ãÅækëïò8ñÇïÐî°íðîŒñ^ô@õ©ôñòïaïÄó¹ú…¨³þXøöùHýnáCü£ù«úÔÿ@™ ¹ ϘYÿòíì !LDÿ´?Ñ_ ´ Ù ¨þ›ù@ùBýB¥ý ž $„( ½ ± âÀþÜûÔÿ,~ KÎ n;þÚù1õ;õ4öåù¶û¯úðúü$ ó Ù ½ð™- ¸MÔ`s3ÿ¤•exü`÷šô[ôßù«dþV÷ðèïFñUóìö[÷£õ¶òéòÃó¹õdùaüÂýVûîø%ó?ðáó ÷Jû$ýâþCüÝù´öföõü*ßÇÿÿùÇöþø©þNO  î#,ÿõ¼ ² f ·ÿ—þõ{é V # iøþiüÇÿ‘« g f <×ø·?üUø¹ø¾ýÌ)F \)-þëlÕžýªøGôWô'ö›úVý3ü¡ùÈ÷óéó«ùÿ½ø ¦Ç2A——{ AÈéGŸ ë áþ>õÏññô,÷ûùÜ÷kñWëCéEë¶ðšô§óÑð;í`ê$è»êéî£ó„öºõ òåð'í¼íýðÚôj÷÷XõšñìŸíDòúj¥þ ú'ú9þ;¾·þÉú*ù3ý6l ’ … ûÝ+®’ {½ |  Í)çž¼ ¨¢êÿx¬sëÂR~  ½) Î { :[ÖÑ ´ªÔ×ý¯ô:î/ì¥ï'ó˜÷ ù”ø|ø2úVýîÍb|&MŠ ° ÝŒð\ £lþ•ÿuG¯þø˜òtíüíBñòøbû’úõ_ï/ê‘êNì×ïÌñï-ìDêéÊìðøõ®ùVú÷òì¼ëdíÁò ÷Pû'ýýmûÏûMý²t.‰cüIø)÷cüµÁ sC Ú"7ÿa,Ñ¥ùyÑÍ‚    ü 9˜jü(úûÀY ! Å TÖwÿ úÝÿ8ýSü™þ°’ øŠ | ÿÒûÁûÄþ[BÖýÍøíööHø=úøýýûuùføèû„«„ M øZ„uo?‹äi vg ÖØ Ú ›²&üªúúêüÀþ>üùø1ñ”ìsìãñü÷ŽúoùeõÉñ7ì¦ê ê´íÓòlõê÷7÷…÷0öè÷ðù|úSù¾öïòñïqîhñ£øTÓ€ ` üúÖü›ÿ90/ÿãÿ›sÞ µ(Û LýŽý–¿°´»ÅÛFYÙ÷aÀ(ÿ4ÿ䆜 -  ;µþû”ýK¶Æ`€ÿ ÿ¡ªü‚ý™ö´ñžïï ñô'öxömõõ¬ø¦ý/  × Í3œ \ ±šŠ´½ Z7hûùÏô±óiöƒü‚¤©3ú(ò)ì®êÄëiíYî8íhìÒíãðšóîöö‰öUóÿîÝ鉿æ%ê ñö´úÕüYúHö^ó™ó¤öyúdü#ûùXøoû#L± „ . ÿÁügüÏó M Ö < … ›  ¿ û ˆâÝ¢ Õ k¹.j ÓÁ¨ À ù  È’ýx|]  Þ Ô—vÿË}úôâóXõ;øPû`ýVýúî÷ÇõÂ÷'ûÄÆ` ¿¸®ë‚Í\« °0ÿ™þ§<e · oœûÖõ(ñð‘ñXòVñÏï¡íìŠïDó ô½òÆíæèbäáeácäÜêgðrõ)öŸõyòªï½ï%ðØòëóŸò˜ñwñíôrøýÿNè=®ü1ùÓû±ÿ°UHž ýB€ ¿ õüxäò0 EõÀÁEÌ ¾ I ˜õýàþ©º _ º7¬Ó\/rÔjÿºñØ ‰ q©ý¢öƒðøívìþïKòÝõý÷Öù7û/ý£ˆmˆ=8ëÆ ù~»†Ýâ ÷ÿÅL¤±þ¼ûlù×úæþ½§Îüõ ïyì¥ìÊï1ñ’ò;ñlððËñþó„õ9öÀöæôÔð¸ì@êWì‡ñ¶÷ú}üû÷»õõ-øWüÍÿéÿ´ý!úOùrý¾ „ Ò c©,ÿÈ—X] A – ö㪠¢ é ³ ÷Þ£¾M oÚj pøðq;Ÿ›ÿ°þ´R^ úµU ´Û0 6æ:Ëþpúöµõpõ’öm÷Þø(ö2óJñ,ñ÷ö¿ýmzÁ ù ™ ~ 0 zÊÏl ý  Æñ Û~Bþ½ù¾öìöµø ù¶ú-ø&ôzñ%ðòôþötõ`ò5îgë\ê ë(îoòTõPõÒóÈñ7ï‘ð.óGö|÷™ö%ó\ñ#ðþó´øgýš}Ÿþ&ú÷ËøGû)þa ÿöþšýBýGÿ»²N ¿{P/˜ÊØ Ú ›²&üªúúêüÀþ>üùø1ñ”ìsìãñü÷ŽúoùeõÉñ7ì¦ê ê´íÓòlõê÷7÷…÷0öè÷ðù|úSù¾öïòñïqîhñ£øTÓ€ ` üúÖü›ÿ90/ÿãÿ›sÞ µ(Û LýŽý–¿°´»ÅÛFYÙ÷aÀ(ÿ4ÿ䆜 -  ;µþû”ýK¶Æ`€ÿ ÿ¡ªü‚ý™ö´ñžïï ñô'öxömõõ¬ø¦ý/  × Í3œ \ ±šŠ´½ Z7hûùÏô±óiöƒü‚¤©3ú(ò)ì®êÄëiíYî8íhìÒíãðšóîöö‰öUóÿîÝ鉿æ%ê ñö´úÕüYúHö^ó™ó¤öyúdü#ûùXøoû#L± „ . ÿÁügüÏó M Ö < … ›  ¿ û ˆâÝ¢ Õ k¹.j ÓÁ¨ À ù  È’ýx|]  Þ Ô—vÿË}úôâóXõ;øPû`ýVýúî÷ÇõÂ÷'ûÄÆ` ¿¸®ë‚Í\« °0ÿ™þ§<e · oœûÖõ(ñð‘ñXòVñÏï¡íìŠïDó ô½òÆíæèbäáeácäÜêgðrõ)öŸõyòªï½ï%ðØòëóŸò˜ñwñíôrøýÿNè=®ü1ùÓû±ÿ°UHž ýB€ ¿ õüxäò0 EõÀÁEÌ ¾ I ˜õýàþ©º _ º7¬Ó\/rÔjÿºñØ ‰ q©ý¢öƒðøívìþïKòÝõý÷Öù7û/ý£ˆmˆ=8ëÆ ù~»†Ýâ ÷ÿÅL¤±þ¼ûlù×úæþ½§Îüõ ïyì¥ìÊï1ñ’ò;ñlððËñþó„õ9öÀöæôÔð¸ì@êWì‡ñ¶÷ú}üû÷»õõ-øWüÍÿéÿ´ý!úOùrý¾ „ Ò c©,ÿÈ—X] A – ö㪠¢ é ³ ÷Þ£¾M oÚj pøðq;Ÿ›ÿ°þ´R^ úµU ´Û0 6æ:Ëþpúöµõpõ’öm÷Þø(ö2óJñ,ñ÷ö¿ýmzÁ ù ™ ~ 0 zÊÏl ý  Æñ Û~Bþ½ù¾öìöµø ù¶ú-ø&ôzñ%ðòôþötõ`ò5îgë\ê ë(îoòTõPõÒóÈñ7ï‘ð.óGö|÷™ö%ó\ñ#ðþó´øgýš}Ÿþ&ú÷ËøGû)þa ÿöþšýBýGÿ»²N ¿{P/˜Êsteghide-0.5.1/tests/data/prog.jpg0000644000076400001440000000763507672100452012534 ÿØÿàJFIF__ÿþCreated with The GIMPÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÂCÎ"ÿÄÿÄÿÚ SﳫŸÉ*™ø¥ RºøÖ~ßTÅ—‰ø\/ •éÐæÒ»lZãc…šç”Òícî±2¼ÓÐÃÍüìPÁØ’±ÑG'Óã¹®› «j¯H-ˆöг\S&Äþ_¥eMÌD¬+ðªë–ÐÃrÑ3 k5¹ë†DyŽ—œ¤c®[°G¼bœú4ŽT§giZ®Þå¶š™ˆÀЀ%ÝJwË,ï|¥ÓPJc®:ÂP®O¢âûƒ•CÐ0¥nÂè2¤ž dÇ­ÁËâe‚°pòSÆ’KÐodK$Œ‘7ד\ä=¤ŽR'ç²'šéÕl”›$×ÿÄ)!"# 023B14AÿÚÍúügÇèõú‡¶<že îŸèkóë5šÎ¸$ÚÀꀔM³ùå¼S²¾_‰~U„f³Y¬ÖkÓY¯S2X~}8šÎHñ°Ú¼»ã;÷mÃ;û®'´ 7p‹`Í][ñ¯MzoÓY׎Äu^<~Åa1:P¶qNª¤3òUæg®ýQØÏÅ^žcnüc:7aPG'U'^Ρøôy‚zæ½5r\`ùXøóZQm17›Ò‡™£=‚íA®.ÊZ>htÑ[èžUqèyo#þxíÙvÏŠè®î°ß!¶²@j~2ÔVó>á.7+Í:Àœ"ÆKZO9?yñ·öÚQn§•>°`ÚªWæë÷ tÐi«J FH¢ª yL»-âêÐéûT–ñ”¬—åOÓ4CyŽ3é Ì&¡Gηžæ[4v4AÜ䄚ª¹È‘ã|b7aÇäPQ¹ !pœ*«'ü~ÊŠ!Â`)Åuz~@ÍÁw2áM¸²ãº°>U\k2â2ŸJvtåÝÈ$A‰"¿Ä@÷câpÿcûl…·òÿ×ýÊ ãe ñÿEg’:Š;)•_ÿÄ  !01QÿÚ?ÛBV,híMmJÅŒèPÅGÈXø4UC\ˆr¥é¹C¡Em^]'ÿÄ  1Q!0AÿÚ?ꤪ­ºÎX]÷ ‡«V£vrF.ÍÂ繸ÝÓ¯äUÅ/ĪS—ÆJÓ(j <ÇêýµOÿÄ/ !1AQ"a2q0B #@Rbr‘¡ÁÿÚ?ûÉ=ÇRî[(´e_“º/ø6øÏ¤£»É Òן-)у)C’çØ’ŽÇkÃ?TÊqKžª®GÓñF¥%îNWÜJ£Ô®D¥¨å?Áû¾×ÉRЛ÷-h¸II}›ÑrOÓŠÍoÈ£>III(¤h[1ÇAÚ- ]«‚2ÏìíÏ”VhìBQI/úE$’{Öª‰Aï¹—íg<ø;bñ8øÌÆ»rÿ%áíäøéíTä)h¸%ÔQuµ-öð*Û14©­º}&ü¢P󙆟gûÔï;:cò4Ð䟊“© Ï‘¸ú•¸ãJ^YT׆I,™%5Ÿ¥=ßL‹Ù‘ËÛöË>˜åv¤çTŠKRQOÛš;µ-,˜äÝ%žCw©ÎF94mî?Q]l7-‹Y¢âÿTú6St¨_̳1ªºÍVy¶„’[Ñ…j´DÓ’¯vD{rÜ¥¡¨óXF”¬Â½<‡(ÁsY³‚åß%s¡]¤`”o-OêZ2YQ•ªª;Å(G·rᥚi=è—Õî³üºfË‚×sýF߃ëbÃ*ÂèoÇIÑŸ§ò/í%Cùh_bë3.ˆ¥‘ tjÿÄ"!1AQaq ‘¡ñÿÚ?!ºŸYw? òŽ|7ñR¾*XÍ5gˆ€ø s, öK•j¸Þ/}Gñ©R’£._Å~Õu‘u¸ÿ Ãèe,«¿¢%Ù¯èÃohló‹¨Ý-èŠè.a7¦QŠH~Åâ|^<Õ¨1QÛÞ@ ÛzL¥£ìÀªŠXû˜=÷æZèýˆæ^üKbUQ¾bäT„X.c‚=8î5ø`²1ÌÔ"Ù1»Jôq°¡E¿âaàYÜ©J¯ùÂÎ+¿3›çGÔ²î©Ê¼”Øl©0hÐ0-å”_ˆå^±a¾`²p-W(KÙ"5–±2¯‰f‚ZN“üÉúŒOØFa¸ê3mû”©Ï—‰H†ÜÉ< êXjV;%—ÇÌLW¢l•ÐÉ‹l”{ˆA©§Ql*5ŠïÐ$«`Ž ¢|Š‹KBï’À*òÁÃ÷4Æí…#»°†Üà©pœ÷19‡4-C™y‡]’T¬*ç(Y‡™£ º€õÜìZHiÙIÇÜò©€s¯¨ƒÑ4÷ ƒX=Je—´6Ñ;ˆZe†¶×ᢙ Éb'öBW›³'¯âà-uV;¡J tKÅU&º´™ˆ|§6#ŠúΧhx·¸³ZÂ"œ ·™~¤}ëï"й3Üá«ì—ª|¡Ü…8 ­IÁÛrʈÅ-Ü««Bøõ Óâ^TP¢9¨ÄˆUcÌ8ÂÌ.+|ÑØø4S}ýÄ€ÅIŽÌ—6XrFgá›54 Ï­IÀÕØ‘EJòÅÞBÃ8‡z‰ïT]Œ4|O‡ˆªË§aÛÖ¬ïu+Þ¨ÑÄ*Z>%¡áâ]¼ÝgÿÚ åÝ>ذª]+ÌèÖxÞyŸ±û†åÜJ]ïèbZI,´RªW^†]çý{ÿÄ!1A QÿÚ?)r™ð¾’žøKƒìD& Þ ;5" …Q ÉUµDèAV$M †ì_FΨhÊ_Áw Û‚Ø„BD†Û ‚æ=WÊ=_ÿÄ!1AQÿÚ?²Î6¬Zt¶˜ßšñmµ¶­Ûב¯ »­¡Û=ݺ‚BÙ‡

G?8~GÿÄ&!1AQaq‘¡±ÑáðÁñÿÚ?9 xÅP-È%ŽV-ÒÅþùþk1"¥C ×hc”Ppß™÷FF*«º)³Ä¬еîb u9Žf¦x%Ý“ܯ00Åp†`™h¹n ¨$m K)BmrDñ^¼¸× gˆ" ¶s个8nÔí”<Í1\YfO\DàA«µ9cØ¡‚…Ýçî!øU–y€Ø 飲#q`Lܱzº ÀK¼°àÛ\Æçi‚Òø&OwIoí‹®¡ÊîØâóCÓ\Ló BÚðûüÌ ¦†'äжY–d3»T¹ daÞ|qq‚1Á¬œÅR²JS°á–ýᄤUÓP·Åãj8¦5u º9+ÐeN†³KŸ?ˆa¥D²®Ï¡9*ä^]`œ£$å35zŽyPX_¨é(ÚcäEH^|˜8JÒ´ x…õ¹ìuRÔkK 5^ñ›7‚ Ë_p°c˜jë"Ǿ£5*S}àQ«*ÉÝû2À)×KÍT` ˜®n+µ(Œ¿âèa]70ù=a¦Çâ8¬ Š%*@RœöÊ [A|$¦%‘U~ŠòèNX¢ .ÇüÂúd œ˜y‹ÜJ¬sn«æSM%:¸ • D+òøš#ø,¼~%S×Ké RS·ç2óX¤Su~j3jmñØF‰§O¿QߌÙܰvâ%Tþ¥M€m¡Ü2D¶¹å‹ •àTÅQf´G\*I›AÈåîíYû&-¨³¿k¹xÁßY•&Žq@Ž+y!¤doñ)6ÍTDh¾wõFÙL À® y!\ø”ìÎܲ¿Ì7SP±í/,+C§ú“zÚ<Ë©QDªÀaQ`Ï¥õ áx}¸”ái³uq`ÍÓ‡Šñë+ ßý<ÇŠZÞ—ÊwBÛ!éÜlÆ[“~„f²*û?öY‚6aéƒ\ÃØÏmKÕµæ¥Bñç+æpä [[¿0%ÜÐì—X ´?9™¦¶ç§>ð(ªÄp@’xWɽÍi\V½õ(.N5Z{2õZ³ÂBväYêÙ.ñ[Ò9ù•]¢àG:ÜE¥@¶Öq—ÖÂy™h&ÞÆ¿rèݳ«Z+åc†¨4ðþåO8†,wõ vËsÔÁÂ<ç:±ŒÜX7¶‹>É—™ HãÜßÌtÂo1©xHáEqé÷¥ú®Y‘Ø8ˆJ,ˆˆª¡uïW)¥™4c[޹˜± ¢÷a¬™ úY3+qUýy~ rØ8wïuošIŒyvêµp˜†/šs-³Ú Ó¯–\Í•}KÊ¿†õë½Ê:œA|,(®  HX†DÄOA¡‹,¯J”Q‘…ñ—÷5eB«Š"Ð[³ Ô+°ÃW3Ñ(ËÜÿÙsteghide-0.5.1/tests/data/os21x24_std.bmp0000644000076400001440000001543207616470064013560 BM 00lŒ¢a†Y~•O{—@q“5i9n“:o”=q–r™@p—At—AxŸI£O‚¦W‡©l›¼«ÆÕÀÔßÈ×âÈØâÉØáÆ×áÆÖáÅÕàÄÕàÅÕßÅÕß´ËܽÒÝÄÔßÁÔÞ¶Ê×h„š-?S"/:!.@$3  j‰Ÿ]šQwŒ6]x.Xw-X}1_‚4gŽ7l•7l’9i;p˜;n–8j•;l—:m“=n—>rE~ªJ{¤N~¥i•µš»ÒÈ×àÈØâÊØâÈØâÈ×âÇØáÇ×àÇ×àÅÖà·ÍÜÀÓÞÅÕßÁÕß·ÌØg„›0F](>N 1A"0#"!!! dˆž\}•Hi€5M0K8ZAa&T})]*V‚*R}+a–-^‘*W‹.]-[ˆ.Zˆ,\7v®9nŸ7f•8g™nžÂÃÕàÉØâÊÙãÈÙáÊØâÉ×áÊ×áÆ×áÃÕà°ÇؼÐÝÄÕàÂÕà·ÌÙi‰ 9UnIe€%6G.&"$$#"b†\{‘Cb{,C$?,K1RGu!Q†"Ix!Ft%V‘$R‰$Mƒ(UŒ)P(Q‚%TŠ2s¯8l¢4d•3b•g™¿ÁÔßÊØâÊØâÊØâÊÙáÈ×áÈØàÅÖàÅÕà²ÆØºÏÝÅÕàÄÖà¹ÍÙlŒ¤Ff‚|Ÿ¶G\r':"/))))&bƒšXy@`z,B$>/M1TEv$Qˆ#J{"Es%T$N„%N€&V)P€)M)VŽ3o­7j¢4b–2^“c•¾ÀÓßÉ×áÊØãÈ×âÈØâÆ×áÆ×àÇ×áÈ×â¸ÊÛÁÓßÅÖáÃÕà»ÍÚn¥Loš¸É¥·Qdz(9P)< '7%6%5$.aƒ™VvAaz4L#@@c8`H} PŠ"K@n"Mƒ!I€#K}'Z)R„(J~+Z‘3m«5h¢4`–0X_’¼¾ÒßÇ×áÈ×âÇ×áÇ×áÈØâÇØáÇ×âÄÖá´ÌÞÂÔáÆ×áÁÖà¹ÎÚo©Nu”£¾Ï¿ÎÚ¤´Ä_v$1G!)=(=!+>)=]ƒšSvŽA`{7S&C;b9aJ!T#R†Br M…"J‚$Kƒ*^•,Uˆ(O„-_—3o¯3m§5fŸ0\”_‘½¼ÑÞÆÖáÆ×áÇ×áÉØâÉØâÈØâÅÖáÄÕâ­ÌßÂÕáÇ×ãÃÖá¹ÎÚr“ªQ{š¦ÁÒÆÕ߯ÓÜŠ£¶%4H':&7'7&;]„›Sv?`}6S,JeJ}P‡ Qƒ@mJ€FxEw%W(O#Fw+[‘.s®3r¬5n¤1c›V¹²ËÛÃÔ߯×áÈØáËØâÇØáÇ×áÈ×âÅÖá­ËÞÄÖâÉØãÇÖáºÎÚp’«X€¡¨ÃÓÆÕàÅÕ݃›«"/:"/((*eˆžSvŽ8Zx7V.OCkAm=h3\6_/R0U3W4X@m0F#3M+@%#0$:X 2D$/ =a*Vƒ` s’¬ªÃÓËØàÑÜãÏÚã°ÄÏ7Sw5W€‰°ÉªÇØÇ×àÊÙâÐÛãÌÙ᣼ÍGu˜:V 6 ('A8\zAl‹BoEnFq’HrV~š«ÃÒÊÖßÈ×áÃÕß¾ÒÞ^–Ã1W}&2?+9J"0E#."1O.@&0!?_*W†]‚žn­¥ÁÏÊÙáÑÛãÏÚá²ÄÐ7Ov&InT„§r¡¿Ç×àÊÚáÍÛâÌÙà§¿ÍFu“%:U$<&%$"+'@2[|?kŽCoŽHr“Ju’Nu‘Wƒœ¨ÁÒÄÕàÇØáÇÕà½ÒÜ]™Å-Y‹/Ol/Jm%?g8W%?d @b!:X*Kt)X†X€œo’®ªÁÏËØàÐÚãÏÛá°ÂÎ3Mp'ChJ| W†¬ÈÖàÈ×áÎÙãÈØá¥¼ÊFs“"9V#8*&C3]?lCp’Ft–My–Py–YŸ¨ÁÓÆÖàÆ×àÇÖàÁÓÝb™Å-S}'5A+> 0I"-): .?'4"?b.X†\›o“°£¿ÐÌ×àÒÛáÒÛâ±ÂÌ-Fg&@dI{ P†©ÅÔÝÂÔÝ¿ÒÚªÃÎu˜®@kŽ!9V : +(E7]}@mBs“Hv–LzšT|›U‡§¦ÁÓÆÕàÅ×áÅÕàÃÓÞcžÈ+Qx$.'9!,?"+ .?!1A#0";^+T…bœs“®¢½ÐÌØàÓÜâÐÚâ°ÂÍ.Fg!@cEzžP†¨¤»Ëœ¶Æ†¥ºk¨Z€ž=k!9X!>'&)) .(F7`€Bl’Hv•Iy˜Q|šS~ž]‰©¦ÁÒÃÖàÇØàÅÖàÂÒÞj Ê,R€+?/I$8T .B'9W'=X0H%Bi(S„\‚m’®Ÿ»ÐÉ×áÒÛâÎÚâ²ÃÑ3Ms#BeGzŸN„¨~œ°q¦eŠ£a†¡V~›9m’&>^)J'G,I+L+I-J1P8aƒ>n”Ds™Hx™M}žR \‰ª¥ÁÒÄÖàÇ×àÇ×áÂÒàk Ê2e¡*ZŒ.[‘/`–/a’2c˜2gš1f—4jž2a\ƒŸl’®ŸºÎÉ×àÐÚáËÙá¶ÇÓAkŒ4`„C|£K‚¨{›¯jŒ£^‡¡\‡žV}œo”?r–Ex›K{žQ€¡Y‰«¡¿ÒÃÕáÅ×áÆ×àÁÔß©ÊdŒ¹b¸fޏi¸f‘»k“ºl“»n“»p˜»q–³kªh®š·ÊÅÕÞÂÓܾÑÜ®ÆÓN‚©D{¤F~¤L‚©v—®fŠŸ[…œT~–Ny™r™@tšBtš@uœEv›Et™@v—=r˜@užEzœI|¡J§P†©sž¹ˆ«Ãˆ²Î´ÎŠ´Ïƒ±Î¯Ë€®Ê¬Ç}©Çz©Æ{§Æy¨Æt£Âp¡Ál›»M}¢:c~Vƒ¢m»d”²,[†:n™7hAk@o“Bq—Dn‹9Xn+J^%9;W&Op*Xy3cˆ?q›@tžBtž>sœAr›Et?rš>sžCt @u›Dw Bv¢>s @sž;o¡@€¶@€¶@‚¶<}´7z³<{±=y®8t®:v¯7u¯9w®2o¨3m¥3k¤,\Œ4P1^‰6p¢D…² Ky)Z‘!Cm"@f"@m#Gr6Y!9- & - 8*F:Y1_5h›1f˜/[,[1a•/\Ž-`”0^“,\0`’3a•/\’:p¤5m§4u²/s±.sª2o¨0n©0l§1j¦-f¢2i¤/h£-fž(`™+^–*^—&P€-H0Wƒ0jŸG‡¶Jz)]–An =e"An%Iv$=5 *$&)3$B&Q‚)^—'\(Sˆ)T‡*Y*U‡'Y'VŒ'SŠ+WŒ1^“-\;q§4k¤0o®,p®,m©/k§-j¨.j¦.g¢.d.g /i£,fŸ-c›,a—*_™$Qƒ+H/Z„2k£E‰¸J{)]–@k!=g1X†8a!73 '$% - 5 !?$Qƒ'X%W‡(S…*V‡+^’'S‡%V‹#W‹%TŠ,XŒ1`“)ZŽ8q¦0f -m­,k¬*j¨,h¦-i¤-i¥,g¡-eŸ-g¡-h¢+e .f +cœ-b›&U†+G/Z…0k£C‰¸J{(_–?j=k=m›Dt¡ 62(% * 5!>*N#T‡*Y#Q‚'V†)S†'\”$Pˆ$Qˆ"U‹$UŒ)X4c•(TŒ6o¥/d +l¬-h¨+d¡-e¢-fž-g ,fŸ.fž-f,c›.c›/fž,aš-`—'U…+F/Xƒ/h¡@…·Iz&Y‰8]7[5b‹;i’41 $'16"=/T+]Cu£#VŠ&X‹&S…%[•(TŒ&V%Y’$V“*Y•6hž(X”6q«0k¨-o­(e¦(`,aœ*aš-cœ,dž,dœ+a›+`™/cš.c›,`–-^–)U,D1V1f›=°Cp Fk+H,H/V{6^„7 1%' : >+I0R+VƒBm–Jz P€GtL} Gv K{J|I~&U-cš U+fœ'^–"V’"] &`ž*aœ,d1fŸ-h +c,c-eœ/e-`›.a˜/d,Y…-E1U€/c–*Wƒ2W3U-N2P(Fn.Lp,K2*( 2 >(I1Q2U :\.T:e2Y3X2X6_3\4^;gBoEn$T€(Y†+[‹2k¢1f¢+c,fŸ0i¢,f ,b,ež.c/a˜,]—0a–3gœ.Yˆ+E2V.[ >h8b;b">aClFsFuK{KwJwK|NI~M}K{'S‚?qœBy¦E}«D~­F‚´9l¡*_™(b›)b*`›&^*`š*_–+^“-_•1a˜4gœ-V†,D3W~1^“2b"Es0aŽ%Bk,Ksh‡¥rª%ZGt"@j%H-T$;`(«C„´@ƒ´<°?|¯2hœ&W'Y’'Y$[$W'X‹&Tˆ$Uˆ)V‰.Z1e–.[ˆ-F3X5fžC‚²(N}D­"?b1Qu”µÉ¨ÀÓ%Y’#U7s¤@f.f™H¦e¬!Ci/A/B/@+8.C0T+Vv#QrGm?a/Y5[Bh+]’(c›'e.e-^–#IxCg?b!>^!=_!=\ 8Z<\%=\"7U#=^+X‚+E4Y€5j¢NŒ»*S‚H‹¶%@^0Ps½Î°ÊÙ&bš$Z“9z¬Bn5uª?t¡Dq“-I#"" !(&<.I %A "B $E "H%F+S&VŠ)a™$^›*_˜*`–&[’"Uˆ"Lq$Jo+U{*Pn,Ou-V{:Xq.C\/R,Z…+E8Y|6l£L‘¿)W†Fˆµ">](Gd±Ä±ÈÔ)d&Y•4vªAn4x«9m™/Ss 4!"#"$ :#> 35 = C "?)N'[*d›)`-fž,d˜+d%WŽ5&;)?Z (5$0@1J`8;:03?1V-V„*D3V{2h J½&U†FŠ·!;W0JJlq‘­*g¡(a›=±Mz5z°;l™+Nl2 ! $;!= 39< > > *O%`–-l¤1n§.l¤.f,i¥&\+/(9R '%67JZ22425<4W,Z‰0I3Z{4p¦AŒÀ-V†O‹¸;X)?;YyKl‰%`š(^—;±O|3x­5l™(Lm 4!"% !8$?3 3 8=<&L%\’.j¦0l©/m§-i¡*h¥'^“"3&6->Z%&/,/D8Ia75?26C5Y0b‘3O4[5s«H¾$S‡Eˆ¶9Y%<6WuGh†#Z’#X5x® Ly3s©;n—,Om6!" ! #9'?37> > != $K%VŠ(a›*gž,gž)bœ)g¡'iŸ'Il)Ih1V{-G_4Ni8Yv3J]/CU4Y/[Œ0N4V~5k¦CŠ¿$R…Fˆ·[*>]5_0c’7S-Ol'^Œ6t¢Ft7t¤-Sz0Ol:[|?d‚Ck";8 -7'Gg8_}4Xx2Y|3[~5_€6\8`‚2`9T 68 ??"F *T!Y–(i©,k©,l¬-i©(`šP‹H€H~ IH}!I|!IL€I}Ap3b’5P(=Q-G.J'@ Ee'Fi1Xu5\|0L*Hh2]}7c…=j‹"H{$?3+ 7Ei9d…;gŠ@j‹@j‹Al‹i‰ItLu•Iw—Gw™Iw–Ix•Es”Fo’AlO-F'@U1Pd:_xƒ¯Ã¦ÊتÎÛ°ÏÜ@h"<2('$= r ?r:j™:n9iš@x§9p£8n 1f›*lª(o±'k®*m­(n­.r°,q­.r­.u¯3w¯2u®1r­1n«2m¨2l£!:\&;Q,F'>O.N`:^uˆ²Å§ÍÛ©ÍݧÍÝsteghide-0.5.1/tests/data/win3x8_std.bmp0000644000076400001440000000646607613727351013606 BM6 6(00   P£ËŸ`1™F–®H$@¯ˆËc ååíS=:V&Ò¼¸8,,\rÒºF( R,[¸óºÎ`Ž®jBJˆ”àÊÒÎ"rªž*.ò³±`v¾ ?,q¥ÌÎÞâuL0nJW–åa=L^®EK^¢tˆ•´”‰^Áõ¿ºÐö bBÉq•B""ðÎÒ”£ÅFl¤&¢ž",,††Sr³fIð×ײ6"€Žžvyº8 c;FJRžY/ Æ´¾BVHšÖ¾N@𒎦¸±ÃŸµÓòàÜͱ­}‘®FbFЖÁîu–Ò³(=WgÃJ Pïîñ袗‚ÁíN†ššŠ6*¾Æä"*n€¥ÞâüŠVR Y§ê®N$@ B^j"C3Wƒz¶ê]n·] ×ÃÄω~„z’»Â„z‚¡¶b”ÔXOÊyB7&Ç ÊeyYeeee ß0Çyeee1kÌ ·‡4ÌÌÀQBYBÊ&¶¶ 7)yY&eeeyßB”Ù" ÓŽí 4xÌÌÌ¿áeyB7  ÝyeeeeeÊÊeeeÊÇYe”§§ ŽGgæu4Ì̱y&eeeeÊ7ݶÊyeeyÊeeeeeeÝy)·åÓå§OeÊBeeeee&ƒ> &eÊYeeÊeeeÊyee”§·® ·ååÓggí àOeeeeee7¶JJ BB&B&BÊee7Y{"®æ ®·åÓgí¸àeee))B J>v&ÝBÊeeeÊY7e)ô¸ ®ïg··ååÓíæÊeÊe))yJJvÇÊ)eeeÊ&M4Ìx"§íG·åæ··ÊÊe))ݶ&Y))eeE¸¸4xôæååÓgíí·eeeeeee)Ý e))c 4" ååÓÓ·å·eyÊy77BYÇJÐyc··¸"æ®Ó····åYÇ Ýy7 ¶J&BÊcå··ååå§ææ°³GÓå··ÝBÝBeY ÇÐvÝY7BYÊÊcååÓÓåÓô".³³.ÓÓ·å7&Y Çee&ÝÊe&&ÊeÊÊ)yyN°®ÓÓ·æOOægG°³³ïÓ®&7Ý BeeyÊeÊ 7yÊYN®ï®·åÓÓí·æxx‡ïåï°³³ïÓeY&Beeeeey  yÊÝßE°³gŽÓåå® O̰³Óå®ï°|³Ž&&BeÊeÊY7ÝvÝÊe&E®ï³³°°Ž···æOÌÓ°°°°ÓgŽï³³&yeeyÝBÊ&ÝÝB&ì£:ïå³³.°®æ¸OÌåï°³GíåÓï&ÇBY7ÇYeyÊY‰ýãö¬¸ gG³³°ïÓ· 4ågŽï³°ïŽÊ&ÝÝ&Ý Ç&ÊByeyÄ•8,qGåqG³³°G4Ìæå·å°°ïG7Ý7&BB&vâŸã,2R²€u]ŽŽïŽG³³°ï4Ì·å·å··§4O"eeÊ>ÇÄ₟ã,2Ú²² ѧïåå®gG°³4Ìæ·¸§ôxrÌÊÊeÊÇ0[×LÖö2 šššÌO§‡ïÓÓ°]ÑÌíåæôÌx"¸yyyYyyÝ C!Ôá8€¼†mŒŒŒŒOx4Ù‡®Žg¸4x¸Ñ?¤¤65qYÝÐßú›8_8hhõ¼øÏÚŒŒÚÏSÑÌrO§‡x½jV^µµµi^ÿÿyÇÇv n~áùù´á8hh øøþÏÏ,þÁ÷qÑxO§·‡uÌ ^µµµ^ÈËÈDÝ&&ÄÒ Xáù›_hh¥£îø   mšH|¸ôxÌx4O¤Di©µµµi^ËiÊ¡Ad! ºˆù8pØÅØõ÷þþø,ÏÏþîîþqÙ4̽çÂççµDiµiµËËi=ÒÒââ ŸQŸL_ØU¥aÁþþšš²ššŒªHH] à瓤¿«©iµµÈËi…… â¢âºQŸ_pýý<Ámþššš²šîîŒHqj$fñ¨¨ÂÂȵi^iiÈ=……ââ ‚QL’¦p»»haÁܪ²²²²šHž – ñ¨ð«‘Dµ^^i«iiPF¢â-Òâ¢ÖÃÃpëÕUUä¥};sHH¬÷†a/Â^«Â¨ñI˵iiµ¤^Â= ¢Ò-ÒÒ¢ÖÃÃpëÔUhœs;\;¥žž÷£†Â«Âð ñðIIDµÈµÂ¤¤D ¢â-ÒÒ~ÖÖÃ’ëwÔÕs\\;¥Üž÷÷z«È«Âñ$ IËÈDµµDñfiW~~F-ÒÒ~ÖÖ’’ëè›ÕýRRøÛÛöÛ}†9©«^ñ $ñð©©DµffI#ÃÃ×좢XÖúèè»»»//m———H¼5õÿ˨^¨ÂK?ñðII«DD^fñI„Íú¹¢¢ºÃׄ~w<†(00€  ÿÿÿPU!j:«JBÐkmQR‹µ6ÕVj:­$˜/_GU±ZÕc*HÈ;Z©í ‘vëYå¶ UVZVjª°ê¢Úµ£¢­¨Ój£(š¬­[ÊQ2ª;Vª…[Fý(.ª¡  ÕRªÐp*”­Z)*¨ºÕªª©EªTU@UHªU@ ©Qª•UJª*UI•UTU*ª« UBR¥V U%Dªµ¤U¤‘J­*ªBªUPXYÕRÕAR§•J¤¼²HФ¨¡LIP°¥YZ©Ei «BEA@ª­(U¶ªBUP[jÐ %)*µ ¨¤*¥J‘UJ•Z¨ETŠ¡T•Zª$ªZ×Ô¥¢Uý’@! dJõ ä¢«VÖ•*Usteghide-0.5.1/tests/data/os21x8_std.bmp0000644000076400001440000000603207616470064013476 BM  00ÐÔÛÐÖÝËÓÜÎÖÝÏÔÝÍÕÜÍÔÙÎÔÛÍÔÛÍÓÜÍÑÙÎÓÚÌÓÚÌÒÙËÔÚÊÑÚËÒÚËÒÙËÑØÉÐØÌÐ×ÉÑ×ÇÐØÆÐ×ÄËÕÉÏØÉÍÓÉÎÖÃËÓÆÎÕÂÍÔÁÉÒÁÈϾÉѼÇÑ¿ÈλÃ˽ÆÎºÅϵÂ͵ÁÊ¥¯À¸¼Åµ¿Ê²¾É²»Ã²½Å®»Éª¹Å®ºÅ®¹Áª·Å®¶Àª¶Â¤´Á¨­¶«³½¥³¼¥²½¡²¾¦¨´£­º¢«µŸ²¾•ª¹œ¬ºª´š©¶›¥²—¨³•©¶”¤³š ¥›£­”¢­£±‡ «‹¡­“Ÿ³™Ÿ©˜ž¦”ž«“›¤ˆŸ²‚–©‹«‹š¥Š–¤ƒ›«…™¥„”£‚•¦¡“˜Ÿ’–›‰”›‹”›–Š’–’–„’œŠŽ’‚Œœ„“‹ŒŽ…ŒŽx•¥|”£~‘¡x¡wœ}’x†—{Œ›{‹“t‹›t‰”s…’{ˆ{„Šs‚Œj†˜l‹l„”k€Œv}ˆl~‘d}‘fv†k}Œm{„d|‹dz„buƒ\}’[v†[yŒ^zŠ\sƒSm‚[oMoeqzjt|`ks]r~Tq}Uex[m|ZlvTkzTjuQjvSetYelSclFhzMl{LjuLfyKdsEcuAaeJcmEalQ[fD]sL]dK]kC\kD[dAViCVdCO\FX]DS\=`l7[d#9?$4=!5=!29"/6".9'.199=3;5>2>1:1916'3-:-4-5*1+3*.$,)/*/$,)$gehiihibbrv‚……•Êíëöüêüûóüñ̾ÐÚÛÛÜçïÚÖ×ÙúýîìäÑÙÇÄeehgeegcaggu„xx¯áîáòø÷üûüüõäÐÈÐÉ¿ÉÝÕÁÃ×úüìäÌÇÇ»Ïbbcbcbbc`b`dx”„½ñíßàëìñöøýüàÐÑÛÑÈÆËÜξÀúþöл±ÄÄÙbbcaacbcaa`dx¨£ÁíñííëÙÒÙÛç÷àðÝíàØÈÈÕÙÃÂùÿùÀ¤¢»ÀÍ`c^]a`aa]aW_v€•ªÌæöóóÛÐÍÎÏòøðîðññÝØÝÙÌãúÿ箪¹³®¾]^^]V]]]R]]Rabv„¤ÀæøýïξÍÐð÷ÛÙøøöôÝðòãÔúÿ辪¾ªªºP]]]RRRPRRRRR]au˜©ºÚôðØÇÙæíïßÙöö÷îÓÚåãÂâþõ¾š›š¬¨IHPRRQPOQPPOOPQo––£ÇÚîíìñ÷îàßÒàÙæØÆÈÁ¾¥Âóš>>IPOOOIIIIIIOQo„Š‘¤»ÆÈßë÷öíÒÑÛÏÏÎÖÖÀº—¯óÝ•§}x887DDDIDDIIIIOOttfq„‰˜¶µÇæùõòÙ×ÛʵÃ×佬¯úﳪ¥wi‚**4848487<>>BIVZJBDVlƒ©©«½ÎÃåèòÛåÎÀÐîÐÖÂúñÇÀ—wv$$$+*$ !*4-(.8J=88:>D~¨¿©« ‘•§ÍÍæîçîòöïäúíÛÀ•gg# %%$-2-1.6D”¿Ï¿À–st–’•µØôøýýöðüö໑ggw%(,1(:\–ØÜÝÆƒUd”¤ÐÝûúýöíøòvgv%%10Eu•Üôï¸qFZ”uu¤ÊÑõúúîÒðíÏ›Žxxw !0NYUÁçô¶tGUfVu£¢³ÇæçÑÅߨ¤xrdaw-GZZp›×ô³–”nt‰’°ÇıÄÑÒ°tWIdŽ &!!(,1W™¾Ýµ³–t˜’’‰ƒžž„o“Úܶ‡|}J9&'/3,"151Zƒ˜£ÁæÊƒ¤£˜nFUYk[Š¼Þ¶”d821 &2;EG;(C@0=ož’¤¿Î¿ÇΫn@;8WŠºô¼D--4   .LmYyK6TU:Bx²©¤º³žåòÙ‘oM7V…˜½ïª‘Y224  Gƒ{ƒsK[zCYtŠ{|ƒkƒ×÷òÌ uWu–¬ð¨Šs948  "KŒ–‡UVƒy~nXC2-8€Ý÷ð×¾¨™™¬ÁÎô£ƒŠ>49   !;q–Š „ƒŒ³kG..AƒÚõæ£r}¨ªËÕÛ鵦‘9=>   ,6Y€™‘ƒŠ©³Ê©ž{k;0G‰ÑðÖžQ9r‚Êåððл‘>J<   '6KUWfRZf”©À½™…qMElžÇÛÖ¬YGZn¸ÙîîØµ„I7* /;M4($1CF[ u\\DDQx˜©Ð˨{n|’µÌäÛÈ…>% ',("!/FCElŒslUA:AZ{ ÑÓ”Qq|…•º×æµU-#&  1;35Afs\ZF:AKlƒÉÕ M‡˜ƒƒ˜¾ð«E-%%,   &+&'6FkG[N::AG[¶ÈŸ‰³Àµ¢©¯é¸=$#5   %,0>os‰kS)=ABAkµÓ©µÏÏÀÇÀ¯é´3 $B -Kmx  µŒT1A@\FtÆÑÍÐÛØÇÛÐÃå¦+#*7f   4sŸ«ÆÎÚ©sAN?smÆÅ·¡«ÎÏк¾é¦48>Jd   $E~Œ¶¼ÏÉ’njAT[ƒ °ƒLuª¨|oxÔ«52E[[ (U‰©¶Ÿ¸¸ ˆKskJUqqKVƒ{C=B¯«68om  ,X‹¸¿œ¤»´Š‰T,1ANUUQ\=5B­¸GQ–´ˆ   "0M‡©µ²º¶ Ÿznl6.BG::DWTAC¥ËuËÚ²  'ATK[{ƒ©¶ž¡XAG9DGGC+-9pƒs½Ý«¬ôï·   (6-$3GNfŒ½´yL:54WffJFAl‡„¼ôµ¸óá   % $Bp…Ÿ‰mF3:A8587x½«ËëÈÉïߌ &1Xy††ƒfƒzXCS;(8€ ³áÜØÒà "0@~ˆ¦¡{KBƒ ‡‹X6;q™©ðïßÝÑ¡  &,Xz‘²¸ÆŒƒyŸŠ…²{s{°ßáðÛň  !'6T‰Æ¸È–¶¦¸²½´{q~“«Áßµ½™¡z   /06Mˆ»•¨¨¿ÉÏ¿Á©zXY{Ó‰oЉ   !&0As–¤Š~–¿ÖÊÖ¨´Ÿz{ˆyÁMlŠœ +6FU‹‹{Їƒ–½ÉÆÔ¿ÉÉ¡‹¡¡ÓsUZ…²  +@XkЉWIJKpŒµ¬”“ËË´·Ï½Ózoq¨steghide-0.5.1/tests/data/os21x1_std.bmp0000644000076400001440000000064007624145343013464 BM  00ÿÿÿúªªªª¯Ð@DDDEúªªªª¯PèŠˆŠª¯PDUúªªªª¯UUþªªªªÿÕD@DEUÿ¢"¢"ÿU@Uÿꪪ«ÿU@UD]ÿªªª+ÿUTUÿ«ÿÕÕTEUÕÿ몫ûÿUUPQUÿîê«ëÿUE@U]ÿꪪ«ÿUQPUÿêê®ïÿÕÕTUUÝÿûºªûÿUUTUUÿïê¯ïÿUUUEU]ÿûº¯¯ÿUQPEUÿúªªïÿÕÔTEEÝÿúªª¯ÿUQ@UUÿÿª¯ïÿ]UTUÝÿûú¯¯ÿUUUUUÿûú¯ïÿÕÕP]Ýÿúª«¯ÿUUPUuÿþê®ïÿ]]UE]Ýÿûª«¿ÿUUUUWsteghide-0.5.1/tests/DummySampleValue.h0000644000076400001440000000304407735577231013560 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_DUMMYSAMPLEVALUE_H #define SH_DUMMYSAMPLEVALUE_H #include "SampleValue.h" #include "common.h" class DummySampleValue : public SampleValue { public: DummySampleValue (UWORD16 v) : SampleValue(), Value(v) { EValue = (v % 2) ; Key = v ; } ; UWORD16 getValue (void) const { return Value ; } ; /** * calculate the distance as | Value - s->Value | **/ UWORD32 calcDistance (const SampleValue* s) const ; /** * return from the contents of the SampleValueAdjacencyMatrix in the DummyFile **/ bool isNeighbour (const SampleValue* s) const ; SampleValue* getNearestTargetSampleValue (EmbValue t) const ; std::string getName (void) const ; private: UWORD16 Value ; } ; #endif // ndef SH_DUMMYSAMPLEVALUE_H steghide-0.5.1/tests/SampleValueTest.cc0000644000076400001440000000442707735577231013550 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "SampleValueTest.h" #include "utcommon.h" #include "SampleValue.h" bool SampleValueTest::genericTestIsNeighbour (SampleValue* s1, SampleValue* s2, bool res) { bool retval = ((s1->isNeighbour(s2) == s2->isNeighbour(s1)) && (s1->isNeighbour(s2) == res)) ; if (ArgVerbose && !retval) { std::cerr << std::endl << "---- FAILED: genericIsNeighbour ----" << std::endl ; std::cerr << "is: " << s1->isNeighbour(s2) << ", shouldbe: " << res << std::endl ; std::cerr << "distance of s1 (0x" << std::hex << s1->getKey() << ") and s2 (0x" ; std::cerr << s2->getKey() << std::dec << ") is: " << s1->calcDistance(s2) << std::endl ; std::cerr << "-------------------------------------" << std::endl ; } return retval ; } bool SampleValueTest::genericTestDistance (SampleValue* s1, SampleValue* s2, UWORD32 dist) { bool retval = ((s1->calcDistance(s2) == s2->calcDistance(s1)) && (s1->calcDistance(s2) == dist)) ; if (ArgVerbose && !retval) { std::cerr << std::endl << "---- FAILED: genericTestDistance ----" << std::endl ; std::cerr << "distance of s1 (0x" << std::hex << s1->getKey() << ") and s2 (0x" ; std::cerr << s2->getKey() << std::dec << ") is: " << s1->calcDistance(s2) << std::endl ; std::cerr << "should be: " << dist << std::endl ; std::cerr << "-------------------------------------" << std::endl ; } return retval ; } bool SampleValueTest::genericTestEValue (SampleValue* s, EmbValue ev) { bool retval = (s->getEmbeddedValue() == ev) ; return retval ; } steghide-0.5.1/tests/CvrStgFileTest.cc0000644000076400001440000001370507735577231013341 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include "CvrStgFileTest.h" #define private public #define protected public #include "Graph.h" #undef protected #undef private #include "SampleValue.h" #include "utcommon.h" // TODO - do tests with new_wfn == false in *FileTests ! bool CvrStgFileTest::genericTestReadWrite (const std::string& rfn, bool new_wfn) const { bool retval = false ; if (new_wfn) { CvrStgFile *file = CvrStgFile::readFile (rfn) ; std::string wfn ("test_rw.out") ; file->transform (wfn) ; file->write() ; delete file ; retval = areEqual (rfn, wfn) ; removeFile (wfn) ; } else { CvrStgFile *file = CvrStgFile::readFile (rfn) ; copyFile (rfn, "test_rw.bak") ; // make backup copy file->write() ; delete file ; retval = areEqual (rfn, "test_rw.bak") ; moveFile ("test_rw.bak", rfn) ; // overwrite written file with backup copy } return retval ; } bool CvrStgFileTest::genericTestReadExtractCompare (const std::string& fn, BitString& emb) const { CvrStgFile *file = CvrStgFile::readFile (fn) ; emb.setArity (file->getEmbValueModulus()) ; bool ok = true ; for (unsigned long i = 0 ; i < emb.getLength() ; i++) { ok = (emb.getNAry(i) == file->getEmbeddedValue(i)) && ok ; } delete file ; return ok ; } bool CvrStgFileTest::genericTestReadEmbedExtract (const std::string& fn, BitString& emb) const { CvrStgFile *file = CvrStgFile::readFile (fn) ; emb.setArity (file->getEmbValueModulus()) ; // embed data (at the beginning of the file) for (unsigned long i = 0 ; i < emb.getNAryLength() ; i++) { SampleValue *oldsample = file->getSampleValue (i) ; EmbValue target = emb.getNAry(i) ; if (oldsample->getEmbeddedValue() != target) { SampleValue* newsample = oldsample->getNearestTargetSampleValue (target) ; file->replaceSample (i, newsample) ; delete newsample ; } delete oldsample ; } // extract and compare bool retval = true ; for (unsigned long i = 0 ; i < emb.getNAryLength() ; i++) { if (file->getEmbeddedValue(i) != emb.getNAry(i)) { retval = false ; } } delete file ; return retval ; } bool CvrStgFileTest::genericTestReadEmbedWriteReadExtract (const std::string& cvrfn, BitString& emb) const { std::string stgfn ("test_rewrx.out") ; // read CvrStgFile *file = CvrStgFile::readFile (cvrfn) ; emb.setArity (file->getEmbValueModulus()) ; // embed for (unsigned long i = 0 ; i < emb.getLength() ; i++) { SampleValue *oldsample = file->getSampleValue (i) ; EmbValue target = emb.getNAry(i) ; if (oldsample->getEmbeddedValue() != target) { SampleValue* newsample = oldsample->getNearestTargetSampleValue (target) ; file->replaceSample (i, newsample) ; delete newsample ; } delete oldsample ; } // write file->transform (stgfn) ; file->write() ; delete file ; // read file = CvrStgFile::readFile (stgfn) ; // extract and compare bool retval = true ; for (unsigned long i = 0 ; i < emb.getNAryLength() ; i++) { if (file->getEmbeddedValue(i) != emb.getNAry(i)) { retval = false ; } } delete file ; removeFile (stgfn) ; return retval ; } bool CvrStgFileTest::genericTestPosition (const CvrStgFile* f, const SamplePos pos, SampleValue* sv_r) const { SampleValue* sv_o = f->getSampleValue (pos) ; bool retval = (*sv_o == *sv_r) ; if (ArgVerbose && !retval) { std::cerr << std::endl << "---- FAILED: genericTestPosition ----" << std::endl ; std::cerr << "file->getSampleValue (" << pos << ") has key: " << std::hex << sv_o->getKey() << std::dec << std::endl ; std::cerr << "should be: " << std::hex << sv_r->getKey() << std::dec << std::endl ; std::cerr << "-------------------------------------" << std::endl ; } delete sv_o ; delete sv_r ; return retval ; } bool CvrStgFileTest::genericTestSVALCalculation (const CvrStgFile* f, const Graph* g) const { const std::vector& svs = g->SampleValues ; std::vector svals_generic = f->CvrStgFile::calcSVAdjacencyLists (svs) ; std::vector svals_specialized = f->calcSVAdjacencyLists (svs) ; bool ok = true ; for (EmbValue i = 0 ; i < f->getEmbValueModulus() ; i++) { ok = (*(svals_generic[i]) == *(svals_specialized[i])) && ok ; } return ok ; } bool CvrStgFileTest::genericTestEmbeddedValue (const CvrStgFile* f) const { bool retval = true ; for (SamplePos pos = 0 ; pos < f->getNumSamples() ; pos++) { SampleValue* sv = f->getSampleValue(pos) ; retval = (sv->getEmbeddedValue() == f->getEmbeddedValue(pos)) && retval ; delete sv ; } return retval ; } bool CvrStgFileTest::areEqual (const std::string& fn1, const std::string& fn2) const { char command[256] ; sprintf (command, "%s %s %s", COMPARE, fn1.c_str(), fn2.c_str()) ; return (system(command) ? false : true) ; } void CvrStgFileTest::removeFile (const std::string& fn) const { char command[256] ; sprintf (command, "%s %s", REMOVE, fn.c_str()) ; system (command) ; } void CvrStgFileTest::copyFile (const std::string& src, const std::string& dest) const { char command[256] ; sprintf (command, "%s %s %s", COPY, src.c_str(), dest.c_str()) ; system (command) ; } void CvrStgFileTest::moveFile (const std::string& src, const std::string& dest) const { copyFile (src, dest) ; removeFile (src) ; } steghide-0.5.1/tests/MCryptPPTest.h0000644000076400001440000000232007735577231012640 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_MCRYPTPPTEST_H #define SH_MCRYPTPPTEST_H #include "BitString.h" #include "MCryptPP.h" #include "UnitTest.h" #include "TestSuite.h" class MCryptPPTest : public UnitTest { public: MCryptPPTest (TestSuite* s) ; void testEncryption (void) ; void testDecryption (void) ; private: bool genericTestEncryption () ; bool genericTestDecryption () ; } ; #endif // ndef SH_MCRYPTPPTEST_H steghide-0.5.1/tests/UnitTest.h0000644000076400001440000000424607735577231012112 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_UNITTEST_H #define SH_UNITTEST_H #include #include #include "common.h" #include "Test.h" #include "TestCategoryCaller.h" // declared here to avoid circulating includes class TestCategory ; class TestSuite ; #define ADDTESTCATEGORY(UTCLASS,CMETHOD) \ addTestCategory (new TestCategoryCaller (strip_test(#CMETHOD), getSuite(), this, &UTCLASS::CMETHOD)) class UnitTest : public Test { public: /** * \param n name of this unit test (probably the name of the tested class) **/ UnitTest (std::string n, TestSuite* s) : Test(n,s), GlobsBackup(NULL) {} ; ~UnitTest (void) ; /** * setup the unit test - called before run * * UnitTest::setup will (together with UnitTest::cleanup) save and restore the object * stored in Globs so they should be called from the corresponding functions in the * derived object if the derived unit test manipulates the Globs object. **/ virtual void setup (void) ; void run (void) ; /** * cleanup the unit test - called after run **/ virtual void cleanup (void) ; protected: void addTestCategory (TestCategory *tc) ; void addTestResult (bool r) ; char *strip_test (char* s) { return (s + 4) ; } ; private: std::vector TestCategories ; /// servers as a backup for the Globals object stored in Globs Globals GlobsBackup ; } ; #endif // ndef SH_UNITTEST_H steghide-0.5.1/tests/WavPCMSampleValueTest.cc0000644000076400001440000000600007735577231014553 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "WavPCMSampleValueTest.h" #include "utcommon.h" #include "WavPCMSampleValue.h" #include "CvrStgFile.h" WavPCMSampleValueTest::WavPCMSampleValueTest (TestSuite* s) : SampleValueTest ("WavPCMSampleValue", s) { ADDTESTCATEGORY (WavPCMSampleValueTest, testDistance) ; ADDTESTCATEGORY (WavPCMSampleValueTest, testIsNeighbour) ; } void WavPCMSampleValueTest::setup () { UnitTest::setup() ; Globs.reset() ; f_WavPCM8 = CvrStgFile::readFile (std::string(DATADIR) + "pcm8_std.wav") ; sv_WavPCM8_0 = new WavPCMSampleValue (0) ; sv_WavPCM8_1 = new WavPCMSampleValue (1) ; sv_WavPCM8_45 = new WavPCMSampleValue (45) ; gl_WavPCM8 = Globs ; Globs.reset() ; f_WavPCM16 = CvrStgFile::readFile (std::string(DATADIR) + "pcm16_std.wav") ; sv_WavPCM16_m32768 = new WavPCMSampleValue (-32768) ; sv_WavPCM16_32767 = new WavPCMSampleValue (32767) ; sv_WavPCM16_0 = new WavPCMSampleValue (0) ; sv_WavPCM16_15 = new WavPCMSampleValue (15) ; gl_WavPCM16 = Globs ; } void WavPCMSampleValueTest::cleanup () { UnitTest::cleanup() ; delete f_WavPCM8 ; delete f_WavPCM16 ; delete sv_WavPCM8_0 ; delete sv_WavPCM8_1 ; delete sv_WavPCM8_45 ; delete sv_WavPCM16_m32768 ; delete sv_WavPCM16_32767 ; delete sv_WavPCM16_0 ; delete sv_WavPCM16_15 ; } void WavPCMSampleValueTest::testDistance () { Globs = gl_WavPCM8 ; addTestResult (genericTestDistance (sv_WavPCM8_0, sv_WavPCM8_1, 1)) ; addTestResult (genericTestDistance (sv_WavPCM8_1, sv_WavPCM8_45, 44)) ; Globs = gl_WavPCM16 ; addTestResult (genericTestDistance (sv_WavPCM16_0, sv_WavPCM16_15, 15)) ; addTestResult (genericTestDistance (sv_WavPCM16_15, sv_WavPCM16_32767, 32752)) ; addTestResult (genericTestDistance (sv_WavPCM16_m32768, sv_WavPCM16_32767, 65535)) ; } void WavPCMSampleValueTest::testIsNeighbour () { Globs = gl_WavPCM8 ; addTestResult (genericTestIsNeighbour (sv_WavPCM8_0, sv_WavPCM8_1, true)) ; addTestResult (genericTestIsNeighbour (sv_WavPCM8_0, sv_WavPCM8_45, false)) ; Globs = gl_WavPCM16 ; addTestResult (genericTestIsNeighbour (sv_WavPCM16_0, sv_WavPCM16_15, true)) ; addTestResult (genericTestIsNeighbour (sv_WavPCM16_m32768, sv_WavPCM16_0, false)) ; addTestResult (genericTestIsNeighbour (sv_WavPCM16_m32768, sv_WavPCM16_32767, false)) ; } steghide-0.5.1/tests/SelectorTest.h0000644000076400001440000000251407735577231012747 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_SELECTORTEST_H #define SH_SELECTORTEST_H class Selector ; #include "UnitTest.h" #include "TestSuite.h" class SelectorTest : public UnitTest { public: SelectorTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testIsPermutation (void) ; void testIsIdentityPermutation (void) ; private: Selector *s1, *s2, *s3, *s4 ; Selector *sid1, *sid2 ; bool genericTestIsPermutation (Selector* s) ; bool genericTestIsIdentityPermutation (Selector* s) ; } ; #endif // ndef SH_SELECTORTEST_H steghide-0.5.1/tests/TestCategoryCaller.h0000644000076400001440000000242007735577231014063 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_TESTCALLER_H #define SH_TESTCALLER_H #include "TestCategory.h" template class TestCategoryCaller : public TestCategory { public: typedef void (UTType::*TCMType)(); TestCategoryCaller (std::string n, TestSuite* s, UTType* o, TCMType m) : TestCategory(n,s), UTObject(o), TestMethod(m) {} ; void run (void) { (UTObject->*TestMethod)() ; } private: UTType* UTObject ; TCMType TestMethod ; } ; #endif // ndef SH_TESTCALLER_H steghide-0.5.1/tests/EdgeIteratorTest.h0000644000076400001440000000410307735577231013541 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_EDGEITERATORTEST_H #define SH_EDGEITERATORTEST_H #include "BitString.h" #include "CvrStgFile.h" #define private public #define protected public #include "Graph.h" #undef protected #undef private #include "EdgeIterator.h" #include "Selector.h" #include "UnitTest.h" #include "TestSuite.h" class EdgeIteratorTest : public UnitTest { public: EdgeIteratorTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testReferenceIteration (void) ; void testIterationLength (void) ; private: BitString *bs1, *bs2 ; CvrStgFile *f1, *f2 ; Selector *s1, *s2 ; Graph *g1, *g2 ; Globals gl1, gl2 ; BitString *bs10, *bs11, *bs12 ; CvrStgFile *f10, *f11, *f12 ; Selector *s10, *s11, *s12 ; Graph *g10, *g11, *g12 ; Globals gl10, gl11, gl12 ; bool genericTestGraphIteration (Graph* g, EdgeIterator::ITERATIONMODE m) ; /** * check if an edge iterator for srcvertex with m iterates exactly through edges **/ bool genericTestVertexIteration (Vertex* srcvertex, EdgeIterator::ITERATIONMODE m, const std::vector& edges) ; /** * for all vertices in the graph test if getDegree() returns exactly the number of edges EdgeIterator iterates through **/ bool genericTestIterationLength (Graph* g) ; } ; #endif // ndef SH_EDGEITERATORTEST_H steghide-0.5.1/tests/MHashKeyGenTest.cc0000644000076400001440000000173607735577231013435 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "MHashKeyGenTest.h" #include "BitString.h" MHashKeyGenTest::MHashKeyGenTest (TestSuite* s) : UnitTest ("MHashKeyGen", s) { } steghide-0.5.1/tests/BmpPaletteSampleValueTest.h0000644000076400001440000000263507735577231015367 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BMPPALETTESAMPLEVALUETEST_H #define SH_BMPPALETTESAMPLEVALUETEST_H #include "SampleValueTest.h" class CvrStgFile ; class BmpPaletteSampleValueTest : public SampleValueTest { public: BmpPaletteSampleValueTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testDistance (void) ; void testIsNeighbour (void) ; private: CvrStgFile *f1, *f2 ; Globals gl1, gl2 ; SampleValue *sv1_0, *sv1_3, *sv1_7, *sv1_15 ; SampleValue *sv2_3_49_96_5, *sv2_10_11_99_203, *sv2_48_18_106_194, *sv2_68_73_104_15, *sv2_171_61_97_25 ; } ; #endif // ndef SH_BMPPALETTESAMPLEVALUETEST_H steghide-0.5.1/tests/BmpOS2FileTest.cc0000644000076400001440000001141707735577231013171 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "BmpPaletteSampleValue.h" #include "BmpRGBSampleValue.h" #include "utcommon.h" #include "BmpOS2FileTest.h" BmpOS2FileTest::BmpOS2FileTest (TestSuite* s) : CvrStgFileTest("BmpOS2File", s) { ADDTESTCATEGORY (BmpOS2FileTest, testReadWrite) ; ADDTESTCATEGORY (BmpOS2FileTest, testReadEmbedExtract) ; ADDTESTCATEGORY (BmpOS2FileTest, testReadEmbedWriteReadExtract) ; ADDTESTCATEGORY (BmpOS2FileTest, testPosition) ; ADDTESTCATEGORY (BmpOS2FileTest, testEmbeddedValue) ; } void BmpOS2FileTest::setup () { UnitTest::setup() ; Globs.reset() ; bs1 = new BitString (std::string ("a test")) ; f1 = CvrStgFile::readFile (std::string(DATADIR) + "os21x1_std.bmp") ; gl1 = Globs ; Globs.reset() ; bs2 = new BitString (std::string ("another test - this time a little longer")) ; f2 = CvrStgFile::readFile (std::string(DATADIR) + "os21x4_std.bmp") ; gl2 = Globs ; Globs.reset() ; bs3 = new BitString (std::string ("yet another test")) ; f3 = CvrStgFile::readFile (std::string(DATADIR) + "os21x8_std.bmp") ; gl3 = Globs ; Globs.reset() ; bs4 = new BitString (std::string ("last test")) ; f4 = CvrStgFile::readFile (std::string(DATADIR) + "os21x24_std.bmp") ; gl4 = Globs ; } void BmpOS2FileTest::cleanup () { UnitTest::cleanup() ; delete bs1 ; delete bs2 ; delete bs3 ; delete bs4 ; delete f1 ; delete f2 ; delete f3 ; delete f4 ; } void BmpOS2FileTest::testReadWrite (void) { Globs = gl1 ; addTestResult(genericTestReadWrite(std::string(DATADIR) + "os21x1_std.bmp")) ; Globs = gl2 ; addTestResult(genericTestReadWrite(std::string(DATADIR) + "os21x4_std.bmp")) ; Globs = gl3 ; addTestResult(genericTestReadWrite(std::string(DATADIR) + "os21x8_std.bmp")) ; Globs = gl4 ; addTestResult(genericTestReadWrite(std::string(DATADIR) + "os21x24_std.bmp")) ; } void BmpOS2FileTest::testReadEmbedExtract (void) { Globs = gl1 ; addTestResult(genericTestReadEmbedExtract(std::string(DATADIR) + "os21x1_std.bmp", *bs1)) ; Globs = gl2 ; addTestResult(genericTestReadEmbedExtract(std::string(DATADIR) + "os21x4_std.bmp", *bs2)) ; Globs = gl3 ; addTestResult(genericTestReadEmbedExtract(std::string(DATADIR) + "os21x8_std.bmp", *bs3)) ; Globs = gl4 ; addTestResult(genericTestReadEmbedExtract(std::string(DATADIR) + "os21x24_std.bmp", *bs4)) ; } void BmpOS2FileTest::testReadEmbedWriteReadExtract (void) { Globs = gl1 ; addTestResult(genericTestReadEmbedWriteReadExtract(std::string(DATADIR) + "os21x1_std.bmp", *bs2)) ; Globs = gl2 ; addTestResult(genericTestReadEmbedWriteReadExtract(std::string(DATADIR) + "os21x4_std.bmp", *bs3)) ; Globs = gl3 ; addTestResult(genericTestReadEmbedWriteReadExtract(std::string(DATADIR) + "os21x8_std.bmp", *bs4)) ; Globs = gl4 ; addTestResult(genericTestReadEmbedWriteReadExtract(std::string(DATADIR) + "os21x24_std.bmp", *bs1)) ; } void BmpOS2FileTest::testPosition() { Globs = gl1 ; addTestResult (genericTestPosition (f1, 0, new BmpPaletteSampleValue (1))) ; addTestResult (genericTestPosition (f1, 1, new BmpPaletteSampleValue (1))) ; addTestResult (genericTestPosition (f1, 2, new BmpPaletteSampleValue (1))) ; addTestResult (genericTestPosition (f1, 50, new BmpPaletteSampleValue (0))) ; addTestResult (genericTestPosition (f1, 2300, new BmpPaletteSampleValue (0))) ; addTestResult (genericTestPosition (f1, 2303, new BmpPaletteSampleValue (1))) ; Globs = gl2 ; addTestResult (genericTestPosition (f2, 0, new BmpPaletteSampleValue (7))) ; addTestResult (genericTestPosition (f2, 10, new BmpPaletteSampleValue (5))) ; addTestResult (genericTestPosition (f2, 95, new BmpPaletteSampleValue (1))) ; addTestResult (genericTestPosition (f2, 96, new BmpPaletteSampleValue (8))) ; // TODO } void BmpOS2FileTest::testReadExtractCompare () { // TODO } void BmpOS2FileTest::testEmbeddedValue () { Globs = gl1 ; addTestResult (genericTestEmbeddedValue (f1)) ; Globs = gl2 ; addTestResult (genericTestEmbeddedValue (f2)) ; Globs = gl3 ; addTestResult (genericTestEmbeddedValue (f3)) ; Globs = gl4 ; addTestResult (genericTestEmbeddedValue (f4)) ; } steghide-0.5.1/tests/DummyFile.h0000644000076400001440000000605207735577231012223 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_DUMMYFILE_H #define SH_DUMMYFILE_H #include #include class BitString ; #include "CvrStgFile.h" class Selector ; #include "common.h" /** * \class DummyFile * \brief a dummy CvrStgFile implementation to facilitate testing and debugging **/ class DummyFile : public CvrStgFile { public: /** * construct a DummyFile object containing the sample values 0,1,...,s-1 * \param s the size of the DummyFile (i.e. the number of samples it should contain) * \param svam the SampleValueAdjacencyMatrix for the Samples in this file **/ DummyFile (UWORD16 s, std::vector >* svam) ; std::list getProperties (void) const ; unsigned long getNumSamples (void) const ; void replaceSample (const SamplePos pos, const SampleValue* s) ; SampleValue* getSampleValue (const SamplePos pos) const ; std::vector >* getSampleValueAdjacencyMatrix() const { return SampleValueAdjacencyMatrix ; } ; /** * create a BitString, a DummyFile and a Selector that together will produce a graph like described by the adjacency list * \param adjlist an adjacency list describing the "target graph" * \param bs will be filled with the BitString * \param f will be filled with the DummyFile * \param s will be filled with the Selector * * Constructing a Graph object with "Graph (*f, **bs, **s)" will result in a graph of the form of adjlist. * * The constructed graph has the following form: * SamplesPerVertex == 2, EmbValueModulus = 2 * every vertex has a sample value with bit == 0 at index 0 and one with bit == 1 at index 1, * if two vertices are adjacent, one end of the edge is at index 0 of the vertex with * the lower vertex label and the other end of the edge is at index 1 of the vertex with * the higher vertex label. * The distance between vertex with label i and vertex with label j is : 2*|j - i| + 1 **/ static void createGraph (std::vector >& adjlist, BitString** bs, CvrStgFile** f, Selector** s) ; private: static const unsigned short SamplesPerVertex = 2 ; static const EmbValue EmbValueModulus = 2 ; std::vector Samples ; std::vector >* SampleValueAdjacencyMatrix ; } ; #endif // ndef SH_DUMMYFILE_H steghide-0.5.1/tests/AudioSampleValueTest.h0000644000076400001440000000261007735577231014364 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_AUDIOSAMPLEVALUETEST_H #define SH_AUDIOSAMPLEVALUETEST_H #include "SampleValueTest.h" class CvrStgFile ; class AudioSampleValueTest : public SampleValueTest { public: AudioSampleValueTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testDistance (void) ; void testIsNeighbour (void) ; private: CvrStgFile *f_AuMuLaw, *f_AuPCM16 ; SampleValue *sv_AuMuLaw_0, *sv_AuMuLaw_1, *sv_AuMuLaw_45, *sv_AuPCM16_m32768, *sv_AuPCM16_32767, *sv_AuPCM16_0, *sv_AuPCM16_15 ; Globals gl_AuMuLaw, gl_AuPCM16 ; } ; #endif // ndef SH_AUDIOSAMPLEVALUETEST_H steghide-0.5.1/tests/MHashKeyGenTest.h0000644000076400001440000000226407735577231013274 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_MHASHKEYGENTEST_H #define SH_MHASHKEYGENTEST_H #include "BitString.h" #include "MHashKeyGen.h" #include "UnitTest.h" #include "TestSuite.h" class MHashKeyGenTest : public UnitTest { public: MHashKeyGenTest (TestSuite* s) ; private: #if 0 // TODO - implement this unit test bool genericTestReference () ; #endif } ; #endif // ndef SH_MHASHKEYGENTEST_H steghide-0.5.1/tests/SampleValueAdjacencyListTest.h0000644000076400001440000000263507735577231016047 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_SAMPLEVALUEOPPOSITENEIGHBOURHOODTEST_H #define SH_SAMPLEVALUEOPPOSITENEIGHBOURHOODTEST_H #define private public #define protected public #include "SampleValueAdjacencyList.h" #undef private #undef protected #include "UnitTest.h" #include "TestSuite.h" class SampleValueAdjacencyListTest : public UnitTest { public: SampleValueAdjacencyListTest (TestSuite* s) ; void setup (void) ; void testEquality (void) ; void testQuicksort (void) ; private: SampleValueAdjacencyList DummySVAL ; std::vector SVEmpty ; } ; #endif // ndef SH_SAMPLEVALUEOPPOSITENEIGHBOURHOODTEST_H steghide-0.5.1/tests/Test.h0000644000076400001440000000253407735577231011250 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_TEST_H #define SH_TEST_H #include class TestSuite ; class Test { public: Test (void) : Name(std::string("unnamed test")), Suite(NULL) {} ; Test (const std::string& n) : Name(n), Suite(NULL) {} ; Test (const std::string& n, TestSuite* s) : Name(n), Suite(s) {} ; virtual ~Test (void) {} ; const std::string& getName (void) { return Name ; } ; TestSuite* getSuite (void) { return Suite ; } ; virtual void run (void) = 0 ; private: std::string Name ; TestSuite* Suite ; } ; #endif // ndef SH_TEST_H steghide-0.5.1/tests/BitStringTest.cc0000644000076400001440000002475207735577231013242 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include "BitStringTest.h" #include "TestCategoryCaller.h" BitStringTest::BitStringTest (TestSuite* s) : UnitTest ("BitString", s) { ADDTESTCATEGORY (BitStringTest, testBitInputOutput) ; ADDTESTCATEGORY (BitStringTest, testLength) ; ADDTESTCATEGORY (BitStringTest, testDatatypeInput) ; ADDTESTCATEGORY (BitStringTest, testDatatypeOutput) ; ADDTESTCATEGORY (BitStringTest, testEquality) ; ADDTESTCATEGORY (BitStringTest, testCutting) ; ADDTESTCATEGORY (BitStringTest, testCompression) ; ADDTESTCATEGORY (BitStringTest, testArity) ; } void BitStringTest::setup () { bs_0 = new BitString() ; bs_0->append(false) ; bs_1 = new BitString() ; bs_1->append(true) ; bs_10 = new BitString() ; bs_10->append(true) ; bs_10->append(false) ; bs_001 = new BitString() ; bs_001->append (false) ; bs_001->append (false) ; bs_001->append (true) ; bs_100 = new BitString() ; bs_100->append(true) ; bs_100->append(false) ; bs_100->append(false) ; bs_1010 = new BitString() ; bs_1010->append(true) ; bs_1010->append(false) ; bs_1010->append(true) ; bs_1010->append(false) ; bs_1110 = new BitString() ; bs_1110->append(true) ; bs_1110->append(true) ; bs_1110->append(true) ; bs_1110->append(false) ; bs_01011 = new BitString() ; bs_01011->append(false) ; bs_01011->append(true) ; bs_01011->append(false) ; bs_01011->append(true) ; bs_01011->append(true) ; bs_10010 = new BitString() ; bs_10010->append(true) ; bs_10010->append(false) ; bs_10010->append(false) ; bs_10010->append(true) ; bs_10010->append(false) ; bs_10101110 = new BitString() ; bs_10101110->append(true) ; bs_10101110->append(false) ; bs_10101110->append(true) ; bs_10101110->append(false) ; bs_10101110->append(true) ; bs_10101110->append(true) ; bs_10101110->append(true) ; bs_10101110->append(false) ; bs_101011101 = new BitString() ; bs_101011101->append(true) ; bs_101011101->append(false) ; bs_101011101->append(true) ; bs_101011101->append(false) ; bs_101011101->append(true) ; bs_101011101->append(true) ; bs_101011101->append(true) ; bs_101011101->append(false) ; bs_101011101->append(true) ; } void BitStringTest::cleanup () { delete bs_0 ; delete bs_1 ; delete bs_10 ; delete bs_001 ; delete bs_100 ; delete bs_1010 ; delete bs_1110 ; delete bs_01011 ; delete bs_10010 ; delete bs_10101110 ; delete bs_101011101 ; } void BitStringTest::testBitInputOutput() { addTestResult((*bs_0)[0] == false) ; addTestResult((*bs_1)[0] == true) ; addTestResult( (*bs_10010)[0] == true && (*bs_10010)[1] == false && (*bs_10010)[2] == false && (*bs_10010)[3] == true && (*bs_10010)[4] == false) ; addTestResult( (*bs_10101110)[0] == true && (*bs_10101110)[1] == false && (*bs_10101110)[2] == true && (*bs_10101110)[3] == false && (*bs_10101110)[4] == true && (*bs_10101110)[5] == true && (*bs_10101110)[6] == true && (*bs_10101110)[7] == false) ; addTestResult( (*bs_101011101)[0] == true && (*bs_101011101)[1] == false && (*bs_101011101)[2] == true && (*bs_101011101)[3] == false && (*bs_101011101)[4] == true && (*bs_101011101)[5] == true && (*bs_101011101)[6] == true && (*bs_101011101)[7] == false && (*bs_101011101)[8] == true) ; { BitString bs1 = *bs_10010 ; BitString bs2 = *bs_01011 ; bs1.setBit(0, 0) ; bs1.setBit(1, 1) ; bs2.setBit(4, 0) ; addTestResult (bs1 == bs2) ; } } void BitStringTest::testLength() { addTestResult(bs_0->getLength() == 1) ; addTestResult(bs_1->getLength() == 1) ; addTestResult(bs_10010->getLength() == 5) ; addTestResult(bs_10101110->getLength() == 8) ; addTestResult(bs_101011101->getLength() == 9) ; } void BitStringTest::testDatatypeInput() { { UWORD16 v = 0xFF81 ; BitString bs ; bs.append (v, 10) ; addTestResult (bs.getLength() == 10 && bs.Data[0] == 0x81 && bs.Data[1] == 0x03) ; } { std::string str ("test") ; BitString bs (str) ; addTestResult (bs.getLength() == 32 && bs.Data[0] == 't' && bs.Data[1] == 'e' && bs.Data[2] == 's' && bs.Data[3] == 't') ; } { std::vector vec ; vec.push_back (123) ; vec.push_back (45) ; vec.push_back (6) ; BitString bs (vec) ; addTestResult (bs.getLength() == 24 && bs.Data[0] == 123 && bs.Data[1] == 45 && bs.Data[2] == 6) ; } { BitString bs1 ; bs1.append(true).append(false).append(true).append(false) ; BitString bs2 ; bs2.append(false).append(true).append(true).append(false).append(bs1) ; addTestResult (bs2.getLength() == 8 && bs2.Data[0] == 0x56) ; } { BitString bs1 ; bs1.append(false).append(true).append(true).append(true).append(true).append(true) ; bs1.cutBits (1, 5) ; BitString bs2 ; bs2.append(true).append(false).append(true).append(true).append(false).append(true).append(false).append(true) ; bs2.append(true).append(false).append(false).append(false).append(false).append(false).append(false).append(false) ; bs2.append(false).append(false).append(false).append(false).append(false).append(false).append(false).append(false) ; bs2.append(false).append(false).append(false).append(false).append(false).append(false).append(false).append(false) ; bs1.append (bs2) ; BitString bsref ; bsref.append(false).append(true).append(false).append(true).append(true).append(false).append(true).append(false) ; bsref.append(true).append(true).append(false).append(false).append(false).append(false).append(false).append(false) ; bsref.append(false).append(false).append(false).append(false).append(false).append(false).append(false).append(false) ; bsref.append(false).append(false).append(false).append(false).append(false).append(false).append(false).append(false) ; bsref.append(false) ; if (bs1 != bsref) { std::cerr << "bs1:" << std::endl ; bs1.print(1) ; std::cerr << "bsref:" << std::endl ; bsref.print(1) ; } addTestResult (bs1 == bsref) ; } } void BitStringTest::testDatatypeOutput() { addTestResult (bs_10010->getValue(1, 2) == 0) ; { std::vector vec ; vec.push_back(0x88) ; vec.push_back(0x07) ; BitString bs (vec) ; addTestResult (bs.getValue(4, 8) == 0x78) ; } { BitString bs = bs_10101110->getBits(2, 4) ; addTestResult (bs.getLength() == 4 && bs[0] == true && bs[1] == false && bs[2] == true && bs[3] == true) ; } { std::vector vec = bs_10101110->getBytes() ; addTestResult (vec.size() == 1 && vec[0] == 0x75) ; } } void BitStringTest::testEquality() { addTestResult (*bs_0 == *bs_0) ; addTestResult (!(*bs_0 == *bs_1)) ; { BitString bs (std::string("a test")) ; addTestResult (bs == bs) ; } { BitString bs1 ; bs1.append ((BYTE) 0xAB) ; BitString bs2 ; bs2.append(true).append(true).append(false).append(true) ; bs2.append(false).append(true).append(false).append(true) ; addTestResult (bs1 == bs2) ; } } void BitStringTest::testCutting () { { BitString bs1 = *bs_10010 ; BitString bs2 = *bs_100 ; addTestResult (bs1.truncate(0, 3) == bs2) ; } { BitString bs1 = *bs_10101110 ; BitString bs2 ; bs2.append(true).append(false).append(true).append(true) ; addTestResult (bs1.truncate(2, 6) == bs2) ; } { BitString bs1 = *bs_10010 ; BitString bs2 = *bs_001 ; BitString bs3 = *bs_10 ; BitString middle = bs1.cutBits(1, 3) ; addTestResult (middle == bs2 && bs1 == bs3) ; } { BitString bs1 = *bs_10101110 ; BitString bs2 = *bs_1110 ; BitString bs3 = *bs_1010 ; BitString cutted = bs1.cutBits(4, 4) ; addTestResult (cutted == bs2 && bs1 == bs3) ; } { BitString bs1 ; bs1.append(false) ; BitString bs2 ; bs2.append(true).append(false).append(true).append(true).append(false).append(true).append(false).append(true) ; bs2.append(true).append(false).append(false).append(false).append(false).append(false).append(false).append(false) ; bs2.append(false).append(false).append(false).append(false).append(false).append(false).append(false).append(false) ; bs2.append(false).append(false).append(false).append(false).append(false).append(false).append(false).append(false) ; bs1.append (bs2) ; BitString bs3 = bs1.cutBits (0, 32) ; BitString bsref ; bsref.append(false).append(true).append(false).append(true).append(true).append(false).append(true).append(false) ; bsref.append(true).append(true).append(false).append(false).append(false).append(false).append(false).append(false) ; bsref.append(false).append(false).append(false).append(false).append(false).append(false).append(false).append(false) ; bsref.append(false).append(false).append(false).append(false).append(false).append(false).append(false).append(false) ; addTestResult (bs3 == bsref && bs1 == *bs_0) ; } } void BitStringTest::testCompression () { #ifdef USE_ZLIB { BitString bs1 (std::string("a test of tests of some recurrence")) ; BitString bs2 = bs1 ; bs1.compress (9) ; bs1.uncompress (bs2.getLength()) ; addTestResult (bs1 == bs2) ; } { BitString bs1 (std::string("afafafafafafafaf")) ; BitString bs2 = bs1 ; bs1.compress(9) ; addTestResult (bs1 != bs2) ; } #else addTestResult (TestSuite::NOTINSTALLED) ; #endif // def USE_ZLIB } void BitStringTest::testArity () { bs_0->setArity(2) ; addTestResult (bs_0->getNAry(0) == 0) ; bs_1->setArity(2) ; addTestResult (bs_1->getNAry(0) == 1) ; bs_10010->setArity(4) ; addTestResult (bs_10010->getNAry(1) != 3) ; bs_101011101->setArity(8) ; addTestResult (bs_101011101->getNAry(2) == 5) ; { BitString bs1 ; bs1.setArity(2) ; bs1.appendNAry (0) ; bs1.setArity(8) ; bs1.appendNAry (6) ; bs1.appendNAry (1) ; bs1.setArity(4) ; bs1.appendNAry (3) ; BitString bs2 ; bs2.append(false) ; bs2.append(false).append(true).append(true) ; bs2.append(true).append(false).append(false) ; bs2.append(true).append(true) ; addTestResult (bs1 == bs2) ; } } steghide-0.5.1/tests/WavPCMSampleValueTest.h0000644000076400001440000000262307735577231014424 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_WAVPCMSAMPLEVALUETEST_H #define SH_WAVPCMSAMPLEVALUETEST_H #include "SampleValueTest.h" class CvrStgFile ; class WavPCMSampleValueTest : public SampleValueTest { public: WavPCMSampleValueTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testDistance (void) ; void testIsNeighbour (void) ; private: CvrStgFile *f_WavPCM8, *f_WavPCM16 ; SampleValue *sv_WavPCM8_0, *sv_WavPCM8_1, *sv_WavPCM8_45, *sv_WavPCM16_m32768, *sv_WavPCM16_32767, *sv_WavPCM16_0, *sv_WavPCM16_15 ; Globals gl_WavPCM8, gl_WavPCM16 ; } ; #endif // ndef SH_WAVPCMSAMPLEVALUETEST_H steghide-0.5.1/tests/BmpOS2FileTest.h0000644000076400001440000000263207735577231013032 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BMPOS2FILETEST_H #define SH_BMPOS2FILETEST_H #include "BmpFile.h" #include "CvrStgFileTest.h" class BmpOS2FileTest : public CvrStgFileTest { public: BmpOS2FileTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testReadWrite (void) ; void testReadEmbedExtract (void) ; void testReadEmbedWriteReadExtract (void) ; void testPosition (void) ; void testReadExtractCompare (void) ; void testEmbeddedValue (void) ; private: BitString *bs1, *bs2, *bs3, *bs4 ; CvrStgFile *f1, *f2, *f3, *f4 ; Globals gl1, gl2, gl3, gl4 ; } ; #endif // ndef SH_BMPOS2FILETEST_H steghide-0.5.1/tests/GraphTest.cc0000644000076400001440000002711407735577231012371 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "BitString.h" #include "CvrStgFile.h" #define private public #define protected public #include "Graph.h" #undef private #undef protected #include "Selector.h" #include "utcommon.h" #include "GraphTest.h" GraphTest::GraphTest (TestSuite* s) : UnitTest ("Graph", s) { ADDTESTCATEGORY (GraphTest, testSampleValues) ; ADDTESTCATEGORY (GraphTest, testVertices) ; ADDTESTCATEGORY (GraphTest, testSampleOccurences) ; ADDTESTCATEGORY (GraphTest, testSampleValueAdjacencyLists) ; } void GraphTest::setup () { UnitTest::setup() ; Globs.reset() ; f1 = CvrStgFile::readFile (std::string(DATADIR) + "win3x1_std.bmp") ; bs1 = new BitString (std::string ("this BitString will be embedded")) ; s1 = new Selector (bs1->getLength() * f1->getSamplesPerVertex(), std::string ("a passphrase")) ; g1 = new Graph (f1, *bs1, *s1) ; gl1 = Globs ; Globs.reset() ; f2 = CvrStgFile::readFile (std::string(DATADIR) + "win3x4_std.bmp") ; bs2 = new BitString (std::string ("this is a test")) ; s2 = new Selector (bs2->getLength() * f2->getSamplesPerVertex(), std::string ("another passphrase")) ; g2 = new Graph (f2, *bs2, *s2) ; gl2 = Globs ; Globs.reset() ; f3 = CvrStgFile::readFile (std::string(DATADIR) + "win3x8_std.bmp") ; bs3 = new BitString (std::string ("this is another test")) ; s3 = new Selector (bs3->getLength() * f3->getSamplesPerVertex(), std::string ("yet another passphrase")) ; g3 = new Graph (f3, *bs3, *s3) ; gl3 = Globs ; Globs.reset() ; f4 = CvrStgFile::readFile (std::string(DATADIR) + "win3x24_std.bmp") ; bs4 = new BitString (std::string ("this time embedding in RGB pixel data")) ; s4 = new Selector (bs4->getLength() * f4->getSamplesPerVertex(), std::string ("a true-color passphrase ;-)")) ; g4 = new Graph (f4, *bs4, *s4) ; gl4 = Globs ; Globs.reset() ; f5 = CvrStgFile::readFile (std::string(DATADIR) + "os21x1_std.bmp") ; bs5 = new BitString (std::string ("this BitString will be embedded")) ; s5 = new Selector (bs5->getLength() * f5->getSamplesPerVertex(), std::string ("a passphrase")) ; g5 = new Graph (f5, *bs5, *s5) ; gl5 = Globs ; Globs.reset() ; f6 = CvrStgFile::readFile (std::string(DATADIR) + "os21x4_std.bmp") ; bs6 = new BitString (std::string ("this is a test")) ; s6 = new Selector (bs6->getLength() * f6->getSamplesPerVertex(), std::string ("another passphrase")) ; g6 = new Graph (f6, *bs6, *s6) ; gl6 = Globs ; Globs.reset() ; f7 = CvrStgFile::readFile (std::string(DATADIR) + "os21x8_std.bmp") ; bs7 = new BitString (std::string ("this is another test")) ; s7 = new Selector (bs7->getLength() * f7->getSamplesPerVertex(), std::string ("yet another passphrase")) ; g7 = new Graph (f7, *bs7, *s7) ; gl7 = Globs ; Globs.reset() ; f8 = CvrStgFile::readFile (std::string(DATADIR) + "os21x24_std.bmp") ; bs8 = new BitString (std::string ("this time embedding in RGB pixel data")) ; s8 = new Selector (bs8->getLength() * f8->getSamplesPerVertex(), std::string ("a true-color passphrase ;-)")) ; g8 = new Graph (f8, *bs8, *s8) ; gl8 = Globs ; Globs.reset() ; f9 = CvrStgFile::readFile (std::string(DATADIR) + "mulaw_std.au") ; bs9 = new BitString (std::string ("u-law or mu-law that's the question")) ; s9 = new Selector (bs9->getLength() * f9->getSamplesPerVertex(), std::string ("muuuuuuuu")) ; g9 = new Graph (f9, *bs9, *s9) ; gl9 = Globs ; Globs.reset() ; f10 = CvrStgFile::readFile (std::string(DATADIR) + "pcm8_std.au") ; bs10 = new BitString (std::string ("also au files can have pcm encoded data")) ; s10 = new Selector (bs10->getLength() * f10->getSamplesPerVertex(), std::string ("pulse code modulation")) ; g10 = new Graph (f10, *bs10, *s10) ; gl10 = Globs ; Globs.reset() ; f11 = CvrStgFile::readFile (std::string(DATADIR) + "pcm16_std.au") ; bs11 = new BitString (std::string ("even with 16 bits per sample")) ; s11 = new Selector (bs11->getLength() * f11->getSamplesPerVertex(), std::string ("pcm16")) ; g11 = new Graph (f11, *bs11, *s11) ; gl11 = Globs ; Globs.reset() ; f12 = CvrStgFile::readFile (std::string(DATADIR) + "pcm8_std.wav") ; bs12 = new BitString (std::string ("8 bit pcm data in a riff wav file")) ; s12 = new Selector (bs12->getLength() * f12->getSamplesPerVertex(), std::string ("afaf")) ; g12 = new Graph (f12, *bs12, *s12) ; gl12 = Globs ; Globs.reset() ; f13 = CvrStgFile::readFile (std::string(DATADIR) + "pcm16_std.wav") ; bs13 = new BitString (std::string ("16 bits per sample")) ; s13 = new Selector (bs13->getLength() * f13->getSamplesPerVertex(), std::string ("passphrase")) ; g13 = new Graph (f13, *bs13, *s13) ; gl13 = Globs ; Globs.reset() ; f14 = CvrStgFile::readFile (std::string(DATADIR) + "std.jpg") ; bs14 = new BitString (std::string ("standard jpeg produced by the GIMP")) ; s14 = new Selector (bs14->getLength() * f14->getSamplesPerVertex(), std::string ("passphrase")) ; g14 = new Graph (f14, *bs14, *s14) ; gl14 = Globs ; Globs.reset() ; f15 = CvrStgFile::readFile (std::string(DATADIR) + "prog.jpg") ; bs15 = new BitString (std::string ("progressive encoding")) ; s15 = new Selector (bs15->getLength() * f15->getSamplesPerVertex(), std::string ("passphrase")) ; g15 = new Graph (f15, *bs15, *s15) ; gl15 = Globs ; Globs.reset() ; f_f = CvrStgFile::readFile (std::string(DATADIR) + "win3x24_std.bmp") ; bs_f = new BitString (std::string ("this time embedding in RGB pixel data")) ; s_f = new Selector (bs_f->getLength() * f_f->getSamplesPerVertex(), std::string ("a true-color passphrase ;-)")) ; g_f = new Graph (f_f, *bs_f, *s_f) ; gl_f = Globs ; } void GraphTest::cleanup () { UnitTest::cleanup() ; delete f1 ; delete bs1 ; delete s1 ; delete g1 ; delete f2 ; delete bs2 ; delete s2 ; delete g2 ; delete f3 ; delete bs3 ; delete s3 ; delete g3 ; delete f4 ; delete bs4 ; delete s4 ; delete g4 ; delete f5 ; delete bs5 ; delete s5 ; delete g5 ; delete f6 ; delete bs6 ; delete s6 ; delete g6 ; delete f7 ; delete bs7 ; delete s7 ; delete g7 ; delete f8 ; delete bs8 ; delete s8 ; delete g8 ; delete f9 ; delete bs9 ; delete s9 ; delete g9 ; delete f10 ; delete bs10 ; delete s10 ; delete g10 ; delete f11 ; delete bs11 ; delete s11 ; delete g11 ; delete f12 ; delete bs12 ; delete s12 ; delete g12 ; delete f13 ; delete bs13 ; delete s13 ; delete g13 ; delete f14 ; delete bs14 ; delete s14 ; delete g14 ; delete f15 ; delete bs15 ; delete s15 ; delete g15 ; // *_f are not delted because inconsistencies might crash the destructors } void GraphTest::testVertices() { Globs = gl1 ; addTestResult (g1->check_Vertices(ArgVerbose)) ; Globs = gl2 ; addTestResult (g2->check_Vertices(ArgVerbose)) ; Globs = gl3 ; addTestResult (g3->check_Vertices(ArgVerbose)) ; Globs = gl4 ; addTestResult (g4->check_Vertices(ArgVerbose)) ; Globs = gl5 ; addTestResult (g5->check_Vertices(ArgVerbose)) ; Globs = gl6 ; addTestResult (g6->check_Vertices(ArgVerbose)) ; Globs = gl7 ; addTestResult (g7->check_Vertices(ArgVerbose)) ; Globs = gl8 ; addTestResult (g8->check_Vertices(ArgVerbose)) ; Globs = gl9 ; addTestResult (g9->check_Vertices(ArgVerbose)) ; Globs = gl10 ; addTestResult (g10->check_Vertices(ArgVerbose)) ; Globs = gl11 ; addTestResult (g11->check_Vertices(ArgVerbose)) ; Globs = gl12 ; addTestResult (g12->check_Vertices(ArgVerbose)) ; Globs = gl13 ; addTestResult (g13->check_Vertices(ArgVerbose)) ; Globs = gl14 ; addTestResult (g14->check_Vertices(ArgVerbose)) ; Globs = gl15 ; addTestResult (g15->check_Vertices(ArgVerbose)) ; // violate label consistency Globs = gl_f ; Vertex* tmp = g_f->Vertices[10] ; g_f->Vertices[10] = g_f->Vertices[11] ; g_f->Vertices[11] = tmp ; addTestResult (!g_f->check_Vertices()) ; } void GraphTest::testSampleValues() { Globs = gl1 ; addTestResult (g1->check_SampleValues(ArgVerbose)) ; Globs = gl2 ; addTestResult (g2->check_SampleValues(ArgVerbose)) ; Globs = gl3 ; addTestResult (g3->check_SampleValues(ArgVerbose)) ; Globs = gl4 ; addTestResult (g4->check_SampleValues(ArgVerbose)) ; Globs = gl5 ; addTestResult (g5->check_SampleValues(ArgVerbose)) ; Globs = gl6 ; addTestResult (g6->check_SampleValues(ArgVerbose)) ; Globs = gl7 ; addTestResult (g7->check_SampleValues(ArgVerbose)) ; Globs = gl8 ; addTestResult (g8->check_SampleValues(ArgVerbose)) ; Globs = gl9 ; addTestResult (g9->check_SampleValues(ArgVerbose)) ; Globs = gl10 ; addTestResult (g10->check_SampleValues(ArgVerbose)) ; Globs = gl11 ; addTestResult (g11->check_SampleValues(ArgVerbose)) ; Globs = gl12 ; addTestResult (g12->check_SampleValues(ArgVerbose)) ; Globs = gl13 ; addTestResult (g13->check_SampleValues(ArgVerbose)) ; Globs = gl14 ; addTestResult (g14->check_SampleValues(ArgVerbose)) ; Globs = gl15 ; addTestResult (g15->check_SampleValues(ArgVerbose)) ; // violate uniqueness Globs = gl_f ; g_f->SampleValues[0] = g_f->SampleValues[1] ; addTestResult (!g_f->check_SampleValues()) ; } void GraphTest::testSampleOccurences() { Globs = gl1 ; addTestResult (g1->check_SampleOccurences(ArgVerbose)) ; Globs = gl2 ; addTestResult (g2->check_SampleOccurences(ArgVerbose)) ; Globs = gl3 ; addTestResult (g3->check_SampleOccurences(ArgVerbose)) ; Globs = gl4 ; addTestResult (g4->check_SampleOccurences(ArgVerbose)) ; Globs = gl5 ; addTestResult (g5->check_SampleOccurences(ArgVerbose)) ; Globs = gl6 ; addTestResult (g6->check_SampleOccurences(ArgVerbose)) ; Globs = gl7 ; addTestResult (g7->check_SampleOccurences(ArgVerbose)) ; Globs = gl8 ; addTestResult (g8->check_SampleOccurences(ArgVerbose)) ; Globs = gl9 ; addTestResult (g9->check_SampleOccurences(ArgVerbose)) ; Globs = gl10 ; addTestResult (g10->check_SampleOccurences(ArgVerbose)) ; Globs = gl11 ; addTestResult (g11->check_SampleOccurences(ArgVerbose)) ; Globs = gl12 ; addTestResult (g12->check_SampleOccurences(ArgVerbose)) ; Globs = gl13 ; addTestResult (g13->check_SampleOccurences(ArgVerbose)) ; Globs = gl14 ; addTestResult (g14->check_SampleOccurences(ArgVerbose)) ; Globs = gl15 ; addTestResult (g15->check_SampleOccurences(ArgVerbose)) ; } void GraphTest::testSampleValueAdjacencyLists () { Globs = gl1 ; addTestResult (g1->check_SVALists(ArgVerbose)) ; Globs = gl2 ; addTestResult (g2->check_SVALists(ArgVerbose)) ; Globs = gl3 ; addTestResult (g3->check_SVALists(ArgVerbose)) ; Globs = gl4 ; addTestResult (g4->check_SVALists(ArgVerbose)) ; Globs = gl5 ; addTestResult (g5->check_SVALists(ArgVerbose)) ; Globs = gl6 ; addTestResult (g6->check_SVALists(ArgVerbose)) ; Globs = gl7 ; addTestResult (g7->check_SVALists(ArgVerbose)) ; Globs = gl8 ; addTestResult (g8->check_SVALists(ArgVerbose)) ; Globs = gl9 ; addTestResult (g9->check_SVALists(ArgVerbose)) ; Globs = gl10 ; addTestResult (g10->check_SVALists(ArgVerbose)) ; Globs = gl11 ; addTestResult (g11->check_SVALists(ArgVerbose)) ; Globs = gl12 ; addTestResult (g12->check_SVALists(ArgVerbose)) ; Globs = gl13 ; addTestResult (g13->check_SVALists(ArgVerbose)) ; Globs = gl14 ; addTestResult (g14->check_SVALists(ArgVerbose)) ; Globs = gl15 ; addTestResult (g15->check_SVALists(ArgVerbose)) ; } steghide-0.5.1/tests/DummySampleValue.cc0000644000076400001440000000364207735577231013722 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "CvrStgFile.h" #include "DummyFile.h" #include "DummySampleValue.h" UWORD32 DummySampleValue::calcDistance (const SampleValue* s) const { DummySampleValue *sample = (DummySampleValue*) s ; return ((sample->Value > Value) ? (sample->Value - Value) : (Value - sample->Value)) ; } bool DummySampleValue::isNeighbour (const SampleValue* s) const { DummyFile *f = (DummyFile*) Globs.TheCvrStgFile ; DummySampleValue *sample = (DummySampleValue*) s ; std::vector >* svam = f->getSampleValueAdjacencyMatrix() ; return (*svam)[Value][sample->getValue()] ; } SampleValue* DummySampleValue::getNearestTargetSampleValue (EmbValue t) const { UWORD16 n_value = 0 ; if (Value == 0) { n_value = 1 ; } else if (Value == UWORD16_MAX) { n_value = UWORD16_MAX - 1 ; } else { if (RndSrc.getBool()) { n_value = Value - 1 ; } else { n_value = Value + 1 ; } } myassert (n_value % 2 == t) ; return ((SampleValue *) new DummySampleValue (n_value)) ; } std::string DummySampleValue::getName (void) const { char buf[128] ; sprintf (buf, "%d", Value) ; return std::string (buf) ; } steghide-0.5.1/tests/BitStringTest.h0000644000076400001440000000304707735577231013076 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BITSTRINGTEST_H #define SH_BITSTRINGTEST_H #define private public #define protected public #include "BitString.h" #undef private #undef protected #include "UnitTest.h" #include "TestSuite.h" class BitStringTest : public UnitTest { public: BitStringTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testBitInputOutput (void) ; void testLength (void) ; void testDatatypeInput (void) ; void testDatatypeOutput (void) ; void testEquality (void) ; void testCutting (void) ; void testCompression (void) ; void testArity (void) ; private: BitString *bs_0, *bs_1, *bs_10, *bs_001, *bs_100, *bs_1010, *bs_1110, *bs_01011, *bs_10010, *bs_10101110, *bs_101011101 ; } ; #endif // ndef SH_BITSTRINGTEST_H steghide-0.5.1/tests/main.cc0000644000076400001440000000730407735577231011413 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "common.h" #include "TestSuite.h" #include "AudioSampleValueTest.h" #include "AuFileTest.h" #include "AUtilsTest.h" #include "BFSAPHeuristicTest.h" #include "BitStringTest.h" #include "BmpFileTest.h" #include "BmpRGBSampleValueTest.h" #include "BmpPaletteSampleValueTest.h" #include "BmpOS2FileTest.h" #include "BmpWinFileTest.h" #include "DFSAPHeuristicTest.h" #include "EdgeIteratorTest.h" #include "EmbDataTest.h" #include "WKSConstructionHeuristicTest.h" #include "GraphTest.h" #include "JpegFileTest.h" #include "JpegSampleValueTest.h" #include "MatchingTest.h" #include "MCryptPPTest.h" #include "MHashKeyGenTest.h" #include "MHashPPTest.h" #include "SampleValueAdjacencyListTest.h" #include "SelectorTest.h" #include "WavFileTest.h" #include "WavPCMSampleValueTest.h" bool ArgVerbose ; int main (int argc, char *argv[]) { ArgVerbose = false ; unsigned short argi = 1 ; while (argi < argc) { if (std::string(argv[argi]) == "-v" || std::string(argv[argi]) == "--verbose") { ArgVerbose = true ; } #ifdef DEBUG else if (std::string(argv[argi]) == "--debuglevel") { argi++ ; unsigned int tmp = 0 ; sscanf (argv[argi], "%u", &tmp) ; Args.DebugLevel.setValue (tmp) ; } #endif else { std::cerr << "unknown argument: " << argv[argi] << std::endl ; exit (EXIT_FAILURE) ; } argi++ ; } TestSuite ts ; // basic classes AUtilsTest at (&ts) ; ts.addUnitTest (&at) ; BitStringTest bst (&ts) ; ts.addUnitTest (&bst) ; SelectorTest st (&ts) ; ts.addUnitTest (&st) ; EmbDataTest edt (&ts) ; ts.addUnitTest (&edt) ; // mlibs MHashPPTest mht (&ts) ; ts.addUnitTest (&mht) ; MHashKeyGenTest mhkgt (&ts) ; ts.addUnitTest (&mhkgt) ; MCryptPPTest mct (&ts) ; ts.addUnitTest (&mct) ; // SampleValues AudioSampleValueTest asvt (&ts) ; ts.addUnitTest (&asvt) ; BmpRGBSampleValueTest rgbsvt (&ts) ; ts.addUnitTest (&rgbsvt) ; BmpPaletteSampleValueTest palsvt (&ts) ; ts.addUnitTest (&palsvt) ; JpegSampleValueTest jsvt (&ts) ; ts.addUnitTest (&jsvt) ; WavPCMSampleValueTest wavsvt (&ts) ; ts.addUnitTest (&wavsvt) ; // CvrStgFiles AuFileTest aut (&ts) ; ts.addUnitTest (&aut) ; BmpFileTest bmpt (&ts) ; ts.addUnitTest (&bmpt) ; BmpOS2FileTest bmpot (&ts) ; ts.addUnitTest (&bmpot) ; BmpWinFileTest bmpwt (&ts) ; ts.addUnitTest (&bmpwt) ; JpegFileTest jft (&ts) ; ts.addUnitTest (&jft) ; WavFileTest wt (&ts) ; ts.addUnitTest (&wt) ; // graph-theoretic stuff SampleValueAdjacencyListTest svalt (&ts) ; ts.addUnitTest (&svalt) ; GraphTest gt (&ts) ; ts.addUnitTest (>) ; EdgeIteratorTest eitt (&ts) ; ts.addUnitTest (&eitt) ; MatchingTest mt (&ts) ; ts.addUnitTest (&mt) ; WKSConstructionHeuristicTest cht (&ts) ; ts.addUnitTest (&cht) ; BFSAPHeuristicTest bfsapht (&ts) ; ts.addUnitTest (&bfsapht) ; DFSAPHeuristicTest dfsapht (&ts) ; ts.addUnitTest (&dfsapht) ; ts.run() ; return (ts.getResult() ? 0 : -1) ; } steghide-0.5.1/tests/EdgeIteratorTest.cc0000644000076400001440000001761007735577231013706 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "Edge.h" #include "common.h" #include "DummyFile.h" #include "EdgeIteratorTest.h" #include "TestCategoryCaller.h" #include "utcommon.h" #define CREATEEDGE(G,V1,V2) ((V1 < V2) ? \ (new Edge ((G)->getVertex(V1), 0, (G)->getVertex(V2), 1)) : \ (new Edge ((G)->getVertex(V2), 0, (G)->getVertex(V1), 1))) EdgeIteratorTest::EdgeIteratorTest (TestSuite* s) : UnitTest ("EdgeIterator", s) { ADDTESTCATEGORY (EdgeIteratorTest, testReferenceIteration) ; ADDTESTCATEGORY (EdgeIteratorTest, testIterationLength) ; } void EdgeIteratorTest::setup () { // reference tests { Globs.reset() ; std::vector > adjlist1 (10) ; adjlist1[0].push_back(1) ; adjlist1[0].push_back(4) ; adjlist1[1].push_back(3) ; adjlist1[1].push_back(7) ; adjlist1[2].push_back(3) ; adjlist1[2].push_back(5) ; adjlist1[2].push_back(6) ; adjlist1[3].push_back(6) ; adjlist1[4].push_back(6) ; adjlist1[4].push_back(7) ; adjlist1[4].push_back(9) ; adjlist1[5].push_back(6) ; adjlist1[7].push_back(8) ; DummyFile::createGraph (adjlist1, &bs1, &f1, &s1) ; g1 = new Graph (f1, *bs1, *s1) ; gl1 = Globs ; } // real files { Globs.reset() ; f10 = CvrStgFile::readFile (std::string(DATADIR) + "win3x8_std.bmp") ; bs10 = new BitString (std::string ("secret message")) ; s10 = new Selector (bs10->getLength() * f10->getSamplesPerVertex(), std::string ("secret passphrase")) ; g10 = new Graph (f10, *bs10, *s10) ; gl10 = Globs ; Globs.reset() ; f11 = CvrStgFile::readFile (std::string(DATADIR) + "pcm16_std.wav") ; bs11 = new BitString (std::string ("16 bits per sample")) ; s11 = new Selector (bs11->getLength() * f11->getSamplesPerVertex(), std::string ("a passphrase")) ; g11 = new Graph (f11, *bs11, *s11) ; gl11 = Globs ; Globs.reset() ; f12 = CvrStgFile::readFile (std::string(DATADIR) + "mulaw_std.au") ; bs12 = new BitString (std::string ("mu law sample data in an au file")) ; s12 = new Selector (bs12->getLength() * f12->getSamplesPerVertex(), std::string ("another passphrase")) ; g12 = new Graph (f12, *bs12, *s12) ; gl12 = Globs ; } } void EdgeIteratorTest::cleanup () { } void EdgeIteratorTest::testReferenceIteration () { { Globs = gl1 ; std::vector edges ; edges.push_back (CREATEEDGE (g1, 0, 1)) ; edges.push_back (CREATEEDGE (g1, 0, 4)) ; addTestResult (genericTestVertexIteration (g1->getVertex(0), EdgeIterator::SAMPLEOCCURENCE, edges)) ; edges.clear() ; edges.push_back (CREATEEDGE (g1, 1, 0)) ; edges.push_back (CREATEEDGE (g1, 1, 3)) ; edges.push_back (CREATEEDGE (g1, 1, 7)) ; addTestResult (genericTestVertexIteration (g1->getVertex(1), EdgeIterator::SAMPLEOCCURENCE, edges)) ; edges.clear() ; edges.push_back (CREATEEDGE (g1, 2, 3)) ; edges.push_back (CREATEEDGE (g1, 2, 5)) ; edges.push_back (CREATEEDGE (g1, 2, 6)) ; addTestResult (genericTestVertexIteration (g1->getVertex(2), EdgeIterator::SAMPLEOCCURENCE, edges)) ; edges.clear() ; edges.push_back (CREATEEDGE (g1, 3, 2)) ; edges.push_back (CREATEEDGE (g1, 3, 1)) ; edges.push_back (CREATEEDGE (g1, 3, 6)) ; addTestResult (genericTestVertexIteration (g1->getVertex(3), EdgeIterator::SAMPLEOCCURENCE, edges)) ; edges.clear() ; edges.push_back (CREATEEDGE (g1, 4, 6)) ; edges.push_back (CREATEEDGE (g1, 4, 7)) ; edges.push_back (CREATEEDGE (g1, 4, 0)) ; edges.push_back (CREATEEDGE (g1, 4, 9)) ; addTestResult (genericTestVertexIteration (g1->getVertex(4), EdgeIterator::SAMPLEOCCURENCE, edges)) ; edges.clear() ; edges.push_back (CREATEEDGE (g1, 5, 6)) ; edges.push_back (CREATEEDGE (g1, 5, 2)) ; addTestResult (genericTestVertexIteration (g1->getVertex(5), EdgeIterator::SAMPLEOCCURENCE, edges)) ; edges.clear() ; edges.push_back (CREATEEDGE (g1, 6, 5)) ; edges.push_back (CREATEEDGE (g1, 6, 4)) ; edges.push_back (CREATEEDGE (g1, 6, 3)) ; edges.push_back (CREATEEDGE (g1, 6, 2)) ; addTestResult (genericTestVertexIteration (g1->getVertex(6), EdgeIterator::SAMPLEOCCURENCE, edges)) ; edges.clear() ; edges.push_back (CREATEEDGE (g1, 7, 8)) ; edges.push_back (CREATEEDGE (g1, 7, 4)) ; edges.push_back (CREATEEDGE (g1, 7, 1)) ; addTestResult (genericTestVertexIteration (g1->getVertex(7), EdgeIterator::SAMPLEOCCURENCE, edges)) ; edges.clear() ; edges.push_back (CREATEEDGE (g1, 8, 7)) ; addTestResult (genericTestVertexIteration (g1->getVertex(8), EdgeIterator::SAMPLEOCCURENCE, edges)) ; edges.clear() ; edges.push_back (CREATEEDGE (g1, 9, 4)) ; addTestResult (genericTestVertexIteration (g1->getVertex(9), EdgeIterator::SAMPLEOCCURENCE, edges)) ; } } void EdgeIteratorTest::testIterationLength () { Globs = gl10 ; addTestResult (genericTestIterationLength (g10)) ; Globs = gl11 ; addTestResult (genericTestIterationLength (g11)) ; } #if 0 bool EdgeIteratorTest::genericTestGraphIteration (Graph* g, EdgeIterator::ITERATIONMODE m) { for (VertexLabel vlbl = 0 ; vlbl < g->Vertices.size() ; vlbl++) { } } #endif bool EdgeIteratorTest::genericTestVertexIteration (Vertex* srcvertex, EdgeIterator::ITERATIONMODE m, const std::vector& edges) { EdgeIterator edgeit (srcvertex, m) ; std::vector::const_iterator refit = edges.begin() ; bool ok = true ; while (!edgeit.isFinished() && refit != edges.end()) { if (**refit != **edgeit) { if (ArgVerbose) { if (ok) { std::cerr << std::endl << "---- FAILED: genericTestVertexIteration ----" << std::endl ; } std::cerr << "expected edge:" << std::endl ; (*refit)->print(1) ; std::cerr << "found edge:" << std::endl ; Edge* e = new Edge(**edgeit) ; e->print(1) ; delete e ; } ok = false ; } ++refit ; ++edgeit ; } bool lenok = (edgeit.isFinished() && (refit == edges.end())) ; if (!lenok && ArgVerbose) { if (ok) { std::cerr << std::endl << "---- FAILED: genericTestVertexIteration ----" << std::endl ; } std::cerr << "length problem:" << std::endl ; std::cerr << "edgeit is" << ((edgeit.isFinished()) ? "" : " not") << " finished" << std::endl ; std::cerr << "refit is" << ((refit == edges.end()) ? "" : " not") << " finished" << std::endl ; std::cerr << "rest of reference iteration:" << std::endl ; for ( ; refit != edges.end() ; refit++) { (*refit)->print(1) ; } if (ok) { std::cerr << "-------------------------------------" << std::endl ; } } if (!ok && ArgVerbose) { std::cerr << "-------------------------------------" << std::endl ; } return (lenok && ok) ; } bool EdgeIteratorTest::genericTestIterationLength (Graph* g) { bool ok = true ; for (VertexLabel l = 0 ; l < g->getNumVertices() ; l++) { Vertex* srcvertex = g->getVertex(l) ; EdgeIterator edgeit (srcvertex) ; unsigned long n = 0 ; while (!edgeit.isFinished()) { ++edgeit ; n++ ; } if (n != srcvertex->getDegree() && ArgVerbose) { if (ok) { std::cerr << std::endl << "---- FAILED: genericTestIterationLength ----" << std::endl ; } std::cerr << "for vertex " << l << ": getDegree(): " << srcvertex->getDegree() << ", edgeit goes through: " << n << std::endl ; } ok = (n == srcvertex->getDegree()) && ok ; } if (!ok && ArgVerbose) { std::cerr << "-------------------------------------" << std::endl ; } return ok ; } steghide-0.5.1/tests/JpegSampleValueTest.cc0000644000076400001440000000356007735577231014353 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "JpegSampleValueTest.h" #include "utcommon.h" #include "JpegSampleValue.h" #include "CvrStgFile.h" JpegSampleValueTest::JpegSampleValueTest (TestSuite* s) : SampleValueTest ("JpegSampleValue", s) { ADDTESTCATEGORY (JpegSampleValueTest, testDistance) ; ADDTESTCATEGORY (JpegSampleValueTest, testIsNeighbour) ; } void JpegSampleValueTest::setup () { UnitTest::setup() ; Globs.reset() ; f1 = CvrStgFile::readFile (std::string(DATADIR) + "std.jpg") ; sv_m1 = new JpegSampleValue (-1) ; sv_0 = new JpegSampleValue (0) ; sv_1 = new JpegSampleValue (1) ; gl1 = Globs ; } void JpegSampleValueTest::cleanup () { UnitTest::cleanup() ; delete f1 ; delete sv_m1 ; delete sv_0 ; delete sv_1 ; } void JpegSampleValueTest::testDistance () { Globs = gl1 ; addTestResult (genericTestDistance (sv_0, sv_1, 1)) ; addTestResult (genericTestDistance (sv_m1, sv_1, 2)) ; } void JpegSampleValueTest::testIsNeighbour () { Globs = gl1 ; addTestResult (genericTestIsNeighbour (sv_m1, sv_0, true)) ; addTestResult (genericTestIsNeighbour (sv_1, sv_m1, false)) ; } steghide-0.5.1/tests/st_embparameters.pl0000755000076400001440000000363407742075226014052 #!/usr/bin/perl -w use STSupport; use constant EMPTY => {e => "none", Z => "", K => "", "-check" => ""} ; sub runEncryption { startSubCategory("Encryption") ; $ref = EMPTY ; %args = %$ref ; $args{e} = "des ecb" ; addTestResult(runEmbExtCmp(DATADIR . "os21x8_std.bmp", DATADIR . RND100, \%args)); $args{e} = "arcfour stream" ; addTestResult(runEmbExtCmp(DATADIR . "mulaw_std.au", DATADIR . RND100, \%args)); $args{e} = "nofb gost" ; addTestResult(runEmbExtCmp(DATADIR . "pcm8_std.wav", DATADIR . RND100, \%args)); $args{e} = "blowfish" ; addTestResult(runEmbExtCmp(DATADIR . "win3x24_std.bmp", DATADIR . RND100, \%args)); $args{e} = "serpent ncfb" ; addTestResult(runEmbExtCmp(DATADIR . "pcm16_std.au", DATADIR . RND100, \%args)); $args{e} = "ofb" ; addTestResult(runEmbExtCmp(DATADIR . "win3x4_std.bmp", DATADIR . RND100, \%args)); endSubCategory() ; } sub runCompression { startSubCategory("Compression") ; $ref = EMPTY ; %args = %$ref ; delete $args{Z} ; addTestResult(runEmbExtCmp(DATADIR . "mulaw_std.au", DATADIR . RND100, \%args)); $args{z} = "1" ; addTestResult(runEmbExtCmp(DATADIR . "pcm16_std.au", DATADIR . RND100, \%args)); $args{z} = "7" ; addTestResult(runEmbExtCmp(DATADIR . "os21x1_std.bmp", DATADIR . RND100, \%args)); endSubCategory() ; } sub runChecksum { startSubCategory("Checksum") ; $ref = EMPTY ; %args = %$ref ; delete $args{K} ; addTestResult(runEmbExtCmp(DATADIR . "mulaw_std.au", DATADIR . RND100, \%args)); addTestResult(runEmbExtCmp(DATADIR . "pcm16_std.au", DATADIR . RND100, \%args)); addTestResult(runEmbExtCmp(DATADIR . "os21x1_std.bmp", DATADIR . RND100, \%args)); addTestResult(runEmbExtCmp(DATADIR . "win3x24_std.bmp", DATADIR . RND100, \%args)); addTestResult(runEmbExtCmp(DATADIR . "pcm8_std.wav", DATADIR . RND100, \%args)); endSubCategory() ; } startCategory("Embedding Parameters", @ARGV) ; runEncryption() ; runCompression() ; runChecksum() ; exit endCategory() ; steghide-0.5.1/tests/GraphTest.h0000644000076400001440000000341107735577231012225 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_GRAPHTEST_H #define SH_GRAPHTEST_H #include "UnitTest.h" class TestSuite ; class CvrStgFile ; class BitString ; class Selector ; class Graph ; class GraphTest : public UnitTest { public: GraphTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testVertices (void) ; void testSampleValues (void) ; void testSampleOccurences (void) ; void testSampleValueAdjacencyLists (void) ; private: CvrStgFile *f1, *f2, *f3, *f4, *f5, *f6, *f7, *f8, *f9, *f10, *f11, *f12, *f13, *f14, *f15, *f_f ; BitString *bs1, *bs2, *bs3, *bs4, *bs5, *bs6, *bs7, *bs8, *bs9, *bs10, *bs11, *bs12, *bs13, *bs14, *bs15, *bs_f ; Selector *s1, *s2, *s3, *s4, *s5, *s6, *s7, *s8, *s9, *s10, *s11, *s12, *s13, *s14, *s15, *s_f ; Graph *g1, *g2, *g3, *g4, *g5, *g6, *g7, *g8, *g9, *g10, *g11, *g12, *g13, *g14, *g15, *g_f ; Globals gl1, gl2, gl3, gl4, gl5, gl6, gl7, gl8, gl9, gl10, gl11, gl12, gl13, gl14, gl15, gl_f ; } ; #endif // ndef SH_GRAPHTEST_H steghide-0.5.1/tests/BmpWinFileTest.cc0000644000076400001440000001327007735577231013322 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "utcommon.h" #include "BmpWinFileTest.h" #include "BmpPaletteSampleValue.h" #include "BmpRGBSampleValue.h" BmpWinFileTest::BmpWinFileTest (TestSuite* s) : CvrStgFileTest("BmpWinFile", s) { ADDTESTCATEGORY (BmpWinFileTest, testReadWrite) ; ADDTESTCATEGORY (BmpWinFileTest, testReadEmbedExtract) ; ADDTESTCATEGORY (BmpWinFileTest, testReadEmbedWriteReadExtract) ; ADDTESTCATEGORY (BmpWinFileTest, testPosition) ; ADDTESTCATEGORY (BmpWinFileTest, testEmbeddedValue) ; } void BmpWinFileTest::setup () { UnitTest::setup() ; Globs.reset() ; f1 = CvrStgFile::readFile (std::string(DATADIR) + "win3x1_std.bmp") ; bs1 = new BitString (std::string ("this is a test")) ; gl1 = Globs ; Globs.reset() ; f2 = CvrStgFile::readFile (std::string(DATADIR) + "win3x4_std.bmp") ; bs2 = new BitString (std::string ("this is another test - this time a little longer")) ; gl2 = Globs ; Globs.reset() ; f3 = CvrStgFile::readFile (std::string(DATADIR) + "win3x8_std.bmp") ; bs3 = new BitString (std::string ("yet another test which is even longer than the previous test bitstring")) ; gl3 = Globs ; Globs.reset() ; f4 = CvrStgFile::readFile (std::string(DATADIR) + "win3x24_std.bmp") ; bs4 = new BitString (std::string ("the last test")) ; gl4 = Globs ; } void BmpWinFileTest::cleanup () { UnitTest::cleanup() ; delete bs1 ; delete bs2 ; delete bs3 ; delete bs4 ; delete f1 ; delete f2 ; delete f3 ; delete f4 ; } void BmpWinFileTest::testReadWrite() { Globs = gl1 ; addTestResult (genericTestReadWrite (std::string(DATADIR) + "win3x1_std.bmp")) ; Globs = gl2 ; addTestResult (genericTestReadWrite (std::string(DATADIR) + "win3x4_std.bmp")) ; Globs = gl3 ; addTestResult (genericTestReadWrite (std::string(DATADIR) + "win3x8_std.bmp")) ; Globs = gl4 ; addTestResult (genericTestReadWrite (std::string(DATADIR) + "win3x24_std.bmp")) ; } void BmpWinFileTest::testReadEmbedExtract() { Globs = gl1 ; addTestResult (genericTestReadEmbedExtract (std::string(DATADIR) + "win3x1_std.bmp", *bs1)) ; Globs = gl2 ; addTestResult (genericTestReadEmbedExtract (std::string(DATADIR) + "win3x4_std.bmp", *bs2)) ; Globs = gl3 ; addTestResult (genericTestReadEmbedExtract (std::string(DATADIR) + "win3x8_std.bmp", *bs3)) ; Globs = gl4 ; addTestResult (genericTestReadEmbedExtract (std::string(DATADIR) + "win3x24_std.bmp", *bs4)) ; } void BmpWinFileTest::testReadEmbedWriteReadExtract() { Globs = gl1 ; addTestResult (genericTestReadEmbedWriteReadExtract (std::string(DATADIR) + "win3x1_std.bmp", *bs2)) ; Globs = gl2 ; addTestResult (genericTestReadEmbedWriteReadExtract (std::string(DATADIR) + "win3x4_std.bmp", *bs3)) ; Globs = gl3 ; addTestResult (genericTestReadEmbedWriteReadExtract (std::string(DATADIR) + "win3x8_std.bmp", *bs4)) ; Globs = gl4 ; addTestResult (genericTestReadEmbedWriteReadExtract (std::string(DATADIR) + "win3x24_std.bmp", *bs1)) ; } void BmpWinFileTest::testPosition() { Globs = gl1 ; addTestResult (genericTestPosition (f1, 0, new BmpPaletteSampleValue (0))) ; addTestResult (genericTestPosition (f1, 1, new BmpPaletteSampleValue (1))) ; addTestResult (genericTestPosition (f1, 143, new BmpPaletteSampleValue (1))) ; addTestResult (genericTestPosition (f1, 144, new BmpPaletteSampleValue (0))) ; addTestResult (genericTestPosition (f1, 2303, new BmpPaletteSampleValue (1))) ; addTestResult (genericTestPosition (f1, 2302, new BmpPaletteSampleValue (0))) ; Globs = gl2 ; addTestResult (genericTestPosition (f2, 0, new BmpPaletteSampleValue (9))) ; addTestResult (genericTestPosition (f2, 20, new BmpPaletteSampleValue (4))) ; addTestResult (genericTestPosition (f2, 47, new BmpPaletteSampleValue (13))) ; addTestResult (genericTestPosition (f2, 48, new BmpPaletteSampleValue (9))) ; addTestResult (genericTestPosition (f2, 2303, new BmpPaletteSampleValue (3))) ; Globs = gl3 ; addTestResult (genericTestPosition (f3, 0, new BmpPaletteSampleValue (202))) ; addTestResult (genericTestPosition (f3, 4, new BmpPaletteSampleValue (38))) ; addTestResult (genericTestPosition (f3, 47, new BmpPaletteSampleValue (81))) ; addTestResult (genericTestPosition (f3, 48, new BmpPaletteSampleValue (66))) ; addTestResult (genericTestPosition (f3, 2302, new BmpPaletteSampleValue (105))) ; Globs = gl4 ; addTestResult (genericTestPosition (f4, 0, new BmpRGBSampleValue (121, 110, 119))) ; addTestResult (genericTestPosition (f4, 1, new BmpRGBSampleValue (113, 109, 130))) ; addTestResult (genericTestPosition (f4, 12, new BmpRGBSampleValue (92, 113, 115))) ; addTestResult (genericTestPosition (f4, 2303, new BmpRGBSampleValue (75, 107, 158))) ; } void BmpWinFileTest::testReadExtractCompare() { // TODO } void BmpWinFileTest::testEmbeddedValue () { Globs = gl1 ; addTestResult (genericTestEmbeddedValue (f1)) ; Globs = gl2 ; addTestResult (genericTestEmbeddedValue (f2)) ; Globs = gl3 ; addTestResult (genericTestEmbeddedValue (f3)) ; Globs = gl4 ; addTestResult (genericTestEmbeddedValue (f4)) ; } steghide-0.5.1/tests/AuFileTest.cc0000644000076400001440000001067407735577231012500 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "AuSampleValues.h" #include "utcommon.h" #include "AuFileTest.h" AuFileTest::AuFileTest (TestSuite* s) : CvrStgFileTest("AuFile", s) { ADDTESTCATEGORY (AuFileTest, testReadWrite) ; ADDTESTCATEGORY (AuFileTest, testReadEmbedExtract) ; ADDTESTCATEGORY (AuFileTest, testReadEmbedWriteReadExtract) ; ADDTESTCATEGORY (AuFileTest, testPosition) ; ADDTESTCATEGORY (AuFileTest, testReadExtractCompare) ; ADDTESTCATEGORY (AuFileTest, testEmbeddedValue) ; } void AuFileTest::setup () { UnitTest::setup() ; Globs.reset() ; f1 = CvrStgFile::readFile (std::string(DATADIR) + "mulaw_std.au") ; bs1 = new BitString (std::string ("a test passphrase")) ; gl1 = Globs ; Globs.reset() ; f2 = CvrStgFile::readFile (std::string(DATADIR) + "pcm8_std.au") ; bs2 = new BitString (std::string ("another test passphrase")) ; gl2 = Globs ; Globs.reset() ; f3 = CvrStgFile::readFile (std::string(DATADIR) + "pcm16_std.au") ; bs3 = new BitString (std::string ("inventing test passphrases is boring")) ; gl3 = Globs ; } void AuFileTest::cleanup () { UnitTest::cleanup() ; delete bs1 ; delete bs2 ; delete bs3 ; delete f1 ; delete f2 ; delete f3 ; } void AuFileTest::testReadWrite() { Globs = gl1 ; addTestResult (genericTestReadWrite (std::string(DATADIR) + "mulaw_std.au")) ; Globs = gl2 ; addTestResult (genericTestReadWrite (std::string(DATADIR) + "pcm8_std.au")) ; Globs = gl3 ; addTestResult (genericTestReadWrite (std::string(DATADIR) + "pcm16_std.au")) ; } void AuFileTest::testReadEmbedExtract() { Globs = gl1 ; addTestResult (genericTestReadEmbedExtract (std::string(DATADIR) + "mulaw_std.au", *bs1)) ; Globs = gl2 ; addTestResult (genericTestReadEmbedExtract (std::string(DATADIR) + "pcm8_std.au", *bs2)) ; Globs = gl3 ; addTestResult (genericTestReadEmbedExtract (std::string(DATADIR) + "pcm16_std.au", *bs3)) ; } void AuFileTest::testReadEmbedWriteReadExtract() { Globs = gl1 ; addTestResult (genericTestReadEmbedWriteReadExtract (std::string(DATADIR) + "mulaw_std.au", *bs2)) ; Globs = gl2 ; addTestResult (genericTestReadEmbedWriteReadExtract (std::string(DATADIR) + "pcm8_std.au", *bs3)) ; Globs = gl3 ; addTestResult (genericTestReadEmbedWriteReadExtract (std::string(DATADIR) + "pcm16_std.au", *bs1)) ; } void AuFileTest::testPosition() { Globs = gl1 ; addTestResult (genericTestPosition (f1, 0, new AuMuLawSampleValue (224))) ; addTestResult (genericTestPosition (f1, 10, new AuMuLawSampleValue (148))) ; Globs = gl2 ; addTestResult (genericTestPosition (f2, 0, new AuPCM8SampleValue (-7))) ; addTestResult (genericTestPosition (f2, 1, new AuPCM8SampleValue (-8))) ; addTestResult (genericTestPosition (f2, 17, new AuPCM8SampleValue (4))) ; addTestResult (genericTestPosition (f2, 81, new AuPCM8SampleValue (-2))) ; Globs = gl3 ; addTestResult (genericTestPosition (f3, 0, new AuPCM16SampleValue (80))) ; addTestResult (genericTestPosition (f3, 2, new AuPCM16SampleValue (-76))) ; addTestResult (genericTestPosition (f3, 9, new AuPCM16SampleValue (4403))) ; addTestResult (genericTestPosition (f3, 15, new AuPCM16SampleValue (4191))) ; } void AuFileTest::testReadExtractCompare () { { Globs = gl1 ; BitString shouldbe ; shouldbe.append(false).append(true).append(true).append(false).append(false).append(false).append(false).append(true) ; addTestResult (genericTestReadExtractCompare (std::string(DATADIR) + "mulaw_std.au", shouldbe)) ; } { Globs = gl2 ; // TODO } { Globs = gl3 ; // TODO } } void AuFileTest::testEmbeddedValue () { Globs = gl1 ; addTestResult (genericTestEmbeddedValue (f1)) ; Globs = gl2 ; addTestResult (genericTestEmbeddedValue (f2)) ; Globs = gl3 ; addTestResult (genericTestEmbeddedValue (f3)) ; } steghide-0.5.1/tests/MatchingTest.h0000644000076400001440000000266007735577231012723 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_MATCHINGTEST_H #define SH_MATCHINGTEST_H #define private public #define protected public #include "Matching.h" #undef private #undef protected class BitString ; class CvrStgFile ; class Selector ; #include "UnitTest.h" #include "TestSuite.h" class MatchingTest : public UnitTest { public: MatchingTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testAddRemoveEdge (void) ; void testAugmentingPath (void) ; private: BitString *bs1, *bs2 ; CvrStgFile *f1, *f2 ; Selector *s1, *s2 ; Graph *g1, *g2 ; Matching *m1, *m2 ; Globals gl1, gl2 ; } ; #endif // ndef SH_MATCHINGTEST_H steghide-0.5.1/tests/MHashPPTest.h0000644000076400001440000000334707735577231012434 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_MHASHPPTEST_H #define SH_MHASHPPTEST_H #define private public #define protected public #include "MHashPP.h" #undef private #undef protected #include "BitString.h" #include "UnitTest.h" #include "TestSuite.h" class MHashPPTest : public UnitTest { public: MHashPPTest (TestSuite* s) ; /** * test output of MHashPP class with MD5 algorithm against the test vectors given in RFC 1321 **/ void testMD5 (void) ; void testCRC32 (void) ; private: /** * compute a hash using MHashPP and compare it to a reference value * \param a the hash algorithm that should be used by MHashPP * \param data the input of the hash algorithm * \param shouldbe the reference value of the result of the hash algorithm * \return true iff shouldbe is the result of the hash algorithm a applied to data by MHashPP **/ bool genericTestMHashPP (hashid a, BitString data, BYTE* shouldbe) ; } ; #endif // ndef SH_MHASHPPTEST_H steghide-0.5.1/tests/TestCategory.h0000644000076400001440000000203707735577231012744 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_TESTCATEGORY_H #define SH_TESTCATEGORY_H #include "Test.h" class TestCategory : public Test { public: TestCategory (const std::string& n, TestSuite* s) : Test(n, s) {} ; } ; #endif // ndef SH_TESTCATEGORY_H steghide-0.5.1/tests/SampleValueAdjacencyListTest.cc0000644000076400001440000000632207735577231016202 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "AuSampleValues.h" #include "common.h" #include "SampleValueAdjacencyListTest.h" #include "utcommon.h" SampleValueAdjacencyListTest::SampleValueAdjacencyListTest (TestSuite* s) : UnitTest ("SampleValueAdjacencyList", s), DummySVAL (100) { ADDTESTCATEGORY (SampleValueAdjacencyListTest, testEquality) ; ADDTESTCATEGORY (SampleValueAdjacencyListTest, testQuicksort) ; } void SampleValueAdjacencyListTest::setup () { SVEmpty = std::vector (100) ; } void SampleValueAdjacencyListTest::testEquality () { CvrStgFile *f = CvrStgFile::readFile (std::string(DATADIR) + "mulaw_std.au") ; SampleValueAdjacencyList sval1 (2) ; SampleValueAdjacencyList sval2 (2) ; sval1[(SampleValueLabel) 0].push_back (new AuMuLawSampleValue (10)) ; sval1[(SampleValueLabel) 0].push_back (new AuMuLawSampleValue (15)) ; sval1[(SampleValueLabel) 0].push_back (new AuMuLawSampleValue (17)) ; sval1[(SampleValueLabel) 1].push_back (new AuMuLawSampleValue (100)) ; sval2[(SampleValueLabel) 0].push_back (new AuMuLawSampleValue (10)) ; sval2[(SampleValueLabel) 0].push_back (new AuMuLawSampleValue (15)) ; sval2[(SampleValueLabel) 0].push_back (new AuMuLawSampleValue (17)) ; sval2[(SampleValueLabel) 1].push_back (new AuMuLawSampleValue (100)) ; addTestResult (sval1 == sval2) ; sval2[(SampleValueLabel) 1].push_back (new AuMuLawSampleValue (110)) ; addTestResult (!(sval1 == sval2)) ; delete f ; } void SampleValueAdjacencyListTest::testQuicksort () { { UWORD32* d = new UWORD32[2] ; d[0] = 3 ; d[1] = 5 ; DummySVAL.quicksort (SVEmpty, d, 0, 1) ; addTestResult ((d[0] == 3) && (d[1] == 5)) ; delete[] d ; } { UWORD32* d = new UWORD32[2] ; d[0] = 5 ; d[1] = 3 ; DummySVAL.quicksort (SVEmpty, d, 0, 1) ; addTestResult ((d[0] == 3) && (d[1] == 5)) ; delete[] d ; } { UWORD32* d = new UWORD32[3] ; d[0] = 2 ; d[1] = 2 ; d[2] = 2 ; DummySVAL.quicksort (SVEmpty, d, 0, 2) ; addTestResult ((d[0] == 2) && (d[1] == 2) && (d[2] == 2)) ; // asserting termination delete[] d ; } { UWORD32* d = new UWORD32[10] ; d[0] = 3 ; d[1] = 12 ; d[2] = 8 ; d[3] = 2 ; d[4] = 22 ; d[5] = 7 ; d[6] = 8 ; d[7] = 4 ; d[8] = 6 ; d[9] = 17 ; DummySVAL.quicksort (SVEmpty, d, 0, 9) ; addTestResult ((d[0] == 2) && (d[1] == 3) && (d[2] == 4) && (d[3] == 6) && (d[4] == 7) && (d[5] == 8) && (d[6] == 8) && (d[7] == 12) && (d[8] == 17) && (d[9] == 22)) ; delete[] d ; } } steghide-0.5.1/tests/BmpPaletteSampleValueTest.cc0000644000076400001440000000703207735577231015521 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "BmpPaletteSampleValueTest.h" #include "utcommon.h" #include "BmpPaletteSampleValue.h" #include "CvrStgFile.h" BmpPaletteSampleValueTest::BmpPaletteSampleValueTest (TestSuite* s) : SampleValueTest ("BmpPaletteSampleValue", s) { ADDTESTCATEGORY (BmpPaletteSampleValueTest, testDistance) ; ADDTESTCATEGORY (BmpPaletteSampleValueTest, testIsNeighbour) ; } void BmpPaletteSampleValueTest::setup () { UnitTest::setup() ; Globs.reset() ; f1 = CvrStgFile::readFile (std::string(DATADIR) + "os21x4_std.bmp") ; sv1_0 = new BmpPaletteSampleValue (0) ; sv1_3 = new BmpPaletteSampleValue (3) ; sv1_7 = new BmpPaletteSampleValue (7) ; sv1_15 = new BmpPaletteSampleValue (15) ; gl1 = Globs ; Globs.reset() ; f2 = CvrStgFile::readFile (std::string(DATADIR) + "win3x8_std.bmp") ; sv2_3_49_96_5 = new BmpPaletteSampleValue (3) ; sv2_10_11_99_203 = new BmpPaletteSampleValue (10) ; sv2_48_18_106_194 = new BmpPaletteSampleValue (48) ; sv2_68_73_104_15 = new BmpPaletteSampleValue (68) ; sv2_171_61_97_25 = new BmpPaletteSampleValue (171) ; gl2 = Globs ; } void BmpPaletteSampleValueTest::cleanup () { UnitTest::cleanup() ; delete sv1_0 ; delete sv1_3 ; delete sv1_7 ; delete sv1_15 ; delete f1 ; delete sv2_3_49_96_5 ; delete sv2_10_11_99_203 ; delete sv2_48_18_106_194 ; delete sv2_68_73_104_15 ; delete sv2_171_61_97_25 ; delete f2 ; } void BmpPaletteSampleValueTest::testDistance () { Globs = gl1 ; addTestResult (genericTestDistance (sv1_0, sv1_0, 0)) ; addTestResult (genericTestDistance (sv1_0, sv1_3, 32768)) ; addTestResult (genericTestDistance (sv1_0, sv1_15, 195075)) ; addTestResult (genericTestDistance (sv1_3, sv1_7, 16384)) ; Globs = gl2 ; addTestResult (genericTestDistance (sv2_3_49_96_5, sv2_10_11_99_203, 40657)) ; addTestResult (genericTestDistance (sv2_3_49_96_5, sv2_48_18_106_194, 36782)) ; addTestResult (genericTestDistance (sv2_3_49_96_5, sv2_68_73_104_15, 740)) ; addTestResult (genericTestDistance (sv2_48_18_106_194, sv2_68_73_104_15, 35070)) ; addTestResult (genericTestDistance (sv2_171_61_97_25, sv2_10_11_99_203, 34188)) ; } void BmpPaletteSampleValueTest::testIsNeighbour () { Globs = gl1 ; addTestResult (genericTestIsNeighbour (sv1_3, sv1_3, true)) ; addTestResult (genericTestIsNeighbour (sv1_15, sv1_0, false)) ; addTestResult (genericTestIsNeighbour (sv1_7, sv1_15, false)) ; addTestResult (genericTestIsNeighbour (sv1_3, sv1_7, false)) ; Globs = gl2 ; addTestResult (genericTestIsNeighbour (sv2_10_11_99_203, sv2_3_49_96_5, false)) ; addTestResult (genericTestIsNeighbour (sv2_68_73_104_15, sv2_171_61_97_25, true)) ; addTestResult (genericTestIsNeighbour (sv2_68_73_104_15, sv2_48_18_106_194, false)) ; addTestResult (genericTestIsNeighbour (sv2_171_61_97_25, sv2_10_11_99_203, false)) ; } steghide-0.5.1/tests/MatchingTest.cc0000644000076400001440000001471307735577231013063 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "BitString.h" #include "Edge.h" #include "Graph.h" #include "Selector.h" #include "DummyFile.h" #include "MatchingTest.h" #define CREATEEDGEPTR(G,V1,V2) (new Edge ((G)->getVertex(V1), 0, (G)->getVertex(V2), 1)) #define CREATEEDGEOBJ(G,V1,V2) (Edge ((G)->getVertex(V1), 0, (G)->getVertex(V2), 1)) MatchingTest::MatchingTest (TestSuite* s) : UnitTest ("Matching", s) { ADDTESTCATEGORY (MatchingTest, testAddRemoveEdge) ; ADDTESTCATEGORY (MatchingTest, testAugmentingPath) ; } void MatchingTest::setup () { UnitTest::setup() ; Globs.reset() ; std::vector > adjlist1 (4) ; adjlist1[0].push_back(1) ; adjlist1[0].push_back(2) ; adjlist1[1].push_back(2) ; adjlist1[1].push_back(3) ; DummyFile::createGraph (adjlist1, &bs1, &f1, &s1) ; g1 = new Graph (f1, *bs1, *s1) ; m1 = new Matching (g1) ; gl1 = Globs ; Globs.reset() ; std::vector > adjlist2 (10) ; adjlist2[0].push_back(1) ; adjlist2[0].push_back(4) ; adjlist2[1].push_back(2) ; adjlist2[1].push_back(3) ; adjlist2[1].push_back(7) ; adjlist2[2].push_back(3) ; adjlist2[2].push_back(4) ; adjlist2[2].push_back(5) ; adjlist2[2].push_back(6) ; adjlist2[3].push_back(6) ; adjlist2[4].push_back(6) ; adjlist2[4].push_back(7) ; adjlist2[4].push_back(8) ; adjlist2[4].push_back(9) ; adjlist2[5].push_back(6) ; adjlist2[7].push_back(8) ; DummyFile::createGraph (adjlist2, &bs2, &f2, &s2) ; g2 = new Graph (f2, *bs2, *s2) ; m2 = new Matching (g2) ; gl2 = Globs ; } void MatchingTest::cleanup () { UnitTest::cleanup() ; delete m1 ; delete g1 ; delete s1 ; delete bs1 ; delete f1 ; delete m2 ; delete g2 ; delete s2 ; delete bs2 ; delete f2 ; } void MatchingTest::testAddRemoveEdge () { { // test Matching m1 Globs = gl1 ; Edge e1 = CREATEEDGEOBJ (g1, 0, 2) ; m1->addEdge (e1) ; addTestResult ( m1->isMatched((VertexLabel) 0) && m1->isExposed((VertexLabel) 1) && m1->isMatched((VertexLabel) 2) && m1->isExposed((VertexLabel) 3)) ; Edge e2 = CREATEEDGEOBJ (g1, 1, 3) ; m1->addEdge (e2) ; addTestResult ( m1->isMatched((VertexLabel) 0) && m1->isMatched((VertexLabel) 1) && m1->isMatched((VertexLabel) 2) && m1->isMatched((VertexLabel) 3)) ; m1->removeEdge (e1) ; addTestResult ( m1->isExposed((VertexLabel) 0) && m1->isMatched((VertexLabel) 1) && m1->isExposed((VertexLabel) 2) && m1->isMatched((VertexLabel) 3)) ; m1->removeEdge (e2) ; addTestResult ( m1->isExposed((VertexLabel) 0) && m1->isExposed((VertexLabel) 1) && m1->isExposed((VertexLabel) 2) && m1->isExposed((VertexLabel) 3)) ; } { // test Matching m2 Globs = gl2 ; Edge e1 = CREATEEDGEOBJ (g2, 1, 7) ; m2->addEdge (e1) ; addTestResult ( m2->getCardinality() == 1 && m2->includesEdge(e1)) ; Edge e2 = CREATEEDGEOBJ (g2, 4, 8) ; m2->addEdge (e2) ; addTestResult ( m2->getCardinality() == 2 && m2->includesEdge(e1) && m2->includesEdge(e2)) ; Edge e3 = CREATEEDGEOBJ (g2, 2, 6) ; m2->addEdge (e3) ; addTestResult ( m2->getCardinality() == 3 && m2->includesEdge(e1) && m2->includesEdge(e2) && m2->includesEdge(e3)) ; m2->removeEdge (e2) ; addTestResult ( m2->getCardinality() == 2 && m2->includesEdge(e1) && m2->includesEdge(e3)) ; m2->removeEdge (e1) ; addTestResult ( m2->getCardinality() == 1 && m2->includesEdge(e3)) ; m2->removeEdge (e3) ; addTestResult ( m2->getCardinality() == 0) ; } } void MatchingTest::testAugmentingPath () { { // test Matching m1 Globs = gl1 ; std::vector augpath1 ; augpath1.push_back (CREATEEDGEPTR (g1, 0, 1)) ; m1->augment (augpath1) ; addTestResult ( m1->isMatched((VertexLabel) 0) && m1->isMatched((VertexLabel) 1) && m1->isExposed((VertexLabel) 2) && m1->isExposed((VertexLabel) 3)) ; std::vector augpath2 ; augpath2.push_back (CREATEEDGEPTR (g1, 1, 3)) ; augpath2.push_back (CREATEEDGEPTR (g1, 0, 1)) ; augpath2.push_back (CREATEEDGEPTR (g1, 0, 2)) ; m1->augment (augpath2) ; addTestResult ( m1->isMatched((VertexLabel) 0) && m1->isMatched((VertexLabel) 1) && m1->isMatched((VertexLabel) 2) && m1->isMatched((VertexLabel) 3)) ; } { // test Matching m2 Globs = gl2 ; Edge* e12 = CREATEEDGEPTR (g2, 1, 2) ; Edge* e17 = CREATEEDGEPTR (g2, 1, 7) ; Edge* e23 = CREATEEDGEPTR (g2, 2, 3) ; Edge* e36 = CREATEEDGEPTR (g2, 3, 6) ; Edge* e47 = CREATEEDGEPTR (g2, 4, 7) ; Edge* e49 = CREATEEDGEPTR (g2, 4, 9) ; Edge* e56 = CREATEEDGEPTR (g2, 5, 6) ; std::vector augpath1 ; augpath1.push_back (e12) ; m2->augment (augpath1) ; addTestResult ( m2->getCardinality() == 1 && m2->includesEdge(*e12)) ; std::vector augpath2 ; augpath2.push_back (e17) ; augpath2.push_back (e12) ; augpath2.push_back (e23) ; m2->augment (augpath2) ; addTestResult ( m2->getCardinality() == 2 && m2->includesEdge(*e17) && m2->includesEdge(*e23)) ; std::vector augpath3 ; augpath3.push_back (e47) ; augpath3.push_back (e17) ; augpath3.push_back (e12) ; augpath3.push_back (e23) ; augpath3.push_back (e36) ; m2->augment (augpath3) ; addTestResult ( m2->getCardinality() == 3 && m2->includesEdge(*e47) && m2->includesEdge(*e12) && m2->includesEdge(*e36)) ; std::vector augpath4 ; augpath4.push_back (e49) ; augpath4.push_back (e47) ; augpath4.push_back (e17) ; augpath4.push_back (e12) ; augpath4.push_back (e23) ; augpath4.push_back (e36) ; augpath4.push_back (e56) ; m2->augment (augpath4) ; addTestResult ( m2->getCardinality() == 4 && m2->includesEdge(*e49) && m2->includesEdge(*e17) && m2->includesEdge(*e23) && m2->includesEdge(*e56)) ; } } steghide-0.5.1/tests/systemtests.pl0000755000076400001440000000057107666673672013137 #!/usr/bin/perl -w use FileHandle ; STDOUT->autoflush(1) ; print "-------------------------\n\n" ; print "Running System Tests.....\n\n" ; print "-------------------------\n\n" ; $exitvalue = 0 ; # 0 -> everything ok, 1 -> an error occured while () { # pass command line args to st_*.pl scripts if (system "./$_ @ARGV") { $exitvalue = 1 ; } } exit $exitvalue ; steghide-0.5.1/tests/AuFileTest.h0000644000076400001440000000256507735577231012342 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_AUFILETEST_H #define SH_AUFILETEST_H #include "AuFile.h" #include "CvrStgFileTest.h" class AuFileTest : public CvrStgFileTest { public: AuFileTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testReadWrite (void) ; void testReadEmbedExtract (void) ; void testReadEmbedWriteReadExtract (void) ; void testPosition (void) ; void testReadExtractCompare (void) ; void testEmbeddedValue (void) ; private: BitString *bs1, *bs2, *bs3 ; CvrStgFile *f1, *f2, *f3 ; Globals gl1, gl2, gl3 ; } ; #endif // ndef SH_AUFILETEST_H steghide-0.5.1/tests/JpegFileTest.h0000644000076400001440000000252407735577231012655 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_JPEGFILETEST_H #define SH_JPEGFILETEST_H #include "JpegFile.h" #include "CvrStgFileTest.h" class JpegFileTest : public CvrStgFileTest { public: JpegFileTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testReadEmbedExtract (void) ; void testReadEmbedWriteReadExtract (void) ; void testPosition (void) ; void testReadExtractCompare (void) ; void testEmbeddedValue (void) ; private: BitString *bs1, *bs2 ; CvrStgFile *f1, *f2 ; Globals gl1, gl2 ; } ; #endif // ndef SH_JPEGFILETEST_H steghide-0.5.1/tests/Makefile.am0000644000076400001440000000517407735611647012217 SUBDIRS = data TESTS = unittests systemtests.pl AM_CPPFLAGS = -I../src check_PROGRAMS = unittests EXTRA_DIST = systemtests.pl STSupport.pm st_fileformats.pl st_embparameters.pl noinst_HEADERS = \ AuFileTest.h AUtilsTest.h AudioSampleValueTest.h BFSAPHeuristicTest.h DFSAPHeuristicTest.h \ BitStringTest.h BmpOS2FileTest.h BmpPaletteSampleValueTest.h \ BmpRGBSampleValueTest.h BmpWinFileTest.h WKSConstructionHeuristicTest.h \ BmpFileTest.h CvrStgFileTest.h DummyFile.h \ DummySampleValue.h EdgeIteratorTest.h EmbDataTest.h GraphTest.h JpegFileTest.h \ JpegSampleValueTest.h MCryptPPTest.h MHashKeyGenTest.h MHashPPTest.h \ MatchingTest.h SampleValueAdjacencyListTest.h SampleValueTest.h SelectorTest.h \ Test.h TestCategory.h TestCategoryCaller.h TestSuite.h UnitTest.h \ WavFileTest.h WavPCMSampleValueTest.h utcommon.h unittests_SOURCES = \ AuFileTest.cc AUtilsTest.cc AudioSampleValueTest.cc BFSAPHeuristicTest.cc DFSAPHeuristicTest.cc \ BitStringTest.cc BmpOS2FileTest.cc BmpPaletteSampleValueTest.cc \ BmpRGBSampleValueTest.cc BmpWinFileTest.cc WKSConstructionHeuristicTest.cc \ BmpFileTest.cc CvrStgFileTest.cc \ DummyFile.cc DummySampleValue.cc EdgeIteratorTest.cc EmbDataTest.cc \ GraphTest.cc JpegFileTest.cc JpegSampleValueTest.cc MCryptPPTest.cc \ MHashKeyGenTest.cc MHashPPTest.cc MatchingTest.cc \ SampleValueAdjacencyListTest.cc SampleValueTest.cc SelectorTest.cc \ TestSuite.cc UnitTest.cc WavFileTest.cc WavPCMSampleValueTest.cc main.cc unittests_LDADD = \ ../src/Arg.o ../src/Arguments.o ../src/AssertionFailed.o ../src/AuFile.o \ ../src/AuSampleValues.o ../src/DFSAPHeuristic.o ../src/BFSAPHeuristic.o ../src/BinaryIO.o \ ../src/BitString.o ../src/BmpFile.o ../src/BmpPaletteSampleValue.o \ ../src/BmpRGBSampleValue.o ../src/BmpSampleValue.o \ ../src/WKSConstructionHeuristic.o ../src/CvrStgFile.o \ ../src/Edge.o ../src/EdgeIterator.o ../src/DMDConstructionHeuristic.o \ ../src/EmbData.o ../src/Embedder.o ../src/EncryptionAlgorithm.o \ ../src/EncryptionMode.o ../src/Extractor.o ../src/Graph.o ../src/JpegFile.o \ ../src/JpegSampleValue.o ../src/MCryptPP.o ../src/MHashKeyGen.o \ ../src/MHashPP.o ../src/Matching.o ../src/MatchingAlgorithm.o \ ../src/ProgressOutput.o ../src/PseudoRandomSource.o ../src/RGBTriple.o \ ../src/RandomSource.o ../src/SampleValue.o ../src/SampleValueAdjacencyList.o \ ../src/Selector.o ../src/Session.o ../src/SteghideError.o ../src/Terminal.o \ ../src/Utils.o ../src/Vertex.o ../src/WavChunk.o ../src/WavChunkHeader.o \ ../src/WavChunkUnused.o ../src/WavFile.o ../src/WavFormatChunk.o \ ../src/WavPCMSampleValue.o ../src/error.o ../src/msg.o ../src/SMDConstructionHeuristic.o LIBS = @LIBINTL@ @LIBS@ MAINTAINERCLEANFILES = Makefile.in steghide-0.5.1/tests/Makefile.in0000644000076400001440000006376407743177331012235 # Makefile.in generated by automake 1.7.2 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBINTL@ @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_INTLDIR_FALSE = @USE_INTLDIR_FALSE@ USE_INTLDIR_TRUE = @USE_INTLDIR_TRUE@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_cv_prog_doxygen = @ac_cv_prog_doxygen@ ac_cv_prog_perl = @ac_cv_prog_perl@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ SUBDIRS = data TESTS = unittests systemtests.pl AM_CPPFLAGS = -I../src check_PROGRAMS = unittests EXTRA_DIST = systemtests.pl STSupport.pm st_fileformats.pl st_embparameters.pl noinst_HEADERS = \ AuFileTest.h AUtilsTest.h AudioSampleValueTest.h BFSAPHeuristicTest.h DFSAPHeuristicTest.h \ BitStringTest.h BmpOS2FileTest.h BmpPaletteSampleValueTest.h \ BmpRGBSampleValueTest.h BmpWinFileTest.h WKSConstructionHeuristicTest.h \ BmpFileTest.h CvrStgFileTest.h DummyFile.h \ DummySampleValue.h EdgeIteratorTest.h EmbDataTest.h GraphTest.h JpegFileTest.h \ JpegSampleValueTest.h MCryptPPTest.h MHashKeyGenTest.h MHashPPTest.h \ MatchingTest.h SampleValueAdjacencyListTest.h SampleValueTest.h SelectorTest.h \ Test.h TestCategory.h TestCategoryCaller.h TestSuite.h UnitTest.h \ WavFileTest.h WavPCMSampleValueTest.h utcommon.h unittests_SOURCES = \ AuFileTest.cc AUtilsTest.cc AudioSampleValueTest.cc BFSAPHeuristicTest.cc DFSAPHeuristicTest.cc \ BitStringTest.cc BmpOS2FileTest.cc BmpPaletteSampleValueTest.cc \ BmpRGBSampleValueTest.cc BmpWinFileTest.cc WKSConstructionHeuristicTest.cc \ BmpFileTest.cc CvrStgFileTest.cc \ DummyFile.cc DummySampleValue.cc EdgeIteratorTest.cc EmbDataTest.cc \ GraphTest.cc JpegFileTest.cc JpegSampleValueTest.cc MCryptPPTest.cc \ MHashKeyGenTest.cc MHashPPTest.cc MatchingTest.cc \ SampleValueAdjacencyListTest.cc SampleValueTest.cc SelectorTest.cc \ TestSuite.cc UnitTest.cc WavFileTest.cc WavPCMSampleValueTest.cc main.cc unittests_LDADD = \ ../src/Arg.o ../src/Arguments.o ../src/AssertionFailed.o ../src/AuFile.o \ ../src/AuSampleValues.o ../src/DFSAPHeuristic.o ../src/BFSAPHeuristic.o ../src/BinaryIO.o \ ../src/BitString.o ../src/BmpFile.o ../src/BmpPaletteSampleValue.o \ ../src/BmpRGBSampleValue.o ../src/BmpSampleValue.o \ ../src/WKSConstructionHeuristic.o ../src/CvrStgFile.o \ ../src/Edge.o ../src/EdgeIterator.o ../src/DMDConstructionHeuristic.o \ ../src/EmbData.o ../src/Embedder.o ../src/EncryptionAlgorithm.o \ ../src/EncryptionMode.o ../src/Extractor.o ../src/Graph.o ../src/JpegFile.o \ ../src/JpegSampleValue.o ../src/MCryptPP.o ../src/MHashKeyGen.o \ ../src/MHashPP.o ../src/Matching.o ../src/MatchingAlgorithm.o \ ../src/ProgressOutput.o ../src/PseudoRandomSource.o ../src/RGBTriple.o \ ../src/RandomSource.o ../src/SampleValue.o ../src/SampleValueAdjacencyList.o \ ../src/Selector.o ../src/Session.o ../src/SteghideError.o ../src/Terminal.o \ ../src/Utils.o ../src/Vertex.o ../src/WavChunk.o ../src/WavChunkHeader.o \ ../src/WavChunkUnused.o ../src/WavFile.o ../src/WavFormatChunk.o \ ../src/WavPCMSampleValue.o ../src/error.o ../src/msg.o ../src/SMDConstructionHeuristic.o MAINTAINERCLEANFILES = Makefile.in subdir = tests mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = check_PROGRAMS = unittests$(EXEEXT) am_unittests_OBJECTS = AuFileTest.$(OBJEXT) AUtilsTest.$(OBJEXT) \ AudioSampleValueTest.$(OBJEXT) BFSAPHeuristicTest.$(OBJEXT) \ DFSAPHeuristicTest.$(OBJEXT) BitStringTest.$(OBJEXT) \ BmpOS2FileTest.$(OBJEXT) BmpPaletteSampleValueTest.$(OBJEXT) \ BmpRGBSampleValueTest.$(OBJEXT) BmpWinFileTest.$(OBJEXT) \ WKSConstructionHeuristicTest.$(OBJEXT) BmpFileTest.$(OBJEXT) \ CvrStgFileTest.$(OBJEXT) DummyFile.$(OBJEXT) \ DummySampleValue.$(OBJEXT) EdgeIteratorTest.$(OBJEXT) \ EmbDataTest.$(OBJEXT) GraphTest.$(OBJEXT) \ JpegFileTest.$(OBJEXT) JpegSampleValueTest.$(OBJEXT) \ MCryptPPTest.$(OBJEXT) MHashKeyGenTest.$(OBJEXT) \ MHashPPTest.$(OBJEXT) MatchingTest.$(OBJEXT) \ SampleValueAdjacencyListTest.$(OBJEXT) \ SampleValueTest.$(OBJEXT) SelectorTest.$(OBJEXT) \ TestSuite.$(OBJEXT) UnitTest.$(OBJEXT) WavFileTest.$(OBJEXT) \ WavPCMSampleValueTest.$(OBJEXT) main.$(OBJEXT) unittests_OBJECTS = $(am_unittests_OBJECTS) unittests_DEPENDENCIES = ../src/Arg.o ../src/Arguments.o \ ../src/AssertionFailed.o ../src/AuFile.o \ ../src/AuSampleValues.o ../src/DFSAPHeuristic.o \ ../src/BFSAPHeuristic.o ../src/BinaryIO.o ../src/BitString.o \ ../src/BmpFile.o ../src/BmpPaletteSampleValue.o \ ../src/BmpRGBSampleValue.o ../src/BmpSampleValue.o \ ../src/WKSConstructionHeuristic.o ../src/CvrStgFile.o \ ../src/Edge.o ../src/EdgeIterator.o \ ../src/DMDConstructionHeuristic.o ../src/EmbData.o \ ../src/Embedder.o ../src/EncryptionAlgorithm.o \ ../src/EncryptionMode.o ../src/Extractor.o ../src/Graph.o \ ../src/JpegFile.o ../src/JpegSampleValue.o ../src/MCryptPP.o \ ../src/MHashKeyGen.o ../src/MHashPP.o ../src/Matching.o \ ../src/MatchingAlgorithm.o ../src/ProgressOutput.o \ ../src/PseudoRandomSource.o ../src/RGBTriple.o \ ../src/RandomSource.o ../src/SampleValue.o \ ../src/SampleValueAdjacencyList.o ../src/Selector.o \ ../src/Session.o ../src/SteghideError.o ../src/Terminal.o \ ../src/Utils.o ../src/Vertex.o ../src/WavChunk.o \ ../src/WavChunkHeader.o ../src/WavChunkUnused.o \ ../src/WavFile.o ../src/WavFormatChunk.o \ ../src/WavPCMSampleValue.o ../src/error.o ../src/msg.o \ ../src/SMDConstructionHeuristic.o unittests_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/AUtilsTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/AuFileTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/AudioSampleValueTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BFSAPHeuristicTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BitStringTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BmpFileTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BmpOS2FileTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BmpPaletteSampleValueTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BmpRGBSampleValueTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/BmpWinFileTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/CvrStgFileTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/DFSAPHeuristicTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/DummyFile.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/DummySampleValue.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/EdgeIteratorTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/EmbDataTest.Po ./$(DEPDIR)/GraphTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/JpegFileTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/JpegSampleValueTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/MCryptPPTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/MHashKeyGenTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/MHashPPTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/MatchingTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/SampleValueAdjacencyListTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/SampleValueTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/SelectorTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/TestSuite.Po ./$(DEPDIR)/UnitTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/WKSConstructionHeuristicTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/WavFileTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/WavPCMSampleValueTest.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/main.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ DIST_SOURCES = $(unittests_SOURCES) HEADERS = $(noinst_HEADERS) RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in DIST_SUBDIRS = $(SUBDIRS) SOURCES = $(unittests_SOURCES) all: all-recursive .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --foreign tests/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) clean-checkPROGRAMS: -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) unittests$(EXEEXT): $(unittests_OBJECTS) $(unittests_DEPENDENCIES) @rm -f unittests$(EXEEXT) $(CXXLINK) $(unittests_LDFLAGS) $(unittests_OBJECTS) $(unittests_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AUtilsTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AuFileTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AudioSampleValueTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BFSAPHeuristicTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BitStringTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BmpFileTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BmpOS2FileTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BmpPaletteSampleValueTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BmpRGBSampleValueTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BmpWinFileTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CvrStgFileTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DFSAPHeuristicTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DummyFile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DummySampleValue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EdgeIteratorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EmbDataTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GraphTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/JpegFileTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/JpegSampleValueTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MCryptPPTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MHashKeyGenTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MHashPPTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MatchingTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SampleValueAdjacencyListTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SampleValueTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SelectorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestSuite.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UnitTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WKSConstructionHeuristicTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WavFileTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WavPCMSampleValueTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCXX_TRUE@ fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ @am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCXX_TRUE@ fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="All $$all tests passed"; \ else \ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all tests failed"; \ else \ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ skipped="($$skip tests were not run)"; \ test `echo "$$skipped" | wc -c` -gt `echo "$$banner" | wc -c` && \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -gt `echo "$$banner" | wc -c` && \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -n "$$skipped" && echo "$$skipped"; \ test -n "$$report" && echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-TESTS \ check-am clean clean-checkPROGRAMS clean-generic \ clean-recursive ctags ctags-recursive distclean \ distclean-compile distclean-depend distclean-generic \ distclean-recursive distclean-tags distdir dvi dvi-am \ dvi-recursive info info-am info-recursive install install-am \ install-data install-data-am install-data-recursive \ install-exec install-exec-am install-exec-recursive \ install-info install-info-am install-info-recursive install-man \ install-recursive install-strip installcheck installcheck-am \ installdirs installdirs-am installdirs-recursive \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-recursive pdf pdf-am \ pdf-recursive ps ps-am ps-recursive tags tags-recursive \ uninstall uninstall-am uninstall-info-am \ uninstall-info-recursive uninstall-recursive # 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: steghide-0.5.1/tests/EmbDataTest.h0000644000076400001440000000265507736017672012471 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_EMBDATATEST_H #define SH_EMBDATATEST_H class BitString ; #define private public #include "EmbData.h" #undef private #include "UnitTest.h" #include "TestSuite.h" class EmbDataTest : public UnitTest { public: EmbDataTest (TestSuite* s) ; void testEmbedding (void) ; void testExtracting (void) ; private: bool genericTestEmbedding (EmbData emb, BitString shouldbe) ; /** * pass the BitString bs to emb using getNumBitsNeeded and addBits * \return true iff emb took exactly the (number of) bits from bs **/ bool feed_to (const BitString& bs, EmbData& emb) ; } ; #endif // ndef SH_EMBDATATEST_H steghide-0.5.1/tests/BmpRGBSampleValueTest.cc0000644000076400001440000000605107735577231014535 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "BmpRGBSampleValueTest.h" #include "utcommon.h" #include "BmpRGBSampleValue.h" #include "CvrStgFile.h" BmpRGBSampleValueTest::BmpRGBSampleValueTest (TestSuite* s) : SampleValueTest ("BmpRGBSampleValue", s) { ADDTESTCATEGORY (BmpRGBSampleValueTest, testDistance) ; ADDTESTCATEGORY (BmpRGBSampleValueTest, testIsNeighbour) ; } void BmpRGBSampleValueTest::setup () { UnitTest::setup() ; Globs.reset() ; f_win = CvrStgFile::readFile (std::string(DATADIR) + "win3x24_std.bmp") ; sv_0_0_0 = new BmpRGBSampleValue (0, 0, 0) ; sv_1_1_1 = new BmpRGBSampleValue (1, 1, 1) ; sv_0_3_4 = new BmpRGBSampleValue (0, 3, 4) ; sv_10_10_10 = new BmpRGBSampleValue (10, 10, 10) ; sv_12_13_14 = new BmpRGBSampleValue (12, 13, 14) ; sv_128_128_128 = new BmpRGBSampleValue (128, 128, 128) ; sv_210_0_120 = new BmpRGBSampleValue (210, 0, 120) ; sv_255_255_255 = new BmpRGBSampleValue (255, 255, 255) ; gl_win = Globs ; Globs.reset() ; f_os2 = CvrStgFile::readFile (std::string(DATADIR) + "os21x24_std.bmp") ; gl_os2 = Globs ; } void BmpRGBSampleValueTest::cleanup () { UnitTest::cleanup() ; delete f_win ; delete f_os2 ; delete sv_0_0_0 ; delete sv_1_1_1 ; delete sv_0_3_4 ; delete sv_12_13_14 ; delete sv_128_128_128 ; delete sv_210_0_120 ; delete sv_255_255_255 ; } void BmpRGBSampleValueTest::testDistance () { Globs = gl_win ; addTestResult (genericTestDistance (sv_0_0_0, sv_0_0_0, 0)) ; addTestResult (genericTestDistance (sv_0_0_0, sv_0_3_4, 25)) ; addTestResult (genericTestDistance (sv_0_3_4, sv_12_13_14, 344)) ; addTestResult (genericTestDistance (sv_1_1_1, sv_128_128_128, 48387)) ; addTestResult (genericTestDistance (sv_210_0_120, sv_12_13_14, 50609)) ; addTestResult (genericTestDistance (sv_0_0_0, sv_255_255_255, 195075)) ; } void BmpRGBSampleValueTest::testIsNeighbour () { Globs = gl_win ; addTestResult (genericTestIsNeighbour (sv_0_0_0, sv_0_3_4, true)) ; addTestResult (genericTestIsNeighbour (sv_0_3_4, sv_12_13_14, false)) ; addTestResult (genericTestIsNeighbour (sv_1_1_1, sv_0_3_4, true)) ; addTestResult (genericTestIsNeighbour (sv_10_10_10, sv_0_3_4, false)) ; addTestResult (genericTestIsNeighbour (sv_128_128_128, sv_255_255_255, false)) ; addTestResult (genericTestIsNeighbour (sv_10_10_10, sv_12_13_14, true)) ; } steghide-0.5.1/tests/BFSAPHeuristicTest.h0000644000076400001440000000277307735577231013711 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BFSAPHEURISTICTEST_H #define SH_BFSAPHEURISTICTEST_H class BFSAPHeuristic ; class BitString ; class CvrStgFile ; class Matching ; class Selector ; #include "UnitTest.h" #include "TestSuite.h" class BFSAPHeuristicTest : public UnitTest { public: BFSAPHeuristicTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testAlgorithm (void) ; private: BitString *bs1, *bs2, *bs3, *bs4, *bs5 ; CvrStgFile *f1, *f2, *f3, *f4, *f5 ; Selector *s1, *s2, *s3, *s4, *s5 ; Graph *g1, *g2, *g3, *g4, *g5 ; Matching *m1, *m2, *m3, *m4, *m5 ; BFSAPHeuristic *aph1, *aph2, *aph3, *aph4, *aph5 ; Globals gl1, gl2, gl3, gl4, gl5 ; } ; #endif // ndef SH_BFSAPHEURISTICTEST_H steghide-0.5.1/tests/st_fileformats.pl0000755000076400001440000000323007742075242013524 #!/usr/bin/perl -w use STSupport; use constant EMPTY => {e => "none", Z => "", K => "", "-check" => ""} ; sub runAu { startSubCategory("au") ; addTestResult(runEmbExtCmp(DATADIR . "mulaw_std.au", DATADIR . RND100, EMPTY)); addTestResult(runEmbExtCmp(DATADIR . "pcm8_std.au", DATADIR . RND100, EMPTY)); addTestResult(runEmbExtCmp(DATADIR . "pcm16_std.au", DATADIR . RND100, EMPTY)); endSubCategory() ; } sub runBmp { startSubCategory("bmp") ; addTestResult(runEmbExtCmp(DATADIR . "os21x1_std.bmp", DATADIR . RND100, EMPTY)); addTestResult(runEmbExtCmp(DATADIR . "os21x4_std.bmp", DATADIR . RND100, EMPTY)); addTestResult(runEmbExtCmp(DATADIR . "os21x8_std.bmp", DATADIR . RND100, EMPTY)); addTestResult(runEmbExtCmp(DATADIR . "os21x24_std.bmp", DATADIR . RND100, EMPTY)); addTestResult(runEmbExtCmp(DATADIR . "win3x1_std.bmp", DATADIR . RND100, EMPTY)); addTestResult(runEmbExtCmp(DATADIR . "win3x4_std.bmp", DATADIR . RND100, EMPTY)); addTestResult(runEmbExtCmp(DATADIR . "win3x8_std.bmp", DATADIR . RND100, EMPTY)); addTestResult(runEmbExtCmp(DATADIR . "win3x24_std.bmp", DATADIR . RND100, EMPTY)); endSubCategory() ; } sub runJpeg { startSubCategory("jpeg") ; addTestResult(runEmbExtCmp(DATADIR . "std.jpg", DATADIR . RND100, EMPTY)); addTestResult(runEmbExtCmp(DATADIR . "prog.jpg", DATADIR . RND100, EMPTY)); endSubCategory() ; } sub runWav { startSubCategory("wav") ; addTestResult(runEmbExtCmp(DATADIR . "pcm8_std.wav", DATADIR . RND100, EMPTY)); addTestResult(runEmbExtCmp(DATADIR . "pcm16_std.wav", DATADIR . RND100, EMPTY)); endSubCategory() ; } startCategory("File Formats", @ARGV) ; runAu() ; runBmp() ; runJpeg() ; runWav() ; exit endCategory() ; steghide-0.5.1/tests/WKSConstructionHeuristicTest.cc0000644000076400001440000000666007735577231016272 /* * steghide 0.5.1 - a steganogrchy program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "WKSConstructionHeuristic.h" #include "BitString.h" #include "Edge.h" #include "Graph.h" #include "Matching.h" #include "Selector.h" #include "DummyFile.h" #include "WKSConstructionHeuristicTest.h" #define CREATEEDGE(G,V1,V2) (new Edge ((G)->getVertex(V1), 0, (G)->getVertex(V2), 1)) WKSConstructionHeuristicTest::WKSConstructionHeuristicTest (TestSuite* s) : UnitTest ("WKSConstructionHeuristic", s) { ADDTESTCATEGORY (WKSConstructionHeuristicTest, testAlgorithm) ; } void WKSConstructionHeuristicTest::setup () { UnitTest::setup() ; // a trivial case to start with { Globs.reset() ; std::vector > adjlist (2) ; adjlist[0].push_back(1) ; DummyFile::createGraph (adjlist, &bs1, &f1, &s1) ; g1 = new Graph (f1, *bs1, *s1) ; m1 = new Matching (g1) ; ch1 = new WKSConstructionHeuristic (g1, m1, 100.0) ; gl1 = Globs ; } // first counterexample - will not find maximum matching { Globs.reset() ; std::vector > adjlist (4) ; adjlist[0].push_back(1) ; adjlist[0].push_back(2) ; adjlist[0].push_back(3) ; adjlist[1].push_back(2) ; adjlist[1].push_back(3) ; DummyFile::createGraph (adjlist, &bs2, &f2, &s2) ; g2 = new Graph (f2, *bs2, *s2) ; m2 = new Matching (g2) ; ch2 = new WKSConstructionHeuristic (g2, m2, 100.0) ; gl2 = Globs ; } // will find maximum matching here because of Deg1-rule { Globs.reset() ; std::vector > adjlist (4) ; adjlist[0].push_back(1) ; adjlist[0].push_back(2) ; adjlist[1].push_back(3) ; DummyFile::createGraph (adjlist, &bs3, &f3, &s3) ; g3 = new Graph (f3, *bs3, *s3) ; m3 = new Matching (g3) ; ch3 = new WKSConstructionHeuristic (g3, m3, 100.0) ; gl3 = Globs ; } } void WKSConstructionHeuristicTest::cleanup () { UnitTest::cleanup() ; Globs = gl1 ; delete ch1 ; delete m1 ; delete g1 ; delete s1 ; delete bs1 ; delete f1 ; Globs = gl2 ; delete ch2 ; delete m2 ; delete g2 ; delete s2 ; delete bs2 ; delete f2 ; Globs = gl3 ; delete ch3 ; delete m3 ; delete g3 ; delete s3 ; delete bs3 ; delete f3 ; } void WKSConstructionHeuristicTest::testAlgorithm () { { Globs = gl1 ; ch1->run() ; addTestResult ( m1->isMatched((VertexLabel) 0) && m1->isMatched((VertexLabel) 1)) ; } { Globs = gl2 ; ch2->run() ; addTestResult ( m2->isMatched((VertexLabel) 0) && m2->isMatched((VertexLabel) 1) && m2->isExposed((VertexLabel) 2) && m2->isExposed((VertexLabel) 3)) ; } { Globs = gl3 ; ch3->run() ; addTestResult ( m3->isMatched((VertexLabel) 0) && m3->isMatched((VertexLabel) 1) && m3->isMatched((VertexLabel) 2) && m3->isMatched((VertexLabel) 3)) ; } } steghide-0.5.1/tests/DummyFile.cc0000644000076400001440000000630107735577231012356 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "BitString.h" #include "Selector.h" #include "DummyFile.h" #include "DummySampleValue.h" DummyFile::DummyFile (UWORD16 s, std::vector >* svam) : SampleValueAdjacencyMatrix(svam) { Samples.resize (s) ; for (UWORD16 i = 0 ; i < s ; i++) { Samples[i] = i ; } setSamplesPerVertex (SamplesPerVertex) ; setEmbValueModulus (EmbValueModulus) ; setRadius (0) ; // undefined, neighbourhood relatin decided by svam } std::list DummyFile::getProperties () const { std::list retval ; retval.push_back (CvrStgFile::Property (_("format"), "dummy")) ; return retval ; } unsigned long DummyFile::getNumSamples () const { return Samples.size() ; } SampleValue* DummyFile::getSampleValue (const SamplePos pos) const { return (SampleValue*) (new DummySampleValue (Samples[pos])) ; } void DummyFile::replaceSample (const SamplePos pos, const SampleValue* s) { myassert (pos < Samples.size()) ; DummySampleValue *sample = (DummySampleValue*) s ; Samples[pos] = sample->getValue() ; } void DummyFile::createGraph (std::vector >& adjlist, BitString** bs, CvrStgFile** f, Selector** s) { unsigned int numvertices = adjlist.size() ; // eliminate duplicated edges from adjlist (only allow v_i -> ...,v_j,... with j > i) for (UWORD16 srcv = 0 ; srcv < numvertices ; srcv++) { for (std::list::iterator destv = adjlist[srcv].begin() ; destv != adjlist[srcv].end() ; destv++) { if (srcv > (*destv)) { adjlist[srcv].erase (destv) ; } } } // allocate memory for SampleValue Adjacency-Matrix std::vector >* svam = new std::vector > (2 * numvertices) ; for (UWORD16 srcv = 0 ; srcv < numvertices ; srcv++) { (*svam)[2*srcv] = std::vector (2 * numvertices) ; (*svam)[2*srcv + 1] = std::vector (2 * numvertices) ; } // fill SampleValue Adjacency-Matrix for (UWORD16 srcv = 0 ; srcv < numvertices ; srcv++) { UWORD16 srcsv = 2 * srcv ; for (std::list::const_iterator destv = adjlist[srcv].begin() ; destv != adjlist[srcv].end() ; destv++) { UWORD16 destsv = 2 * (*destv) + 1 ; (*svam)[srcsv][destsv] = true ; (*svam)[destsv][srcsv] = true ; } } (*f) = (CvrStgFile*) new DummyFile (2 * numvertices, svam) ; (*bs) = new BitString ((unsigned long) numvertices) ; // zeros only (*s) = new Selector (2 * numvertices) ; // identity permutation } steghide-0.5.1/tests/WKSConstructionHeuristicTest.h0000644000076400001440000000277707735577231016141 /* * steghide 0.5.1 - a steganogrchy program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_WKSCONSTRUCTIONHEURISTICTEST_H #define SH_WKSCONSTRUCTIONHEURISTICTEST_H class BitString ; class WKSConstructionHeuristic ; class CvrStgFile ; class Graph ; class Matching ; class Selector ; #include "UnitTest.h" #include "TestSuite.h" class WKSConstructionHeuristicTest : public UnitTest { public: WKSConstructionHeuristicTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testAlgorithm (void) ; private: BitString *bs1, *bs2, *bs3 ; CvrStgFile *f1, *f2, *f3 ; Selector *s1, *s2, *s3 ; Graph *g1, *g2, *g3 ; WKSConstructionHeuristic *ch1, *ch2, *ch3 ; Matching *m1, *m2, *m3 ; Globals gl1, gl2, gl3 ; } ; #endif // ndef SH_WKSCONSTRUCTIONHEURISTICTEST_H steghide-0.5.1/tests/MHashPPTest.cc0000644000076400001440000000742307735577231012571 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "MHashPPTest.h" #include "BitString.h" MHashPPTest::MHashPPTest (TestSuite* s) : UnitTest ("MHashPP", s) { ADDTESTCATEGORY (MHashPPTest, testMD5) ; ADDTESTCATEGORY (MHashPPTest, testCRC32) ; } void MHashPPTest::testMD5 (void) { BYTE shouldbe1[] = { 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e } ; addTestResult (genericTestMHashPP (MHASH_MD5, BitString (std::string("")), shouldbe1)) ; BYTE shouldbe2[] = { 0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8, 0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61 } ; addTestResult (genericTestMHashPP (MHASH_MD5, BitString (std::string("a")), shouldbe2)) ; BYTE shouldbe3[] = { 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0, 0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72 } ; addTestResult (genericTestMHashPP (MHASH_MD5, BitString (std::string("abc")), shouldbe3)) ; BYTE shouldbe4[] = { 0xf9, 0x6b, 0x69, 0x7d, 0x7c, 0xb7, 0x93, 0x8d, 0x52, 0x5a, 0x2f, 0x31, 0xaa, 0xf1, 0x61, 0xd0 } ; addTestResult (genericTestMHashPP (MHASH_MD5, BitString (std::string("message digest")), shouldbe4)) ; BYTE shouldbe5[] = { 0xc3, 0xfc, 0xd3, 0xd7, 0x61, 0x92, 0xe4, 0x00, 0x7d, 0xfb, 0x49, 0x6c, 0xca, 0x67, 0xe1, 0x3b } ; addTestResult (genericTestMHashPP (MHASH_MD5, BitString (std::string("abcdefghijklmnopqrstuvwxyz")), shouldbe5)) ; BYTE shouldbe6[] = { 0xd1, 0x74, 0xab, 0x98, 0xd2, 0x77, 0xd9, 0xf5, 0xa5, 0x61, 0x1c, 0x2c, 0x9f, 0x41, 0x9d, 0x9f } ; addTestResult (genericTestMHashPP (MHASH_MD5, BitString (std::string("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")), shouldbe6)) ; BYTE shouldbe7[] = { 0x57, 0xed, 0xf4, 0xa2, 0x2b, 0xe3, 0xc9, 0x55, 0xac, 0x49, 0xda, 0x2e, 0x21, 0x07, 0xb6, 0x7a } ; addTestResult (genericTestMHashPP (MHASH_MD5, BitString (std::string("12345678901234567890123456789012345678901234567890123456789012345678901234567890")), shouldbe7)) ; } void MHashPPTest::testCRC32 (void) { // the test vector used by libmhash BYTE shouldbe2[] = { 0x7F, 0xBE, 0xB0, 0x2E } ; addTestResult (genericTestMHashPP (MHASH_CRC32, BitString(std::string("checksum")), shouldbe2)) ; } bool MHashPPTest::genericTestMHashPP (hashid a, BitString data, BYTE* shouldbe) { bool retval = true ; MHashPP hash (a) ; hash << data << MHashPP::endhash ; const std::vector& result = hash.getHashBytes() ; for (unsigned short i = 0 ; i < result.size() ; i++) { if (result[i] != shouldbe[i]) { retval = false ; } } if (!retval) { std::cerr << std::endl << "---" << std::endl ; std::cerr << "genericTestMHashPP failed" << std::endl ; std::cerr << "shouldbe: " ; for (unsigned short i = 0 ; i < result.size() ; i++) { std::cerr << (unsigned short) shouldbe[i] ; } std::cerr << std::endl << "result: " ; for (unsigned short i = 0 ; i < result.size() ; i++) { std::cerr << (unsigned short) result[i] ; } std::cerr << std::dec << std::endl ; std::cerr << "---" << std::endl << std::endl ; } return retval ; } steghide-0.5.1/tests/STSupport.pm0000644000076400001440000000667207742075513012442 package STSupport; require Exporter; use File::Compare; @ISA = qw(Exporter); @EXPORT = qw( DATADIR RND100 getArgString startCategory endCategory startSubCategory endSubCategory addTestResult runEmbExtCmp ); # # set this to 1 if you want the test script to print verbose output # $Arg_Verbosity = 0 ; $curcategory = ""; $catstatus = 0 ; $cursubcategory = ""; $subcatstatus = 0 ; use constant DATADIR => "./data/" ; use constant RND100 => "rnd100" ; use constant TAB => " " ; use constant STEGHIDE => "../src/steghide" ; use constant DEFAULTSTGFN => "stgfile" ; use constant DEFAULTEXTFN => "extfile" ; use constant DEFEMBARGBASE => (command => "embed", f => "", "q" => "", p => "\"a passphrase\"", sf => DEFAULTSTGFN) ; use constant DEFEXTARGBASE => (command => "extract", f => "", "q" => "", p => "\"a passphrase\"", sf => DEFAULTSTGFN, xf => DEFAULTEXTFN) ; # # parse arguments for a st_*.pl script # sub parseArgs { while (@_) { $ARGV = shift @_ ; if ($ARGV eq "-v" || $ARGV eq "--verbose") { $Arg_Verbosity = 1 ; } } } # # create a string of arguments ready to be fed to steghide # expects a hash containing a "command" => "something" and argument/argument value pairs # sub getArgString { my %args = @_ ; $retval = $args{command} ; delete $args{command} ; foreach $arg (keys %args) { $retval .= " -$arg $args{$arg}" ; } return $retval ; } # # start a category # first argument: category name, rest of list: arguments for execution of this category script # sub startCategory { $curcategory = shift @_ ; parseArgs (@_) ; print "$curcategory:\n" ; $catstatus = 1 ; } # # # return value: 1 if an error occured, 0 if everything was ok sub endCategory { $curcategory = "" ; print "\n" ; if ($catstatus) { # no error return 0 ; } else { # an error occured return 1 ; } } sub startSubCategory { $cursubcategory = $_[0] ; print TAB . $cursubcategory ; $subcatstatus = 1 ; } sub endSubCategory { $cursubcategory = "" ; if ($subcatstatus) { print "ok\n" ; } else { print " !! FAILED !!\n" ; } } sub addTestResult { if ($_[0]) { print "."; } else { print "F"; $subcatstatus = 0 ; $catstatus = 0 ; } } # # remove all files in the list passed to it sub remove { while (@_) { $f = shift @_ ; system "rm -f $f" ; } } # # run an embed-extract-compare test # expects 1-4 arguments: cvrfn, embfn, callerembargs, callerextargs sub runEmbExtCmp { if ($Arg_Verbosity) { print "\n\nrunning EmbExtCmp with...\n" ; } # evaluate arguments $cvrfn = shift @_ ; $embfn = DATADIR . RND100 ; # default if (@_) { $embfn = shift @_ ; } %callerembargs = () ; if (@_) { $ref = shift @_ ; %callerembargs = %$ref ; } %callerextargs = () ; if (@_) { $ref = shift @_ ; %callerextargs = %$ref ; } # prepare embedding %embargs = ( DEFEMBARGBASE, cf => $cvrfn, ef => $embfn, %callerembargs ) ; $embcommand = STEGHIDE . " " . getArgString(%embargs) ; # prepare extracting %extargs = ( DEFEXTARGBASE, %callerextargs ) ; $extcommand = STEGHIDE . " " . getArgString(%extargs) ; if ($Arg_Verbosity) { print "embcommand: $embcommand\n" ; print "extcommand: $extcommand\n" ; } # execute commands `$embcommand 2>&1` ; # don't let it print to stderr or stdout return 0 if $? ; `$extcommand 2>&1` ; # don't let it print to stderr or stdout return 0 if $? ; # compare embfile and extfile $filesequal = not compare ($embargs{ef}, $extargs{xf}) ; remove ($embargs{sf}, $extargs{xf}) ; return $filesequal ; } 1; steghide-0.5.1/tests/TestSuite.h0000644000076400001440000000345107735577231012261 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_TESTSUITE_H #define SH_TESTSUITE_H #include #include #include #include "Test.h" #include "UnitTest.h" class TestSuite : public Test { public: enum TESTRESULT { NOTINSTALLED, // when something that is needed for the test is not installed on the current system KNOWNEXCEPTION, UNKNOWNEXCEPTION } ; TestSuite (void) ; void addUnitTest (UnitTest* ut) ; void run (void) ; /** * \return true iff all tests were ok **/ bool getResult (void) { return SuiteOk ; } ; // used during testing void startUnit (std::string n) ; void endUnit (std::string n) ; void startCategory (std::string n) ; void endCategory (std::string n) ; void addTestResult (bool r) ; void addTestResult (TESTRESULT r) ; private: std::vector UnitTests ; std::string runningUnit ; std::string runningCategory ; bool runningCategoryOk ; bool SuiteOk ; unsigned short TestNumber ; std::ostream* OutStream ; } ; #endif // ndef SH_TESTSUITE_H steghide-0.5.1/tests/JpegFileTest.cc0000644000076400001440000000462307735577231013015 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "utcommon.h" #include "JpegFileTest.h" JpegFileTest::JpegFileTest (TestSuite* s) : CvrStgFileTest("JpegFile", s) { ADDTESTCATEGORY (JpegFileTest, testReadEmbedExtract) ; ADDTESTCATEGORY (JpegFileTest, testReadEmbedWriteReadExtract) ; } void JpegFileTest::setup () { UnitTest::setup() ; Globs.reset() ; f1 = CvrStgFile::readFile (std::string(DATADIR) + "std.jpg") ; bs1 = new BitString (std::string ("a test passphrase")) ; gl1 = Globs ; Globs.reset() ; f2 = CvrStgFile::readFile (std::string(DATADIR) + "prog.jpg") ; bs2 = new BitString (std::string ("another test passphrase")) ; gl2 = Globs ; } void JpegFileTest::cleanup () { UnitTest::cleanup() ; delete bs1 ; delete bs2 ; delete f1 ; delete f2 ; } void JpegFileTest::testReadEmbedExtract() { Globs = gl1 ; addTestResult (genericTestReadEmbedExtract (std::string(DATADIR) + "std.jpg", *bs1)) ; Globs = gl2 ; addTestResult (genericTestReadEmbedExtract (std::string(DATADIR) + "prog.jpg", *bs2)) ; } void JpegFileTest::testReadEmbedWriteReadExtract() { Globs = gl1 ; addTestResult (genericTestReadEmbedWriteReadExtract (std::string(DATADIR) + "std.jpg", *bs2)) ; Globs = gl2 ; addTestResult (genericTestReadEmbedWriteReadExtract (std::string(DATADIR) + "prog.jpg", *bs1)) ; } void JpegFileTest::testPosition() { // TODO } void JpegFileTest::testReadExtractCompare () { // TODO } void JpegFileTest::testEmbeddedValue () { #if 0 Globs = gl1 ; addTestResult (genericTestEmbeddedValue (f1)) ; Globs = gl2 ; addTestResult (genericTestEmbeddedValue (f2)) ; Globs = gl3 ; addTestResult (genericTestEmbeddedValue (f3)) ; #endif } steghide-0.5.1/tests/MCryptPPTest.cc0000644000076400001440000000240407735577231013001 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "MCryptPPTest.h" MCryptPPTest::MCryptPPTest (TestSuite* s) : UnitTest ("MCryptPP", s) { ADDTESTCATEGORY (MCryptPPTest, testEncryption) ; ADDTESTCATEGORY (MCryptPPTest, testDecryption) ; } // TODO - implement this unit test void MCryptPPTest::testEncryption (void) { } void MCryptPPTest::testDecryption (void) { } bool MCryptPPTest::genericTestEncryption () { // evaluate test vector } bool MCryptPPTest::genericTestDecryption () { } steghide-0.5.1/tests/BmpFileTest.h0000644000076400001440000000237207735577231012507 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BMPFILETEST_H #define SH_BMPFILETEST_H #include "BmpFile.h" #include "Selector.h" #include "CvrStgFileTest.h" class BmpFileTest : public CvrStgFileTest { public: BmpFileTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testSVALCalculation (void) ; private: CvrStgFile *f1, *f2 ; Graph *g1, *g2 ; Selector *s1, *s2 ; BitString *bs1, *bs2 ; Globals gl1, gl2 ; } ; #endif // ndef SH_BMPFILETEST_H steghide-0.5.1/tests/EmbDataTest.cc0000644000076400001440000000737007736020120012604 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "BitString.h" #include "EmbDataTest.h" #include "TestCategoryCaller.h" #include "utcommon.h" EmbDataTest::EmbDataTest (TestSuite* s) : UnitTest ("EmbData", s) { ADDTESTCATEGORY (EmbDataTest, testEmbedding) ; ADDTESTCATEGORY (EmbDataTest, testExtracting) ; } void EmbDataTest::testEmbedding () { { std::vector data (1) ; EmbData emb (EmbData::EMBED, "passphrase not used", "test.txt") ; emb.setEncAlgo (EncryptionAlgorithm (EncryptionAlgorithm::NONE)) ; emb.setEncMode (EncryptionMode (EncryptionMode::ECB)) ; emb.setCompression (0) ; emb.setChecksum (false) ; emb.setData (data) ; BitString shouldbe ; shouldbe.append (EmbData::Magic, EmbData::NBitsMagic) ; // magic shouldbe.append (false) ; // version shouldbe.append ((BYTE) 0, 5) ; // encalgo shouldbe.append ((BYTE) 0, 3) ; // encmode shouldbe.append ((UWORD32) 82, 32) ; // nplainbits shouldbe.append (false) ; // compression shouldbe.append (false) ; // checksum shouldbe.append (std::string("test.txt")) ; // filename shouldbe.append ((BYTE) 0, 8) ; // end of filename shouldbe.append ((BYTE) 0, 8) ; // data addTestResult (genericTestEmbedding (emb, shouldbe)) ; } } void EmbDataTest::testExtracting () { { BitString bs ; bs.append (EmbData::Magic, EmbData::NBitsMagic) ; // magic bs.append (false) ; // version bs.append ((BYTE) 0, 5) ; // encalgo bs.append ((BYTE) 1, 3) ; // encmode bs.append ((UWORD32) 82, 32) ; // nplainbits bs.append (false) ; // compression bs.append (false) ; // checksum bs.append (std::string("testfile")) ; // filename bs.append ((BYTE) 0, 8) ; // end of filename bs.append ((BYTE) 0xff, 8) ; // data EmbData emb (EmbData::EXTRACT, "passphrase not used") ; bool ok = feed_to (bs, emb) ; ok = (emb.getEncAlgo() == EncryptionAlgorithm(EncryptionAlgorithm::NONE)) && ok ; ok = (emb.getEncMode() == EncryptionMode(EncryptionMode::CBC)) && ok ; ok = (emb.getCompression() == 0) && ok ; ok = (emb.getChecksum() == false) && ok ; ok = (emb.getFileName() == "testfile") && ok ; ok = (emb.getData().size() == 1 && emb.getData()[0] == 0xff) && ok ; addTestResult (ok) ; } } bool EmbDataTest::genericTestEmbedding (EmbData e, BitString shouldbe) { BitString res = e.getBitString() ; bool retval = (res == shouldbe) ; if (ArgVerbose && !retval) { std::cerr << std::endl << "---- FAILED: genericTestEmbedding ----" << std::endl ; std::cerr << "result:" << std::endl ; res.print() ; std::cerr << "should be:" << std::endl ; shouldbe.print() ; std::cerr << "-------------------------------------" << std::endl ; } return retval ; } bool EmbDataTest::feed_to (const BitString& bs, EmbData& emb) { UWORD32 idx = 0 ; while (!emb.finished()) { UWORD32 bitsrequested = emb.getNumBitsRequested() ; if (idx + bitsrequested > bs.getLength()) { return false ; } emb.addBits (bs.getBits (idx, bitsrequested)) ; idx += bitsrequested ; } return (idx == bs.getLength()) ; } steghide-0.5.1/tests/utcommon.h0000644000076400001440000000200107735577231012157 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_UTCOMMON_H #define SH_UTCOMMON_H #define DATADIR "./data/" #define REMOVE "rm -f" #define COMPARE "cmp -s" #define COPY "cp" extern bool ArgVerbose ; #endif // ndef SH_UTCOMMON_H steghide-0.5.1/tests/SampleValueTest.h0000644000076400001440000000361007735577231013403 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_SAMPLEVALUETEST_H #define SH_SAMPLEVALUETEST_H #include #include "UnitTest.h" class SampleValue ; class SampleValueTest : public UnitTest { public: SampleValueTest (std::string n, TestSuite* s) : UnitTest(n, s) {} ; protected: /** * generic distance test * \param s1 a sample value * \param s2 another sample value * \param dist this should be the distance between s1 and s2 * \return true iff distance is commutative and return dist **/ bool genericTestDistance (SampleValue* s1, SampleValue* s2, UWORD32 dist) ; /** * generic neighbourhood test * \param s1 a sample value * \param s2 another sample value * \param res true iff they are neighbours * \return true iff calling isNeighbour (with reflexivity) equals res **/ bool genericTestIsNeighbour (SampleValue* s1, SampleValue* s2, bool res) ; /** * generic evalue test * \param s a sample value * \param ev an embedded value * \return true iff s->getEmbeddedValue() == ev **/ bool genericTestEValue (SampleValue* s, EmbValue ev) ; } ; #endif // ndef SH_SAMPLEVALUETEST_H steghide-0.5.1/tests/BmpFileTest.cc0000644000076400001440000000403607735577231012644 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "Graph.h" #include "utcommon.h" #include "BmpFileTest.h" BmpFileTest::BmpFileTest (TestSuite* s) : CvrStgFileTest("BmpFile", s) { ADDTESTCATEGORY (BmpFileTest, testSVALCalculation) ; } void BmpFileTest::setup () { UnitTest::setup() ; Globs.reset() ; f1 = CvrStgFile::readFile (std::string(DATADIR) + "win3x24_std.bmp") ; bs1 = new BitString (std::string ("this BitString will be embedded")) ; s1 = new Selector (bs1->getLength() * f1->getSamplesPerVertex(), std::string ("a passphrase")) ; g1 = new Graph (f1, *bs1, *s1) ; gl1 = Globs ; Globs.reset() ; f2 = CvrStgFile::readFile (std::string(DATADIR) + "os21x24_std.bmp") ; bs2 = new BitString (std::string ("this BitString will be embedded too")) ; s2 = new Selector (bs2->getLength() * f2->getSamplesPerVertex(), std::string ("another passphrase")) ; g2 = new Graph (f2, *bs2, *s2) ; gl2 = Globs ; } void BmpFileTest::cleanup () { UnitTest::cleanup() ; delete g1 ; delete g2 ; delete s1 ; delete s2 ; delete bs1 ; delete bs2 ; delete f1 ; delete f2 ; } void BmpFileTest::testSVALCalculation () { Globs = gl1 ; addTestResult (genericTestSVALCalculation (f1, g1)) ; Globs = gl2 ; addTestResult (genericTestSVALCalculation (f2, g2)) ; } steghide-0.5.1/tests/UnitTest.cc0000644000076400001440000000355407735577231012251 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "SteghideError.h" #include "TestCategory.h" #include "UnitTest.h" #include "TestSuite.h" UnitTest::~UnitTest() { for (std::vector::const_iterator it = TestCategories.begin() ; it != TestCategories.end() ; it++) { delete *it ; } } void UnitTest::setup () { GlobsBackup = Globs ; } void UnitTest::run() { getSuite()->startUnit (getName()) ; for (std::vector::const_iterator it = TestCategories.begin() ; it != TestCategories.end() ; it++) { getSuite()->startCategory ((*it)->getName()) ; try { (*it)->run() ; } catch (SteghideError& e) { getSuite()->addTestResult (TestSuite::KNOWNEXCEPTION) ; e.printMessage() ; } catch (...) { getSuite()->addTestResult (TestSuite::UNKNOWNEXCEPTION) ; } getSuite()->endCategory ((*it)->getName()) ; } getSuite()->endUnit (getName()) ; } void UnitTest::cleanup () { Globs = GlobsBackup ; } void UnitTest::addTestCategory (TestCategory* tc) { TestCategories.push_back (tc) ; } void UnitTest::addTestResult (bool r) { getSuite()->addTestResult (r) ; } steghide-0.5.1/tests/BmpRGBSampleValueTest.h0000644000076400001440000000256707735577231014407 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BMPRGBSAMPLEVALUETEST_H #define SH_BMPRGBSAMPLEVALUETEST_H #include "SampleValueTest.h" class CvrStgFile ; class BmpRGBSampleValueTest : public SampleValueTest { public: BmpRGBSampleValueTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testDistance (void) ; void testIsNeighbour (void) ; private: CvrStgFile *f_win, *f_os2 ; SampleValue *sv_0_0_0, *sv_1_1_1, *sv_0_3_4, *sv_10_10_10, *sv_12_13_14, *sv_128_128_128, *sv_210_0_120, *sv_255_255_255 ; Globals gl_win, gl_os2 ; } ; #endif // ndef SH_BMPRGBSAMPLEVALUETEST_H steghide-0.5.1/tests/WavFileTest.cc0000644000076400001440000000733607735577231012671 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "Graph.h" #include "WavPCMSampleValue.h" #include "WavFileTest.h" #include "utcommon.h" WavFileTest::WavFileTest (TestSuite* s) : CvrStgFileTest("WavFile", s) { ADDTESTCATEGORY (WavFileTest, testReadWrite) ; ADDTESTCATEGORY (WavFileTest, testReadEmbedExtract) ; ADDTESTCATEGORY (WavFileTest, testReadEmbedWriteReadExtract) ; ADDTESTCATEGORY (WavFileTest, testPosition) ; ADDTESTCATEGORY (WavFileTest, testSVALCalculation) ; ADDTESTCATEGORY (WavFileTest, testEmbeddedValue) ; } void WavFileTest::setup () { UnitTest::setup() ; Globs.reset() ; f1 = CvrStgFile::readFile (std::string(DATADIR) + "pcm8_std.wav") ; bs1 = new BitString (std::string ("this is a test string for the WavFile")) ; s1 = new Selector (bs1->getLength() * f1->getSamplesPerVertex(), std::string ("a passphrase")) ; g1 = new Graph (f1, *bs1, *s1) ; gl1 = Globs ; Globs.reset() ; f2 = CvrStgFile::readFile (std::string(DATADIR) + "pcm16_std.wav") ; bs2 = new BitString (std::string ("this is another test - this time a little longer, but also for the WavFile unit test")) ; s2 = new Selector (bs2->getLength() * f2->getSamplesPerVertex(), std::string ("another passphrase")) ; g2 = new Graph (f2, *bs2, *s2) ; gl2 = Globs ; } void WavFileTest::cleanup () { UnitTest::cleanup() ; delete g1 ; delete g2 ; delete s1 ; delete s2 ; delete bs1 ; delete bs2 ; delete f1 ; delete f2 ; } void WavFileTest::testReadWrite() { Globs = gl1 ; addTestResult (genericTestReadWrite (std::string(DATADIR) + "pcm8_std.wav")) ; Globs = gl2 ; addTestResult (genericTestReadWrite (std::string(DATADIR) + "pcm16_std.wav")) ; } void WavFileTest::testReadEmbedExtract() { Globs = gl1 ; addTestResult (genericTestReadEmbedExtract (std::string(DATADIR) + "pcm8_std.wav", *bs1)) ; Globs = gl2 ; addTestResult (genericTestReadEmbedExtract (std::string(DATADIR) + "pcm16_std.wav", *bs2)) ; } void WavFileTest::testReadEmbedWriteReadExtract() { Globs = gl1 ; addTestResult (genericTestReadEmbedWriteReadExtract (std::string(DATADIR) + "pcm8_std.wav", *bs2)) ; Globs = gl2 ; addTestResult (genericTestReadEmbedWriteReadExtract (std::string(DATADIR) + "pcm16_std.wav", *bs1)) ; } void WavFileTest::testPosition() { Globs = gl1 ; addTestResult (genericTestPosition (f1, 0, new WavPCMSampleValue (122))) ; addTestResult (genericTestPosition (f1, 22, new WavPCMSampleValue (127))) ; Globs = gl2 ; addTestResult (genericTestPosition (f2, 0, new WavPCMSampleValue (-425))) ; addTestResult (genericTestPosition (f2, 15, new WavPCMSampleValue (136))) ; } void WavFileTest::testReadExtractCompare () { // TODO } void WavFileTest::testSVALCalculation () { Globs = gl1 ; addTestResult (genericTestSVALCalculation (f1, g1)) ; Globs = gl2 ; addTestResult (genericTestSVALCalculation (f2, g2)) ; } void WavFileTest::testEmbeddedValue () { Globs = gl1 ; addTestResult (genericTestEmbeddedValue (f1)) ; Globs = gl2 ; addTestResult (genericTestEmbeddedValue (f2)) ; } steghide-0.5.1/tests/DFSAPHeuristicTest.h0000644000076400001440000000277307735577231013713 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_DFSAPHEURISTICTEST_H #define SH_DFSAPHEURISTICTEST_H class DFSAPHeuristic ; class BitString ; class CvrStgFile ; class Matching ; class Selector ; #include "UnitTest.h" #include "TestSuite.h" class DFSAPHeuristicTest : public UnitTest { public: DFSAPHeuristicTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testAlgorithm (void) ; private: BitString *bs1, *bs2, *bs3, *bs4, *bs5 ; CvrStgFile *f1, *f2, *f3, *f4, *f5 ; Selector *s1, *s2, *s3, *s4, *s5 ; Graph *g1, *g2, *g3, *g4, *g5 ; Matching *m1, *m2, *m3, *m4, *m5 ; DFSAPHeuristic *aph1, *aph2, *aph3, *aph4, *aph5 ; Globals gl1, gl2, gl3, gl4, gl5 ; } ; #endif // ndef SH_DFSAPHEURISTICTEST_H steghide-0.5.1/tests/TestSuite.cc0000644000076400001440000000651107735577231012417 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "TestSuite.h" TestSuite::TestSuite() : Test() { runningUnit = "__none__" ; runningCategory = "__none__" ; TestNumber = 0 ; OutStream = &std::cout ; } void TestSuite::addUnitTest (UnitTest* ut) { UnitTests.push_back (ut) ; } void TestSuite::run() { SuiteOk = true ; *OutStream << "-----------------------" << std::endl << std::endl ; *OutStream << "Running Unit Tests....." << std::endl << std::endl ; *OutStream << "-----------------------" << std::endl << std::endl ; for (std::vector::iterator it = UnitTests.begin() ; it != UnitTests.end() ; it++) { (*it)->setup() ; (*it)->run() ; (*it)->cleanup() ; } } void TestSuite::startUnit (std::string n) { if (runningUnit == "__none__") { *OutStream << n << ":" << std::endl ; runningUnit = n ; } else { *OutStream << "UNEXPECTED ERROR in " << __FILE__ << ":" << __LINE__ << std::endl ; } } void TestSuite::endUnit (std::string n) { if (runningUnit == n) { *OutStream << std::endl ; runningUnit = "__none__" ; } else { *OutStream << "UNEXPECTED ERROR in " << __FILE__ << ":" << __LINE__ << std::endl ; } } void TestSuite::startCategory (std::string n) { if (runningCategory == "__none__") { *OutStream << " " << n ; runningCategory = n ; runningCategoryOk = true ; OutStream->flush() ; } else { *OutStream << "UNEXPECTED ERROR in " << __FILE__ << ":" << __LINE__ << std::endl ; } } void TestSuite::endCategory (std::string n) { if (runningCategory == n) { if (runningCategoryOk) { *OutStream << "ok" << std::endl ; } else { *OutStream << " !! FAILED !!" << std::endl ; } runningCategory = "__none__" ; } else { *OutStream << "UNEXPECTED ERROR in " << __FILE__ << ":" << __LINE__ << std::endl ; } } void TestSuite::addTestResult (bool r) { if (runningUnit == "__none__" || runningCategory == "__none__") { *OutStream << "UNEXPECTED ERROR in " << __FILE__ << ":" << __LINE__ << std::endl ; } else { if (r) { *OutStream << "." ; } else { *OutStream << "F" ; SuiteOk = false ; } runningCategoryOk &= r ; OutStream->flush() ; } } void TestSuite::addTestResult (TestSuite::TESTRESULT r) { switch (r) { case NOTINSTALLED: *OutStream << "not installed" << std::endl ; runningCategory = "__none__" ; break ; case KNOWNEXCEPTION: *OutStream << "caught known exception:" << std::endl ; runningCategory = "__none__" ; break ; case UNKNOWNEXCEPTION: *OutStream << "caugh unknown exception (!!)" << std::endl ; runningCategory = "__none__" ; break ; } } steghide-0.5.1/tests/DFSAPHeuristicTest.cc0000644000076400001440000001453207735577231014045 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #define private public #define protected public #include "DFSAPHeuristic.h" #undef private #undef protected #include "BitString.h" #include "Edge.h" #include "Graph.h" #include "Matching.h" #include "Selector.h" #include "DummyFile.h" #include "DFSAPHeuristicTest.h" #define CREATEEDGE(G,V1,V2) (new Edge ((G)->getVertex(V1), 0, (G)->getVertex(V2), 1)) DFSAPHeuristicTest::DFSAPHeuristicTest (TestSuite* s) : UnitTest ("DFSAPHeuristic", s) { ADDTESTCATEGORY (DFSAPHeuristicTest, testAlgorithm) ; } void DFSAPHeuristicTest::setup () { UnitTest::setup() ; // a trivial case to start with { Globs.reset() ; std::vector > adjlist (2) ; adjlist[0].push_back(1) ; DummyFile::createGraph (adjlist, &bs1, &f1, &s1) ; g1 = new Graph (f1, *bs1, *s1) ; m1 = new Matching (g1) ; aph1 = new DFSAPHeuristic (g1, m1, 100.0) ; gl1 = Globs ; } { Globs.reset() ; std::vector > adjlist (4) ; adjlist[0].push_back(1) ; adjlist[1].push_back(2) ; adjlist[2].push_back(3) ; DummyFile::createGraph (adjlist, &bs2, &f2, &s2) ; g2 = new Graph (f2, *bs2, *s2) ; m2 = new Matching (g2) ; m2->addEdge (CREATEEDGE (g2, 1, 2)) ; aph2 = new DFSAPHeuristic (g2, m2, 100.0) ; gl2 = Globs ; } // this is the example from Moehring's and Mueller-Hannemann's paper (Figure 2) { Globs.reset() ; std::vector > adjlist (8) ; adjlist[0].push_back(1) ; adjlist[1].push_back(2) ; adjlist[2].push_back(3) ; adjlist[2].push_back(6) ; adjlist[3].push_back(4) ; adjlist[4].push_back(5) ; adjlist[5].push_back(6) ; adjlist[5].push_back(7) ; DummyFile::createGraph (adjlist, &bs3, &f3, &s3) ; g3 = new Graph (f3, *bs3, *s3) ; m3 = new Matching (g3) ; m3->addEdge (CREATEEDGE (g3, 1, 2)) ; m3->addEdge (CREATEEDGE (g3, 3, 4)) ; m3->addEdge (CREATEEDGE (g3, 5, 6)) ; aph3 = new DFSAPHeuristic (g3, m3, 100.0) ; gl3 = Globs ; } // this is the counterexample from Moehring's and Mueller-Hannemann's paper (Figure 3) { Globs.reset() ; std::vector > adjlist (8) ; adjlist[0].push_back(1) ; adjlist[0].push_back(6) ; adjlist[1].push_back(2) ; adjlist[1].push_back(7) ; adjlist[2].push_back(3) ; adjlist[2].push_back(6) ; adjlist[3].push_back(4) ; adjlist[4].push_back(5) ; adjlist[5].push_back(6) ; DummyFile::createGraph (adjlist, &bs4, &f4, &s4) ; g4 = new Graph (f4, *bs4, *s4) ; m4 = new Matching (g4) ; m4->addEdge (CREATEEDGE (g4, 1, 2)) ; m4->addEdge (CREATEEDGE (g4, 3, 4)) ; m4->addEdge (CREATEEDGE (g4, 5, 6)) ; aph4 = new DFSAPHeuristic (g4, m4, 100.0) ; gl4 = Globs ; } // another counterexample where the existing augmenting path will not be found no matter which start vertex is chosen { Globs.reset() ; std::vector > adjlist (14) ; adjlist[0].push_back(2) ; adjlist[0].push_back(4) ; adjlist[1].push_back(3) ; adjlist[1].push_back(5) ; adjlist[2].push_back(3) ; adjlist[2].push_back(12) ; adjlist[3].push_back(13) ; adjlist[4].push_back(6) ; adjlist[4].push_back(12) ; adjlist[5].push_back(7) ; adjlist[5].push_back(13) ; adjlist[6].push_back(8) ; adjlist[7].push_back(9) ; adjlist[8].push_back(10) ; adjlist[9].push_back(11) ; adjlist[10].push_back(12) ; adjlist[11].push_back(13) ; DummyFile::createGraph (adjlist, &bs5, &f5, &s5) ; g5 = new Graph (f5, *bs5, *s5) ; m5 = new Matching (g5) ; m5->addEdge (CREATEEDGE (g5, 2, 12)) ; m5->addEdge (CREATEEDGE (g5, 3, 13)) ; m5->addEdge (CREATEEDGE (g5, 4, 6)) ; m5->addEdge (CREATEEDGE (g5, 5, 7)) ; m5->addEdge (CREATEEDGE (g5, 8, 10)) ; m5->addEdge (CREATEEDGE (g5, 9, 11)) ; aph5 = new DFSAPHeuristic (g5, m5, 100.0) ; gl5 = Globs ; } } void DFSAPHeuristicTest::cleanup () { UnitTest::cleanup() ; delete aph1 ; delete m1 ; delete g1 ; delete s1 ; delete bs1 ; delete f1 ; delete aph2 ; delete m2 ; delete g2 ; delete s2 ; delete bs2 ; delete f2 ; delete aph3 ; delete m3 ; delete g3 ; delete s3 ; delete bs3 ; delete f3 ; delete aph4 ; delete m4 ; delete g4 ; delete s4 ; delete bs4 ; delete f4 ; delete aph5 ; delete m5 ; delete g5 ; delete s5 ; delete bs5 ; delete f5 ; } void DFSAPHeuristicTest::testAlgorithm () { { Globs = gl1 ; aph1->run() ; addTestResult ( m1->isMatched((VertexLabel) 0) && m1->isMatched((VertexLabel) 1)) ; } { Globs = gl2 ; Edge* e01 = CREATEEDGE (g2, 0, 1) ; Edge* e23 = CREATEEDGE (g2, 2, 3) ; aph2->run() ; addTestResult ( m2->getCardinality() == 2 && m2->includesEdge(e01) && m2->includesEdge(e23)) ; } { Globs = gl3 ; Edge* e01 = CREATEEDGE (g3, 0, 1) ; Edge* e26 = CREATEEDGE (g3, 2, 6) ; Edge* e34 = CREATEEDGE (g3, 3, 4) ; Edge* e57 = CREATEEDGE (g3, 5, 7) ; aph3->run() ; addTestResult ( m3->getCardinality() == 4 && m3->includesEdge(e01) && m3->includesEdge(e26) && m3->includesEdge(e34) && m3->includesEdge(e57)) ; } { Globs = gl4 ; const Edge** path = new const Edge*[g4->getNumVertices()] ; unsigned long len = aph4->searchAugmentingPath (g4->getVertex(0), path) ; addTestResult (len == 0) ; delete[] path ; } { Globs = gl5 ; Edge* e2_12 = CREATEEDGE (g5, 2, 12) ; Edge* e3_13 = CREATEEDGE (g5, 3, 13) ; Edge* e4_6 = CREATEEDGE (g5, 4, 6) ; Edge* e5_7 = CREATEEDGE (g5, 5, 7) ; Edge* e8_10 = CREATEEDGE (g5, 8, 10) ; Edge* e9_11 = CREATEEDGE (g5, 9, 11) ; aph5->run() ; addTestResult ( m5->getCardinality() == 6 && m5->includesEdge(e2_12) && m5->includesEdge(e3_13) && m5->includesEdge(e4_6) && m5->includesEdge(e5_7) && m5->includesEdge(e8_10) && m5->includesEdge(e9_11)) ; } } steghide-0.5.1/tests/BFSAPHeuristicTest.cc0000644000076400001440000001007507735577231014041 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #define private public #define protected public #include "BFSAPHeuristic.h" #undef private #undef protected #include "BitString.h" #include "Edge.h" #include "Graph.h" #include "Matching.h" #include "Selector.h" #include "DummyFile.h" #include "BFSAPHeuristicTest.h" #define CREATEEDGE(G,V1,V2) (new Edge ((G)->getVertex(V1), 0, (G)->getVertex(V2), 1)) BFSAPHeuristicTest::BFSAPHeuristicTest (TestSuite* s) : UnitTest ("BFSAPHeuristic", s) { ADDTESTCATEGORY (BFSAPHeuristicTest, testAlgorithm) ; } void BFSAPHeuristicTest::setup () { UnitTest::setup() ; // a trivial case to start with { Globs.reset() ; std::vector > adjlist (2) ; adjlist[0].push_back(1) ; DummyFile::createGraph (adjlist, &bs1, &f1, &s1) ; g1 = new Graph (f1, *bs1, *s1) ; m1 = new Matching (g1) ; aph1 = new BFSAPHeuristic (g1, m1) ; gl1 = Globs ; } { Globs.reset() ; std::vector > adjlist (4) ; adjlist[0].push_back(1) ; adjlist[1].push_back(2) ; adjlist[2].push_back(3) ; DummyFile::createGraph (adjlist, &bs2, &f2, &s2) ; g2 = new Graph (f2, *bs2, *s2) ; m2 = new Matching (g2) ; m2->addEdge (CREATEEDGE (g2, 1, 2)) ; aph2 = new BFSAPHeuristic (g2, m2) ; gl2 = Globs ; } // example: aph should be found in graph with blossom (walk through blossom in good direction) { Globs.reset() ; std::vector > adjlist (4) ; adjlist[0].push_back(1) ; adjlist[0].push_back(2) ; adjlist[1].push_back(2) ; adjlist[2].push_back(3) ; DummyFile::createGraph (adjlist, &bs3, &f3, &s3) ; g3 = new Graph (f3, *bs3, *s3) ; m3 = new Matching (g3) ; m3->addEdge (CREATEEDGE (g3, 1, 2)) ; aph3 = new BFSAPHeuristic (g3, m3) ; gl3 = Globs ; } // counterexample: walk through blossom in bad direction { Globs.reset() ; std::vector > adjlist (4) ; adjlist[0].push_back(1) ; adjlist[0].push_back(2) ; adjlist[1].push_back(2) ; adjlist[1].push_back(3) ; DummyFile::createGraph (adjlist, &bs4, &f4, &s4) ; g4 = new Graph (f4, *bs4, *s4) ; m4 = new Matching (g4) ; m4->addEdge (CREATEEDGE (g4, 1, 2)) ; aph4 = new BFSAPHeuristic (g4, m4) ; gl4 = Globs ; } } void BFSAPHeuristicTest::cleanup () { UnitTest::cleanup() ; delete aph1 ; delete m1 ; delete g1 ; delete s1 ; delete bs1 ; delete f1 ; delete aph2 ; delete m2 ; delete g2 ; delete s2 ; delete bs2 ; delete f2 ; delete aph3 ; delete m3 ; delete g3 ; delete s3 ; delete bs3 ; delete f3 ; delete aph4 ; delete m4 ; delete g4 ; delete s4 ; delete bs4 ; delete f4 ; } void BFSAPHeuristicTest::testAlgorithm () { { Globs = gl1 ; aph1->run() ; addTestResult ( m1->isMatched((VertexLabel) 0) && m1->isMatched((VertexLabel) 1)) ; } { Globs = gl2 ; Edge* e01 = CREATEEDGE (g2, 0, 1) ; Edge* e23 = CREATEEDGE (g2, 2, 3) ; aph2->run() ; addTestResult ( m2->getCardinality() == 2 && m2->includesEdge(e01) && m2->includesEdge(e23)) ; } { Globs = gl3 ; Edge* e01 = CREATEEDGE (g3, 0, 1) ; Edge* e23 = CREATEEDGE (g3, 2, 3) ; aph3->run() ; addTestResult ( m3->getCardinality() == 2 && m3->includesEdge(e01) && m3->includesEdge(e23)) ; } { Globs = gl4 ; Edge* e12 = CREATEEDGE (g4, 1, 2) ; aph4->run() ; addTestResult ( m4->getCardinality() == 1 && m4->includesEdge(e12)) ; } } steghide-0.5.1/tests/AUtilsTest.cc0000644000076400001440000000267207737767717012547 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include "AUtilsTest.h" #include "TestCategoryCaller.h" AUtilsTest::AUtilsTest (TestSuite* s) : UnitTest ("AUtils", s) { ADDTESTCATEGORY (AUtilsTest, testLog2) ; } void AUtilsTest::testLog2 () { addTestResult (genericTestLog2 (2, 1.0)) ; addTestResult (genericTestLog2 (8, 3.0)) ; addTestResult (genericTestLog2 (5, 2.321928)) ; addTestResult (genericTestLog2 (21, 4.392317)) ; } bool AUtilsTest::genericTestLog2 (int n, double res) { // to avoid failing because of numeric problems double tmp = log2 (n) ; double lb = res - 0.000001 ; double ub = res + 0.000001 ; return (lb < tmp && tmp < ub) ; } steghide-0.5.1/tests/SelectorTest.cc0000644000076400001440000000511007735577231013100 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include "Selector.h" #include "SelectorTest.h" #include "TestCategoryCaller.h" SelectorTest::SelectorTest (TestSuite* s) : UnitTest ("Selector", s) { ADDTESTCATEGORY (SelectorTest, testIsPermutation) ; ADDTESTCATEGORY (SelectorTest, testIsIdentityPermutation) ; } void SelectorTest::setup () { s1 = new Selector (10, "a passphrase") ; s2 = new Selector (50, "another passphrase") ; s3 = new Selector (10000, "a large Selector object") ; s4 = new Selector (128, "a smaller object again") ; sid1 = new Selector (16) ; sid2 = new Selector (1234) ; } void SelectorTest::cleanup () { delete s1 ; delete s2 ; delete s3 ; delete s4 ; delete sid1 ; delete sid2 ; } void SelectorTest::testIsPermutation () { addTestResult (genericTestIsPermutation (s1)) ; addTestResult (genericTestIsPermutation (s2)) ; addTestResult (genericTestIsPermutation (s3)) ; addTestResult (genericTestIsPermutation (s4)) ; } void SelectorTest::testIsIdentityPermutation () { addTestResult (genericTestIsIdentityPermutation (sid1)) ; addTestResult (genericTestIsIdentityPermutation (sid2)) ; } bool SelectorTest::genericTestIsPermutation (Selector* s) { std::vector hasoccured (s->getRange()) ; // all set to false bool range_ok = true ; bool inj = true ; for (UWORD32 i = 0 ; i < s->getRange() ; i++) { UWORD32 value = (*s)[i] ; range_ok = (value < s->getRange()) && range_ok ; inj = !hasoccured[value] && inj ; hasoccured[value] = true ; } bool surj = true ; for (UWORD32 i = 0 ; i < s->getRange() ; i++) { surj = hasoccured[i] && surj ; } return range_ok && inj && surj ; } bool SelectorTest::genericTestIsIdentityPermutation (Selector* s) { bool ok = true ; for (UWORD32 i = 0 ; i < s->getRange() ; i++) { ok = ((*s)[i] == i) && ok ; } return ok ; } steghide-0.5.1/tests/WavFileTest.h0000644000076400001440000000267107735577231012530 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_WAVFILETEST_H #define SH_WAVFILETEST_H #include "CvrStgFileTest.h" #include "Selector.h" class WavFileTest : public CvrStgFileTest { public: WavFileTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testReadWrite (void) ; void testReadEmbedExtract (void) ; void testReadEmbedWriteReadExtract (void) ; void testPosition (void) ; void testReadExtractCompare (void) ; void testSVALCalculation (void) ; void testEmbeddedValue (void) ; private: BitString *bs1, *bs2 ; CvrStgFile *f1, *f2 ; Graph *g1, *g2 ; Selector *s1, *s2 ; Globals gl1, gl2 ; } ; #endif // ndef SH_BMPWINFILETEST_H steghide-0.5.1/tests/AUtilsTest.h0000644000076400001440000000216307735577231012370 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_AUTILSTEST_H #define SH_AUTILSTEST_H #include "AUtils.h" #include "UnitTest.h" #include "TestSuite.h" class AUtilsTest : public UnitTest { public: AUtilsTest (TestSuite* s) ; void testLog2 (void) ; private: bool genericTestLog2 (int n, double res) ; } ; #endif // ndef SH_AUTILSTEST_H steghide-0.5.1/tests/CvrStgFileTest.h0000644000076400001440000000470707735577231013205 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_CVRSTGFILETEST_H #define SH_CVRSTGFILETEST_H #include "BitString.h" #include "CvrStgFile.h" #include "UnitTest.h" #include "TestSuite.h" class CvrStgFileTest : public UnitTest { public: CvrStgFileTest (std::string n, TestSuite* s) : UnitTest(n,s) {} ; protected: /** * read the file rfn and write it again, return true iff write op created what was read by read op * \param rfn the file name of the file to read * \param new_wfn wether to write the data to another file or to rfn (a backup copy is done) **/ bool genericTestReadWrite (const std::string& rfn, bool new_wfn = true) const ; bool genericTestReadEmbedExtract (const std::string& fn, BitString& emb) const ; /** * read fn and extract the first emb.getLength() bits, return true iff these equal emb **/ bool genericTestReadExtractCompare (const std::string& fn, BitString& emb) const ; bool genericTestReadEmbedWriteReadExtract (const std::string& cvrfn, BitString& emb) const ; bool genericTestPosition (const CvrStgFile* f, const SamplePos pos, SampleValue* sv_r) const ; bool genericTestSVALCalculation (const CvrStgFile* f, const Graph* g) const ; /** * for all sample positions, test if f->getEmbeddedValue(p) and f->getSampleValue(p)->getEmbeddedValue() return the same result **/ bool genericTestEmbeddedValue (const CvrStgFile* f) const ; private: bool areEqual (const std::string& fn1, const std::string& fn2) const ; void removeFile (const std::string& fn) const ; void copyFile (const std::string& src, const std::string& dest) const ; void moveFile (const std::string& src, const std::string& dest) const ; } ; #endif // ndef SH_CVRSTGFILETEST_H steghide-0.5.1/tests/AudioSampleValueTest.cc0000644000076400001440000000577607735577231014542 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "AudioSampleValue.h" #include "AuSampleValues.h" #include "CvrStgFile.h" #include "AudioSampleValueTest.h" #include "utcommon.h" AudioSampleValueTest::AudioSampleValueTest (TestSuite* s) : SampleValueTest ("AudioSampleValue", s) { ADDTESTCATEGORY (AudioSampleValueTest, testDistance) ; ADDTESTCATEGORY (AudioSampleValueTest, testIsNeighbour) ; } void AudioSampleValueTest::setup () { UnitTest::setup() ; Globs.reset() ; f_AuMuLaw = CvrStgFile::readFile (std::string(DATADIR) + "mulaw_std.au") ; sv_AuMuLaw_0 = new AuMuLawSampleValue (0) ; sv_AuMuLaw_1 = new AuMuLawSampleValue (1) ; sv_AuMuLaw_45 = new AuMuLawSampleValue (45) ; gl_AuMuLaw = Globs ; Globs.reset() ; f_AuPCM16 = CvrStgFile::readFile (std::string(DATADIR) + "pcm16_std.au") ; sv_AuPCM16_m32768 = new AuPCM16SampleValue (-32768) ; sv_AuPCM16_32767 = new AuPCM16SampleValue (32767) ; sv_AuPCM16_0 = new AuPCM16SampleValue (0) ; sv_AuPCM16_15 = new AuPCM16SampleValue (15) ; gl_AuPCM16 = Globs ; } void AudioSampleValueTest::cleanup () { UnitTest::cleanup() ; delete f_AuMuLaw ; delete f_AuPCM16 ; delete sv_AuMuLaw_0 ; delete sv_AuMuLaw_1 ; delete sv_AuMuLaw_45 ; delete sv_AuPCM16_m32768 ; delete sv_AuPCM16_32767 ; delete sv_AuPCM16_0 ; delete sv_AuPCM16_15 ; } void AudioSampleValueTest::testDistance () { Globs = gl_AuMuLaw ; addTestResult (genericTestDistance (sv_AuMuLaw_0, sv_AuMuLaw_1, 1)) ; addTestResult (genericTestDistance (sv_AuMuLaw_1, sv_AuMuLaw_45, 44)) ; Globs = gl_AuPCM16 ; addTestResult (genericTestDistance (sv_AuPCM16_0, sv_AuPCM16_15, 15)) ; addTestResult (genericTestDistance (sv_AuPCM16_15, sv_AuPCM16_32767, 32752)) ; addTestResult (genericTestDistance (sv_AuPCM16_m32768, sv_AuPCM16_32767, 65535)) ; } void AudioSampleValueTest::testIsNeighbour () { Globs = gl_AuMuLaw ; addTestResult (genericTestIsNeighbour (sv_AuMuLaw_0, sv_AuMuLaw_1, true)) ; addTestResult (genericTestIsNeighbour (sv_AuMuLaw_0, sv_AuMuLaw_45, false)) ; Globs = gl_AuPCM16 ; addTestResult (genericTestIsNeighbour (sv_AuPCM16_0, sv_AuPCM16_15, true)) ; addTestResult (genericTestIsNeighbour (sv_AuPCM16_m32768, sv_AuPCM16_0, false)) ; addTestResult (genericTestIsNeighbour (sv_AuPCM16_m32768, sv_AuPCM16_32767, false)) ; } steghide-0.5.1/tests/JpegSampleValueTest.h0000644000076400001440000000243307735577231014213 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_JPEGSAMPLEVALUETEST_H #define SH_JPEGSAMPLEVALUETEST_H #include "SampleValueTest.h" class JpegSampleValue ; class CvrStgFile ; class JpegSampleValueTest : public SampleValueTest { public: JpegSampleValueTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testDistance (void) ; void testIsNeighbour (void) ; private: CvrStgFile *f1 ; JpegSampleValue *sv_m1, *sv_0, *sv_1 ; Globals gl1 ; } ; #endif // ndef SH_JPEGSAMPLEVALUETEST_H steghide-0.5.1/tests/BmpWinFileTest.h0000644000076400001440000000275107735577231013166 /* * steghide 0.5.1 - a steganography program * Copyright (C) 1999-2003 Stefan Hetzl * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SH_BMPWINFILETEST_H #define SH_BMPWINFILETEST_H #define private public #define protected public #include "BmpFile.h" #undef private #undef protected #include "CvrStgFileTest.h" class BmpWinFileTest : public CvrStgFileTest { public: BmpWinFileTest (TestSuite* s) ; void setup (void) ; void cleanup (void) ; void testReadWrite (void) ; void testReadEmbedExtract (void) ; void testReadEmbedWriteReadExtract (void) ; void testPosition (void) ; void testReadExtractCompare (void) ; void testEmbeddedValue (void) ; private: BitString *bs1, *bs2, *bs3, *bs4 ; CvrStgFile *f1, *f2, *f3, *f4 ; Globals gl1, gl2, gl3, gl4 ; } ; #endif // ndef SH_BMPWINFILETEST_H steghide-0.5.1/README0000644000076400001440000001427307735577200007675 Introduction : ============== Steghide is a steganography program that is able to hide data in various kinds of image- and audio-files. The color- respectivly sample-frequencies are not changed thus making the embedding resistant against first-order statistical tests. The current version of steghide is 0.5.1 Features: *) compression of embedded data *) encryption of embedded data *) embedding of a checksum to verify the integrity of the extraced data *) support for JPEG, BMP, WAV and AU files Steganography : =============== Steganography literally means covered writing. Its goal is to hide the fact that communication is taking place. This is often achieved by using a (rather large) cover file and embedding the (rather short) secret message into this file. The result is a innocuous looking file (the stego file) that contains the secret message. Compilation and Installation : ============================== Dependencies : -------------- You should have the following libraries installed to use steghide. * libmhash A library that provides various hash algorithms and cryptographic key generation algorithms. Steghide needs this library to convert a passphrase into a form that can be used as input for cryptographic and steganographic algorithms. Available at: http://mhash.sourceforge.net/ * libmcrypt A library that provides a lot of symmetric encryption algorithms. If you compile steghide without libmcrypt you will not be able to use steghide to encrypt data before embedding nor to extract encrypted data (even if you know the correct passphrase). Available at: http://mcrypt.sourceforge.net/ * libjpeg A library implementing jpeg image compression. Without this library you will not be able to embed data in jpeg files nor to extract data from jpeg files. Available at: http://www.ijg.org/ * zlib A lossless data compression library. If you compile steghide without having this library installed you will not be able to use steghide to compress data before embedding nor to extract compressed data from a stego-file. Available at: http://www.gzip.org/zlib/ Libmhash is absolutely required to compile steghide. While you can compile it without the other libraries they are highly recommended as major functionality will not be available without them. Linux / Unix : -------------- After unpacking the source distribution, enter the following commands: 1) ./configure 2) make 3) make check 4) make install (as root) For more information see the generic installation instructions in the file INSTALL that came with the distribution. If any of these commands fails, please send a mail to the steghide development mailing list (steghide-devel@lists.sourceforge.net) describing the error. Windows : --------- The easiest way is to download the precompiled binary (including Windows versions of the necessary libraries) from the steghide website at: http://steghide.sourceforge.net/index.php If you want to compile the sources yourself you need a C++ compiler. How you need to compile the source code depends on the compiler you are using: Please consult your compiler's documentation. Steghide can be compiled with gcc in the cygwin environment (http://www.cygwin.com/) which is a unix emulation layer for Windows using the procedure mentioned above for the Linux/Unix compilation. Quick-Start : ============= Here are some examples of how steghide can be used. Take a look at these to get a first impression. If you want more detailed information please read the manpage. The basic usage is as follows: $ steghide embed -cf picture.jpg -ef secret.txt Enter passphrase: Re-Enter passphrase: embedding "secret.txt" in "picture.jpg"... done This command will embed the file secret.txt in the cover file picture.jpg. After you have embedded your secret data as shown above you can send the file picture.jpg to the person who should receive the secret message. The receiver has to use steghide in the following way: $ steghide extract -sf picture.jpg Enter passphrase: wrote extracted data to "secret.txt". If the supplied passphrase is correct, the contents of the original file secret.txt will be extracted from the stego file picture.jpg and saved in the current directory. If you have received a file that contains embedded data and you want to get some information about it before extracting it, use the info command: $ steghide info received_file.wav "received_file.wav": format: wave audio, PCM encoding capacity: 3.5 KB Try to get information about embedded data ? (y/n) y Enter passphrase: embedded file "secret.txt": size: 1.6 KB encrypted: rijndael-128, cbc compressed: yes After printing some general information about the stego file (format, capacity) you will be asked if steghide should try to get information about the embedded data. If you answer with yes you have to supply a passphrase. Steghide will then try to extract the embedded data with that passphrase and - if it succeeds - print some information about it. Contact : ========= Website : --------- You can get the latest version of steghide as well as some additional information and documentation from the steghide website at: http://steghide.sourceforge.net/ Mailing Lists : --------------- If you have found a bug or if you have questions, comments, suggestions, etc. please send a mail to the development mailing list: steghide-devel@lists.sourceforge.net To receive mails sent to this list, subscribe to it at: http://lists.sourceforge.net/lists/listinfo/steghide-devel If you want to be informed, when a new version of steghide is released please subscribe to the steghide announcement mailing list at: http://lists.sourceforge.net/lists/listinfo/steghide-announce Anonymous CVS access : ---------------------- You can access the most recent development source code via anonymous cvs. Just type the following lines: $ cvs -d:pserver:anonymous@cvs.steghide.sourceforge.net:/cvsroot/steghide login CVS password: [ Hit RETURN here ] $ cvs -z3 -d:pserver:anonymous@cvs.steghide.sourceforge.net:/cvsroot/steghide co steghide You can also browse the cvs repository on the web: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/steghide/ Author : -------- You can contact me (Stefan Hetzl) via e-mail: shetzl@chello.at steghide-0.5.1/configure0000755000076400001440000142136307743177326010733 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="src/main.cc" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE LN_S CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE RANLIB ac_ct_RANLIB CPP EGREP ALLOCA GLIBC21 LIBICONV LTLIBICONV INTLBISON USE_NLS BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT INTLOBJS DATADIRNAME INSTOBJEXT GENCAT INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB USE_INTLDIR_TRUE USE_INTLDIR_FALSE ac_cv_prog_doxygen HAVE_DOXYGEN_TRUE HAVE_DOXYGEN_FALSE ac_cv_prog_perl HAVE_PERL_TRUE HAVE_PERL_FALSE LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= 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 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -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 | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -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 ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 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 ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # 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 its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF 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] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors --disable-rpath do not hardcode runtime library paths --disable-nls do not use Native Language Support --enable-debug enable debugging --disable-randomness disable randomness making every run exactly reproducible Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-included-gettext use the GNU gettext library included here --with-libintl-prefix=DIR search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` cd $ac_dir # Check for guested configure; otherwise get Cygnus style 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 elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 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 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ _ACEOF { 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` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&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_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core core.* *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_target_alias=$target_alias test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version="1.7" # 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" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /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_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # 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=steghide VERSION=0.5.1 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"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. ac_config_headers="$ac_config_headers config.h" ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C++ compiler default output" >&5 echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C++ compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C++ compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h 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 rm -f .deps 2>/dev/null mkdir .deps 2>/dev/null if test -d .deps; then DEPDIR=.deps else # MS-DOS does not allow filenames that begin with a dot. DEPDIR=_deps fi rmdir .deps 2>/dev/null ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # 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. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_CXX_dependencies_compiler_type=$depmode break fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi # 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" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /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_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done 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. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } 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 # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f 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 depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # 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. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_CC_dependencies_compiler_type=$depmode break fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi for ac_func in strchr do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then echo "$as_me:$LINENO: result: $MSGFMT" >&5 echo "${ECHO_T}$MSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GMSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then echo "$as_me:$LINENO: result: $GMSGFMT" >&5 echo "${ECHO_T}$GMSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then echo "$as_me:$LINENO: result: $XGETTEXT" >&5 echo "${ECHO_T}$XGETTEXT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f messages.po # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSGMERGE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGMERGE" in /*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then echo "$as_me:$LINENO: result: $MSGMERGE" >&5 echo "${ECHO_T}$MSGMERGE" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$GMSGFMT" != ":"; then if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6 GMSGFMT=":" fi fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 XGETTEXT=":" fi rm -f messages.po fi ac_config_commands="$ac_config_commands default-1" 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 if test "${ac_cv_lib_cposix_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcposix $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_cposix_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cposix_strerror=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5 echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6 if test $ac_cv_lib_cposix_strerror = yes; then LIBS="$LIBS -lcposix" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; no) cat >>confdefs.h <<\_ACEOF #define inline _ACEOF ;; *) cat >>confdefs.h <<_ACEOF #define inline $ac_cv_c_inline _ACEOF ;; esac # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for off_t" >&5 echo $ECHO_N "checking for off_t... $ECHO_C" >&6 if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((off_t *) 0) return 0; if (sizeof (off_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6 if test $ac_cv_type_off_t = yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo "$as_me:$LINENO: checking for working alloca.h" >&5 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi echo "$as_me:$LINENO: checking for alloca" >&5 echo $ECHO_N "checking for alloca... $ECHO_C" >&6 if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 if test "${ac_cv_os_cray+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined(CRAY) && ! defined(CRAY2) webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 echo "${ECHO_T}$ac_cv_os_cray" >&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { exit (find_stack_direction () < 0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in stdlib.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for working mmap" >&5 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !STDC_HEADERS && !HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #if !HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ # if !HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # if HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) exit (1); for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) exit (1); if (write (fd, data, pagesize) != pagesize) exit (1); close (fd); /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) exit (1); data2 = (char *) malloc (2 * pagesize); if (!data2) exit (1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) exit (1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) exit (1); /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) exit (1); if (read (fd, data3, pagesize) != pagesize) exit (1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) exit (1); close (fd); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mmap_fixed_mapped=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MMAP 1 _ACEOF fi rm -f conftest.mmap echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6 if test "${ac_cv_gnu_library_2_1+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then ac_cv_gnu_library_2_1=yes else ac_cv_gnu_library_2_1=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6 GLIBC21="$ac_cv_gnu_library_2_1" echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5 echo $ECHO_N "checking whether integer division by zero raises SIGFPE... $ECHO_C" >&6 if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Guess based on the CPU. case "$host_cpu" in alpha* | i3456786 | m68k | s390*) gt_cv_int_divbyzero_sigfpe="guessing yes";; *) gt_cv_int_divbyzero_sigfpe="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static void #ifdef __cplusplus sigfpe_handler (int sig) #else sigfpe_handler (sig) int sig; #endif { /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ exit (sig != SIGFPE); } int x = 1; int y = 0; int z; int nan; int main () { signal (SIGFPE, sigfpe_handler); /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) signal (SIGTRAP, sigfpe_handler); #endif /* Linux/SPARC yields signal SIGILL. */ #if defined (__sparc__) && defined (__linux__) signal (SIGILL, sigfpe_handler); #endif z = x / y; nan = y / y; exit (1); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_int_divbyzero_sigfpe=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gt_cv_int_divbyzero_sigfpe=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5 echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6 case "$gt_cv_int_divbyzero_sigfpe" in *yes) value=1;; *) value=0;; esac cat >>confdefs.h <<_ACEOF #define INTDIV0_RAISES_SIGFPE $value _ACEOF echo "$as_me:$LINENO: checking for inttypes.h" >&5 echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 if test "${jm_ac_cv_header_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then jm_ac_cv_header_inttypes_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 jm_ac_cv_header_inttypes_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $jm_ac_cv_header_inttypes_h" >&5 echo "${ECHO_T}$jm_ac_cv_header_inttypes_h" >&6 if test $jm_ac_cv_header_inttypes_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H_WITH_UINTMAX 1 _ACEOF fi echo "$as_me:$LINENO: checking for stdint.h" >&5 echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 if test "${jm_ac_cv_header_stdint_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then jm_ac_cv_header_stdint_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 jm_ac_cv_header_stdint_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $jm_ac_cv_header_stdint_h" >&5 echo "${ECHO_T}$jm_ac_cv_header_stdint_h" >&6 if test $jm_ac_cv_header_stdint_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H_WITH_UINTMAX 1 _ACEOF fi echo "$as_me:$LINENO: checking for unsigned long long" >&5 echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 if test "${ac_cv_type_unsigned_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ unsigned long long ull = 1; int i = 63; int main () { unsigned long long ullmax = (unsigned long long) -1; return ull << i | ull >> i | ullmax / ull | ullmax % ull; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_unsigned_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_long_long=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 if test $ac_cv_type_unsigned_long_long = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_UNSIGNED_LONG_LONG 1 _ACEOF fi if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then test $ac_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' cat >>confdefs.h <<_ACEOF #define uintmax_t $ac_type _ACEOF fi echo "$as_me:$LINENO: checking for inttypes.h" >&5 echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 if test "${gt_cv_header_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_header_inttypes_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_header_inttypes_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5 echo "${ECHO_T}$gt_cv_header_inttypes_h" >&6 if test $gt_cv_header_inttypes_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H 1 _ACEOF fi if test $gt_cv_header_inttypes_h = yes; then echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6 if test "${gt_cv_inttypes_pri_broken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef PRId32 char *p = PRId32; #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_inttypes_pri_broken=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_inttypes_pri_broken=yes fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6 fi if test "$gt_cv_inttypes_pri_broken" = yes; then cat >>confdefs.h <<_ACEOF #define PRI_MACROS_BROKEN 1 _ACEOF fi if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by GCC" >&5 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${acl_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then echo "$as_me:$LINENO: result: $LD" >&5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${acl_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no fi fi echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 with_gnu_ld=$acl_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for shared library run path origin" >&5 echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 if test "${acl_cv_rpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 echo "${ECHO_T}$acl_cv_rpath" >&6 wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then enableval="$enable_rpath" : else enable_rpath=yes fi; use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then withval="$with_libiconv_prefix" if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi fi; LIBICONV= LTLIBICONV= INCICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */lib | */lib/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/lib"; then haveit= if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done echo "$as_me:$LINENO: checking for iconv" >&5 echo $ECHO_N "checking for iconv... $ECHO_C" >&6 if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 echo "${ECHO_T}$am_cv_func_iconv" >&6 if test "$am_cv_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF fi if test "$am_cv_lib_iconv" = yes; then echo "$as_me:$LINENO: checking how to link with libiconv" >&5 echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $LIBICONV" >&5 echo "${ECHO_T}$LIBICONV" >&6 else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then echo "$as_me:$LINENO: checking for iconv declaration" >&5 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 if test "${am_cv_proto_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_proto_iconv_arg1="" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_proto_iconv_arg1="const" fi rm -f conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 echo "${ECHO_T}${ac_t:- }$am_cv_proto_iconv" >&6 cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 if test "${am_cv_langinfo_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char* cs = nl_langinfo(CODESET); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_langinfo_codeset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_langinfo_codeset=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 if test $am_cv_langinfo_codeset = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LANGINFO_CODESET 1 _ACEOF fi if test $ac_cv_header_locale_h = yes; then echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_val_LC_MESSAGES=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_val_LC_MESSAGES=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 if test $am_cv_val_LC_MESSAGES = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LC_MESSAGES 1 _ACEOF fi fi for ac_prog in bison do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_INTLBISON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$INTLBISON"; then ac_cv_prog_INTLBISON="$INTLBISON" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_INTLBISON="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi INTLBISON=$ac_cv_prog_INTLBISON if test -n "$INTLBISON"; then echo "$as_me:$LINENO: result: $INTLBISON" >&5 echo "${ECHO_T}$INTLBISON" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$INTLBISON" && break done if test -z "$INTLBISON"; then ac_verc_fail=yes else echo "$as_me:$LINENO: checking version of bison" >&5 echo $ECHO_N "checking version of bison... $ECHO_C" >&6 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac echo "$as_me:$LINENO: result: $ac_prog_version" >&5 echo "${ECHO_T}$ac_prog_version" >&6 fi if test $ac_verc_fail = yes; then INTLBISON=: fi echo "$as_me:$LINENO: checking whether NLS is requested" >&5 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" USE_NLS=$enableval else USE_NLS=yes fi; echo "$as_me:$LINENO: result: $USE_NLS" >&5 echo "${ECHO_T}$USE_NLS" >&6 BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no LIBINTL= LTLIBINTL= POSUB= if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no echo "$as_me:$LINENO: checking whether included gettext is requested" >&5 echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" nls_cv_force_use_gnu_gettext=$withval else nls_cv_force_use_gnu_gettext=no fi; echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5 echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6 if test "${gt_cv_func_gnugettext1_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_func_gnugettext1_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_gnugettext1_libc=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5 echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix or --without-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then withval="$with_libintl_prefix" if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi fi; LIBINTL= LTLIBINTL= INCINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */lib | */lib/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/lib"; then haveit= if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6 if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (); int main () { bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_func_gnugettext1_libintl=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_gnugettext1_libintl=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (); int main () { bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" gt_cv_func_gnugettext1_libintl=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5 echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6 fi if test "$gt_cv_func_gnugettext1_libc" = "yes" \ || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ && test "$PACKAGE" != gettext; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test "$gt_use_preinstalled_gnugettext" != "yes"; then nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then INTLOBJS="\$(GETTOBJS)" BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV" LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then CATOBJEXT=.gmo fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF else USE_NLS=no fi fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then echo "$as_me:$LINENO: checking how to link with libintl" >&5 echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $LIBINTL" >&5 echo "${ECHO_T}$LIBINTL" >&6 for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi POSUB=po fi if test "$PACKAGE" = gettext; then BUILD_INCLUDED_LIBINTL=yes fi nls_cv_header_intl= nls_cv_header_libgt= DATADIRNAME=share INSTOBJEXT=.mo GENCAT=gencat INTL_LIBTOOL_SUFFIX_PREFIX= INTLLIBS="$LIBINTL" if test "$nls_cv_use_gnu_gettext" = yes; then USE_INTLDIR_TRUE= USE_INTLDIR_FALSE='#' else USE_INTLDIR_TRUE='#' USE_INTLDIR_FALSE= fi echo "$as_me:$LINENO: checking wether to enable debugging" >&5 echo $ECHO_N "checking wether to enable debugging... $ECHO_C" >&6 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" if test "$enableval" = yes ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define DEBUG 1 _ACEOF CXXFLAGS="-O2 -Wall -g" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 CXXFLAGS="-O2 -Wall" fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 CXXFLAGS="-O2 -Wall" fi; echo "$as_me:$LINENO: checking wether to disable randomness" >&5 echo $ECHO_N "checking wether to disable randomness... $ECHO_C" >&6 # Check whether --enable-randomness or --disable-randomness was given. if test "${enable_randomness+set}" = set; then enableval="$enable_randomness" if test "$enableval" = yes ; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 else echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define NORANDOM 1 _ACEOF fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_header in limits.h termios.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking for unsigned long int" >&5 echo $ECHO_N "checking for unsigned long int... $ECHO_C" >&6 if test "${ac_cv_type_unsigned_long_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((unsigned long int *) 0) return 0; if (sizeof (unsigned long int)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_unsigned_long_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_long_int=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_int" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_long_int" >&6 echo "$as_me:$LINENO: checking size of unsigned long int" >&5 echo $ECHO_N "checking size of unsigned long int... $ECHO_C" >&6 if test "${ac_cv_sizeof_unsigned_long_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_unsigned_long_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned long int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned long int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned long int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned long int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned long int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_unsigned_long_int=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned long int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (unsigned long int)); } unsigned long ulongval () { return (long) (sizeof (unsigned long int)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (unsigned long int))) < 0) { long i = longval (); if (i != ((long) (sizeof (unsigned long int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (unsigned long int)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_unsigned_long_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned long int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_unsigned_long_int=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long_int" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_LONG_INT $ac_cv_sizeof_unsigned_long_int _ACEOF echo "$as_me:$LINENO: checking for long int" >&5 echo $ECHO_N "checking for long int... $ECHO_C" >&6 if test "${ac_cv_type_long_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((long int *) 0) return 0; if (sizeof (long int)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long_int=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5 echo "${ECHO_T}$ac_cv_type_long_int" >&6 echo "$as_me:$LINENO: checking size of long int" >&5 echo $ECHO_N "checking size of long int... $ECHO_C" >&6 if test "${ac_cv_sizeof_long_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long_int=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (long int)); } unsigned long ulongval () { return (long) (sizeof (long int)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (long int))) < 0) { long i = longval (); if (i != ((long) (sizeof (long int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (long int)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_long_int=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int _ACEOF echo "$as_me:$LINENO: checking for unsigned int" >&5 echo $ECHO_N "checking for unsigned int... $ECHO_C" >&6 if test "${ac_cv_type_unsigned_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((unsigned int *) 0) return 0; if (sizeof (unsigned int)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_unsigned_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_int=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_int" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_int" >&6 echo "$as_me:$LINENO: checking size of unsigned int" >&5 echo $ECHO_N "checking size of unsigned int... $ECHO_C" >&6 if test "${ac_cv_sizeof_unsigned_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_unsigned_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_unsigned_int=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (unsigned int)); } unsigned long ulongval () { return (long) (sizeof (unsigned int)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (unsigned int))) < 0) { long i = longval (); if (i != ((long) (sizeof (unsigned int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (unsigned int)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_unsigned_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_unsigned_int=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_unsigned_int" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int _ACEOF echo "$as_me:$LINENO: checking for int" >&5 echo $ECHO_N "checking for int... $ECHO_C" >&6 if test "${ac_cv_type_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int *) 0) return 0; if (sizeof (int)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 echo "${ECHO_T}$ac_cv_type_int" >&6 echo "$as_me:$LINENO: checking size of int" >&5 echo $ECHO_N "checking size of int... $ECHO_C" >&6 if test "${ac_cv_sizeof_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (int)); } unsigned long ulongval () { return (long) (sizeof (int)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (int))) < 0) { long i = longval (); if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_int=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_int" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF echo "$as_me:$LINENO: checking for unsigned short int" >&5 echo $ECHO_N "checking for unsigned short int... $ECHO_C" >&6 if test "${ac_cv_type_unsigned_short_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((unsigned short int *) 0) return 0; if (sizeof (unsigned short int)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_unsigned_short_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_short_int=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_short_int" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_short_int" >&6 echo "$as_me:$LINENO: checking size of unsigned short int" >&5 echo $ECHO_N "checking size of unsigned short int... $ECHO_C" >&6 if test "${ac_cv_sizeof_unsigned_short_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_unsigned_short_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned short int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned short int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned short int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned short int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned short int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_unsigned_short_int=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned short int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned short int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (unsigned short int)); } unsigned long ulongval () { return (long) (sizeof (unsigned short int)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (unsigned short int))) < 0) { long i = longval (); if (i != ((long) (sizeof (unsigned short int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (unsigned short int)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_unsigned_short_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned short int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned short int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_unsigned_short_int=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_short_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_unsigned_short_int" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_SHORT_INT $ac_cv_sizeof_unsigned_short_int _ACEOF echo "$as_me:$LINENO: checking for short int" >&5 echo $ECHO_N "checking for short int... $ECHO_C" >&6 if test "${ac_cv_type_short_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((short int *) 0) return 0; if (sizeof (short int)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_short_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_short_int=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_short_int" >&5 echo "${ECHO_T}$ac_cv_type_short_int" >&6 echo "$as_me:$LINENO: checking size of short int" >&5 echo $ECHO_N "checking size of short int... $ECHO_C" >&6 if test "${ac_cv_sizeof_short_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_short_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_short_int=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (short int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (short int)); } unsigned long ulongval () { return (long) (sizeof (short int)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (short int))) < 0) { long i = longval (); if (i != ((long) (sizeof (short int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (short int)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_short_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (short int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_short_int=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int _ACEOF echo "$as_me:$LINENO: checking for unsigned char" >&5 echo $ECHO_N "checking for unsigned char... $ECHO_C" >&6 if test "${ac_cv_type_unsigned_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((unsigned char *) 0) return 0; if (sizeof (unsigned char)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_unsigned_char=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_char=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_char" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_char" >&6 echo "$as_me:$LINENO: checking size of unsigned char" >&5 echo $ECHO_N "checking size of unsigned char... $ECHO_C" >&6 if test "${ac_cv_sizeof_unsigned_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_unsigned_char" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned char))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned char))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned char))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned char))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (unsigned char))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_unsigned_char=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned char), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned char), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (unsigned char)); } unsigned long ulongval () { return (long) (sizeof (unsigned char)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (unsigned char))) < 0) { long i = longval (); if (i != ((long) (sizeof (unsigned char)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (unsigned char)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_unsigned_char=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned char), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned char), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_unsigned_char=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_char" >&5 echo "${ECHO_T}$ac_cv_sizeof_unsigned_char" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char _ACEOF echo "$as_me:$LINENO: checking for signed char" >&5 echo $ECHO_N "checking for signed char... $ECHO_C" >&6 if test "${ac_cv_type_signed_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((signed char *) 0) return 0; if (sizeof (signed char)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signed_char=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signed_char=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signed_char" >&5 echo "${ECHO_T}$ac_cv_type_signed_char" >&6 echo "$as_me:$LINENO: checking size of signed char" >&5 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6 if test "${ac_cv_sizeof_signed_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_signed_char" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (signed char))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (signed char))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (signed char))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (signed char))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (signed char))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_signed_char=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed char), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (signed char), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (signed char)); } unsigned long ulongval () { return (long) (sizeof (signed char)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (signed char))) < 0) { long i = longval (); if (i != ((long) (sizeof (signed char)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (signed char)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_signed_char=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed char), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (signed char), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_signed_char=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_signed_char" >&5 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char _ACEOF if test "$ac_cv_sizeof_unsigned_int" = 4; then cat >>confdefs.h <<\_ACEOF #define TYPE_UWORD32 unsigned int _ACEOF else if test "$ac_cv_sizeof_unsigned_long_int" = 4; then cat >>confdefs.h <<\_ACEOF #define TYPE_UWORD32 unsigned long int _ACEOF else { { echo "$as_me:$LINENO: error: There is no unsigned integer type with a size of 32 bits on your system. Cannot compile." >&5 echo "$as_me: error: There is no unsigned integer type with a size of 32 bits on your system. Cannot compile." >&2;} { (exit 1); exit 1; }; } fi fi if test "$ac_cv_sizeof_int" = 4; then cat >>confdefs.h <<\_ACEOF #define TYPE_SWORD32 int _ACEOF else if test "$ac_cv_sizeof_long_int" = 4; then cat >>confdefs.h <<\_ACEOF #define TYPE_SWORD32 long int _ACEOF else { { echo "$as_me:$LINENO: error: There is no signed integer type with a size of 32 bits on your system. Cannot compile." >&5 echo "$as_me: error: There is no signed integer type with a size of 32 bits on your system. Cannot compile." >&2;} { (exit 1); exit 1; }; } fi fi if test "$ac_cv_sizeof_unsigned_short_int" = 2; then cat >>confdefs.h <<\_ACEOF #define TYPE_UWORD16 unsigned short int _ACEOF else if test "$ac_cv_sizeof_unsigned_int" = 2; then cat >>confdefs.h <<\_ACEOF #define TYPE_UWORD16 unsigned int _ACEOF else { { echo "$as_me:$LINENO: error: There is no unsigned integer type with a size of 16 bits on your system. Cannot compile." >&5 echo "$as_me: error: There is no unsigned integer type with a size of 16 bits on your system. Cannot compile." >&2;} { (exit 1); exit 1; }; } fi fi if test "$ac_cv_sizeof_short_int" = 2; then cat >>confdefs.h <<\_ACEOF #define TYPE_SWORD16 short int _ACEOF else if test "$ac_cv_sizeof_int" = 2; then cat >>confdefs.h <<\_ACEOF #define TYPE_SWORD16 int _ACEOF else { { echo "$as_me:$LINENO: error: There is no signed integer type with a size of 16 bits on your system. Cannot compile." >&5 echo "$as_me: error: There is no signed integer type with a size of 16 bits on your system. Cannot compile." >&2;} { (exit 1); exit 1; }; } fi fi if test "$ac_cv_sizeof_unsigned_char" = 1; then cat >>confdefs.h <<\_ACEOF #define TYPE_BYTE unsigned char _ACEOF else { { echo "$as_me:$LINENO: error: There is no unsigned character type with a size of 8 bits on your system. Cannot compile." >&5 echo "$as_me: error: There is no unsigned character type with a size of 8 bits on your system. Cannot compile." >&2;} { (exit 1); exit 1; }; } fi if test "$ac_cv_sizeof_signed_char" = 1; then cat >>confdefs.h <<\_ACEOF #define TYPE_SBYTE signed char _ACEOF else { { echo "$as_me:$LINENO: error: There is no signed character type with a size of 8 bits on your system. Cannot compile." >&5 echo "$as_me: error: There is no signed character type with a size of 8 bits on your system. Cannot compile." >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of ""doxygen"", so it can be a program name with args. set dummy "doxygen"; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_cv_prog_doxygen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_cv_prog_doxygen"; then ac_cv_prog_ac_cv_prog_doxygen="$ac_cv_prog_doxygen" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_cv_prog_doxygen="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_cv_prog_doxygen" && ac_cv_prog_ac_cv_prog_doxygen="no" fi fi ac_cv_prog_doxygen=$ac_cv_prog_ac_cv_prog_doxygen if test -n "$ac_cv_prog_doxygen"; then echo "$as_me:$LINENO: result: $ac_cv_prog_doxygen" >&5 echo "${ECHO_T}$ac_cv_prog_doxygen" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$ac_cv_prog_doxygen" = yes; then HAVE_DOXYGEN_TRUE= HAVE_DOXYGEN_FALSE='#' else HAVE_DOXYGEN_TRUE='#' HAVE_DOXYGEN_FALSE= fi # Extract the first word of ""perl"", so it can be a program name with args. set dummy "perl"; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_cv_prog_perl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_cv_prog_perl"; then ac_cv_prog_ac_cv_prog_perl="$ac_cv_prog_perl" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_cv_prog_perl="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_cv_prog_perl" && ac_cv_prog_ac_cv_prog_perl="no" fi fi ac_cv_prog_perl=$ac_cv_prog_ac_cv_prog_perl if test -n "$ac_cv_prog_perl"; then echo "$as_me:$LINENO: result: $ac_cv_prog_perl" >&5 echo "${ECHO_T}$ac_cv_prog_perl" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$ac_cv_prog_perl" = yes; then HAVE_PERL_TRUE= HAVE_PERL_FALSE='#' else HAVE_PERL_TRUE='#' HAVE_PERL_FALSE= fi echo "$as_me:$LINENO: checking for /dev/urandom" >&5 echo $ECHO_N "checking for /dev/urandom... $ECHO_C" >&6 if test "${ac_cv_file__dev_urandom+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/dev/urandom"; then ac_cv_file__dev_urandom=yes else ac_cv_file__dev_urandom=no fi fi echo "$as_me:$LINENO: result: $ac_cv_file__dev_urandom" >&5 echo "${ECHO_T}$ac_cv_file__dev_urandom" >&6 if test $ac_cv_file__dev_urandom = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DEV_URANDOM 1 _ACEOF fi echo "$as_me:$LINENO: checking for /dev/random" >&5 echo $ECHO_N "checking for /dev/random... $ECHO_C" >&6 if test "${ac_cv_file__dev_random+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/dev/random"; then ac_cv_file__dev_random=yes else ac_cv_file__dev_random=no fi fi echo "$as_me:$LINENO: result: $ac_cv_file__dev_random" >&5 echo "${ECHO_T}$ac_cv_file__dev_random" >&6 if test $ac_cv_file__dev_random = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DEV_RANDOM 1 _ACEOF fi for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else char (*f) () = _doprnt; #endif #ifdef __cplusplus } #endif int main () { return f != _doprnt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_func in tcgetattr tcsetattr strtoul do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done case "${target}" in *-cygwin*) cat >>confdefs.h <<\_ACEOF #define WIN32 1 _ACEOF ;; esac echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5 echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6 if test "${ac_cv_lib_z_zlibVersion+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char zlibVersion (); int main () { zlibVersion (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_z_zlibVersion=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_zlibVersion=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5 echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6 if test $ac_cv_lib_z_zlibVersion = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBZ 1 _ACEOF LIBS="-lz $LIBS" fi if test "${ac_cv_header_zlib_h+set}" = set; then echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking zlib.h usability" >&5 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking zlib.h presence" >&5 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 fi echo "$as_me:$LINENO: checking for mhash_init in -lmhash" >&5 echo $ECHO_N "checking for mhash_init in -lmhash... $ECHO_C" >&6 if test "${ac_cv_lib_mhash_mhash_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmhash $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mhash_init (); int main () { mhash_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_mhash_mhash_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mhash_mhash_init=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_mhash_mhash_init" >&5 echo "${ECHO_T}$ac_cv_lib_mhash_mhash_init" >&6 if test $ac_cv_lib_mhash_mhash_init = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBMHASH 1 _ACEOF LIBS="-lmhash $LIBS" fi if test "${ac_cv_header_mhash_h+set}" = set; then echo "$as_me:$LINENO: checking for mhash.h" >&5 echo $ECHO_N "checking for mhash.h... $ECHO_C" >&6 if test "${ac_cv_header_mhash_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_mhash_h" >&5 echo "${ECHO_T}$ac_cv_header_mhash_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking mhash.h usability" >&5 echo $ECHO_N "checking mhash.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking mhash.h presence" >&5 echo $ECHO_N "checking mhash.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: mhash.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: mhash.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: mhash.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: mhash.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: mhash.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: mhash.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: mhash.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: mhash.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: mhash.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: mhash.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for mhash.h" >&5 echo $ECHO_N "checking for mhash.h... $ECHO_C" >&6 if test "${ac_cv_header_mhash_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_mhash_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_mhash_h" >&5 echo "${ECHO_T}$ac_cv_header_mhash_h" >&6 fi echo "$as_me:$LINENO: checking for mcrypt_generic in -lmcrypt" >&5 echo $ECHO_N "checking for mcrypt_generic in -lmcrypt... $ECHO_C" >&6 if test "${ac_cv_lib_mcrypt_mcrypt_generic+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmcrypt $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mcrypt_generic (); int main () { mcrypt_generic (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_mcrypt_mcrypt_generic=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mcrypt_mcrypt_generic=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_mcrypt_mcrypt_generic" >&5 echo "${ECHO_T}$ac_cv_lib_mcrypt_mcrypt_generic" >&6 if test $ac_cv_lib_mcrypt_mcrypt_generic = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBMCRYPT 1 _ACEOF LIBS="-lmcrypt $LIBS" fi if test "${ac_cv_header_mcrypt_h+set}" = set; then echo "$as_me:$LINENO: checking for mcrypt.h" >&5 echo $ECHO_N "checking for mcrypt.h... $ECHO_C" >&6 if test "${ac_cv_header_mcrypt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_mcrypt_h" >&5 echo "${ECHO_T}$ac_cv_header_mcrypt_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking mcrypt.h usability" >&5 echo $ECHO_N "checking mcrypt.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking mcrypt.h presence" >&5 echo $ECHO_N "checking mcrypt.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: mcrypt.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: mcrypt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: mcrypt.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: mcrypt.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: mcrypt.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: mcrypt.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: mcrypt.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: mcrypt.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: mcrypt.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: mcrypt.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for mcrypt.h" >&5 echo $ECHO_N "checking for mcrypt.h... $ECHO_C" >&6 if test "${ac_cv_header_mcrypt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_mcrypt_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_mcrypt_h" >&5 echo "${ECHO_T}$ac_cv_header_mcrypt_h" >&6 fi echo "$as_me:$LINENO: checking for jpeg_read_coefficients in -ljpeg" >&5 echo $ECHO_N "checking for jpeg_read_coefficients in -ljpeg... $ECHO_C" >&6 if test "${ac_cv_lib_jpeg_jpeg_read_coefficients+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char jpeg_read_coefficients (); int main () { jpeg_read_coefficients (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_jpeg_jpeg_read_coefficients=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_jpeg_jpeg_read_coefficients=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_read_coefficients" >&5 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_read_coefficients" >&6 if test $ac_cv_lib_jpeg_jpeg_read_coefficients = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBJPEG 1 _ACEOF LIBS="-ljpeg $LIBS" fi if test "${ac_cv_header_jpeglib_h+set}" = set; then echo "$as_me:$LINENO: checking for jpeglib.h" >&5 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6 if test "${ac_cv_header_jpeglib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking jpeglib.h usability" >&5 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking jpeglib.h presence" >&5 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for jpeglib.h" >&5 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6 if test "${ac_cv_header_jpeglib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_jpeglib_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6 fi if test "$ac_cv_header_jpeglib_h" = no || test "$ac_cv_lib_jpeg_jpeg_read_coefficients" = no ; then echo "**********"; echo "libjpeg could not be found on your system. Steghide will be compiled without"; echo "support for jpeg files. You will not be able to read or write jpeg files!"; echo "libjpeg can be downloaded from http://www.ijg.org/"; echo "**********"; else cat >>confdefs.h <<\_ACEOF #define USE_LIBJPEG 1 _ACEOF fi if test "$ac_cv_header_mcrypt_h" = no || test "$ac_cv_lib_mcrypt_mcrypt_module_open" = no ; then echo "**********"; echo "libmcrypt could not be found on your system. Steghide will be compiled without"; echo "support for encryption. You will not be able to extract encrypted data!"; echo "libmcrypt can be downloaded from http://mcrypt.sourceforge.net/"; echo "**********"; else cat >>confdefs.h <<\_ACEOF #define USE_LIBMCRYPT 1 _ACEOF fi if test "$ac_cv_header_zlib_h" = no || test "$ac_cv_lib_z_zlibVersion" = no ; then echo "**********"; echo "zlib could not be found on your system. Steghide will be compiled without"; echo "the ability to compress and uncompress embedded data!"; echo "zlib can be downloaded from http://www.gzip.org/zlib/"; echo "**********"; else cat >>confdefs.h <<\_ACEOF #define USE_ZLIB 1 _ACEOF fi if test "$ac_cv_header_mhash_h" = no || test "$ac_cv_lib_mhash_mhash_init" = no ; then echo "**********"; echo "libmhash could not be found on your system but is needed to compile steghide."; echo "libmhash can be downloaded from http://mhash.sourceforge.net/."; echo "**********"; { { echo "$as_me:$LINENO: error: libmhash not found" >&5 echo "$as_me: error: libmhash not found" >&2;} { (exit 1); exit 1; }; } fi ac_config_files="$ac_config_files Makefile steghide.spec steghide.doxygen doc/Makefile po/Makefile.in src/Makefile tests/Makefile tests/data/Makefile m4/Makefile intl/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, don't put newlines in cache variables' values. # 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. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *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 \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" 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}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${USE_INTLDIR_TRUE}" && test -z "${USE_INTLDIR_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"USE_INTLDIR\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"USE_INTLDIR\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_PERL_TRUE}" && test -z "${HAVE_PERL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_PERL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_PERL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it # from automake. eval 'ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "steghide.spec" ) CONFIG_FILES="$CONFIG_FILES steghide.spec" ;; "steghide.doxygen" ) CONFIG_FILES="$CONFIG_FILES steghide.doxygen" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/data/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/data/Makefile" ;; "m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "intl/Makefile" ) CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 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 to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@target@,$target,;t t s,@target_cpu@,$target_cpu,;t t s,@target_vendor@,$target_vendor,;t t s,@target_os@,$target_os,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@LN_S@,$LN_S,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t s,@MSGFMT@,$MSGFMT,;t t s,@GMSGFMT@,$GMSGFMT,;t t s,@XGETTEXT@,$XGETTEXT,;t t s,@MSGMERGE@,$MSGMERGE,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@ALLOCA@,$ALLOCA,;t t s,@GLIBC21@,$GLIBC21,;t t s,@LIBICONV@,$LIBICONV,;t t s,@LTLIBICONV@,$LTLIBICONV,;t t s,@INTLBISON@,$INTLBISON,;t t s,@USE_NLS@,$USE_NLS,;t t s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t s,@CATOBJEXT@,$CATOBJEXT,;t t s,@INTLOBJS@,$INTLOBJS,;t t s,@DATADIRNAME@,$DATADIRNAME,;t t s,@INSTOBJEXT@,$INSTOBJEXT,;t t s,@GENCAT@,$GENCAT,;t t s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t s,@INTLLIBS@,$INTLLIBS,;t t s,@LIBINTL@,$LIBINTL,;t t s,@LTLIBINTL@,$LTLIBINTL,;t t s,@POSUB@,$POSUB,;t t s,@USE_INTLDIR_TRUE@,$USE_INTLDIR_TRUE,;t t s,@USE_INTLDIR_FALSE@,$USE_INTLDIR_FALSE,;t t s,@ac_cv_prog_doxygen@,$ac_cv_prog_doxygen,;t t s,@HAVE_DOXYGEN_TRUE@,$HAVE_DOXYGEN_TRUE,;t t s,@HAVE_DOXYGEN_FALSE@,$HAVE_DOXYGEN_FALSE,;t t s,@ac_cv_prog_perl@,$ac_cv_prog_perl,;t t s,@HAVE_PERL_TRUE@,$HAVE_PERL_TRUE,;t t s,@HAVE_PERL_FALSE@,$HAVE_PERL_FALSE,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # 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. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@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,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # 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. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi _am_stamp_count=`expr ${_am_stamp_count-0} + 1` echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # 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 -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; default-1 ) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' fi case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= GMOFILES= UPDATEPOFILES= DUMMYPOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi steghide-0.5.1/steghide.doxygen.in0000644000076400001440000007470507735600446012622 # Doxyfile 1.2.6 # This file describes the settings to be used by doxygen for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # General configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = steghide # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = @VERSION@ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = ../doc/doxygen/ # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, # Korean, Hungarian, Norwegian, Spanish, Romanian, Russian, Croatian, # Polish, Portuguese and Slovene. OUTPUT_LANGUAGE = English # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these class will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = NO # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. It is allowed to use relative paths in the argument list. STRIP_FROM_PATH = # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a class diagram (in Html and LaTeX) for classes with base or # super classes. Setting the tag to NO turns the diagrams off. CLASS_DIAGRAMS = YES # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower case letters. If set to YES upper case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # users are adviced to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explict @brief command for a brief description. JAVADOC_AUTOBRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # reimplements. INHERIT_DOCS = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # The ENABLE_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consist of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. # For instance some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = ../src/ ../tests/ # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. FILE_PATTERNS = *.h *.cc # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. INPUT_FILTER = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse. FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set YES to add extra items for group members # to the contents of the Html help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript and frames is required (for instance Netscape 4.0+ # or Internet explorer 4.0+). GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimised for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = YES # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using a WORD or other. # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assigments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = YES # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_PREDEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = #--------------------------------------------------------------------------- # Configuration::addtions related to external references #--------------------------------------------------------------------------- # The TAGFILES tag can be used to specify one or more tagfiles. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to # YES then doxygen will generate a graph for each documented file showing # the direct and indirect include dependencies of the file with other # documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to # YES then doxygen will generate a graph for each documented header file showing # the documented files that directly or indirectly include this file INCLUDED_BY_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found on the path. DOT_PATH = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermedate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO # The CGI_NAME tag should be the name of the CGI script that # starts the search engine (doxysearch) with the correct parameters. # A script with this name will be generated by doxygen. CGI_NAME = search.cgi # The CGI_URL tag should be the absolute URL to the directory where the # cgi binaries are located. See the documentation of your http daemon for # details. CGI_URL = # The DOC_URL tag should be the absolute URL to the directory where the # documentation is located. If left blank the absolute path to the # documentation, with file:// prepended to it, will be used. DOC_URL = # The DOC_ABSPATH tag should be the absolute path to the directory where the # documentation is located. If left blank the directory on the local machine # will be used. DOC_ABSPATH = # The BIN_ABSPATH tag must point to the directory where the doxysearch binary # is installed. BIN_ABSPATH = /usr/local/bin/ # The EXT_DOC_PATHS tag can be used to specify one or more paths to # documentation generated for other projects. This allows doxysearch to search # the documentation for these projects as well. EXT_DOC_PATHS = steghide-0.5.1/configure.in0000644000076400001440000001505607743175744011334 dnl Process this file with autoconf to produce a configure script. AC_INIT(src/main.cc) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE(steghide, 0.5.1) AM_CONFIG_HEADER(config.h) dnl checks for programs. AC_PROG_CXX AC_PROG_INSTALL AC_PROG_AWK AC_PROG_LN_S dnl GNU gettext AC_CHECK_FUNCS(strchr) AM_GNU_GETTEXT AM_CONDITIONAL(USE_INTLDIR, test "$nls_cv_use_gnu_gettext" = yes) dnl check if debugging support is requested AC_MSG_CHECKING([wether to enable debugging]) AC_ARG_ENABLE(debug,[ --enable-debug enable debugging], if test "$enableval" = yes ; then AC_MSG_RESULT([yes]) AC_DEFINE(DEBUG,1,[enable code used only for debugging]) CXXFLAGS="-O2 -Wall -g" else AC_MSG_RESULT([no]) CXXFLAGS="-O2 -Wall" fi , AC_MSG_RESULT([no]) CXXFLAGS="-O2 -Wall" ) dnl check if randomness should be disabled AC_MSG_CHECKING([wether to disable randomness]) AC_ARG_ENABLE(randomness,[ --disable-randomness disable randomness making every run exactly reproducible], if test "$enableval" = yes ; then AC_MSG_RESULT([no]) else AC_MSG_RESULT([yes]) AC_DEFINE(NORANDOM,1,[disable randomness making every run exactly reproducible]) fi , AC_MSG_RESULT([no]) ) dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(limits.h termios.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T dnl Check size of types AC_CHECK_SIZEOF(unsigned long int) AC_CHECK_SIZEOF(long int) AC_CHECK_SIZEOF(unsigned int) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(unsigned short int) AC_CHECK_SIZEOF(short int) AC_CHECK_SIZEOF(unsigned char) AC_CHECK_SIZEOF(signed char) dnl searching for unsigned 32 bit integer if test "$ac_cv_sizeof_unsigned_int" = 4; then AC_DEFINE(TYPE_UWORD32,[unsigned int],[type of unsigned word with 32 bits]) else if test "$ac_cv_sizeof_unsigned_long_int" = 4; then AC_DEFINE(TYPE_UWORD32,[unsigned long int],[type of unsigned word with 32 bits]) else AC_MSG_ERROR([[There is no unsigned integer type with a size of 32 bits on your system. Cannot compile.]]) fi fi dnl searching for signed 32 bit integer if test "$ac_cv_sizeof_int" = 4; then AC_DEFINE(TYPE_SWORD32,[int],[type of signed word with 32 bits]) else if test "$ac_cv_sizeof_long_int" = 4; then AC_DEFINE(TYPE_SWORD32,[long int],[type of signed word with 32 bits]) else AC_MSG_ERROR([[There is no signed integer type with a size of 32 bits on your system. Cannot compile.]]) fi fi dnl searching for unsigned 16 bit integer if test "$ac_cv_sizeof_unsigned_short_int" = 2; then AC_DEFINE(TYPE_UWORD16,[unsigned short int],[type of unsigned word with 16 bits]) else if test "$ac_cv_sizeof_unsigned_int" = 2; then AC_DEFINE(TYPE_UWORD16,[unsigned int],[type of unsigned word with 16 bits]) else AC_MSG_ERROR([[There is no unsigned integer type with a size of 16 bits on your system. Cannot compile.]]) fi fi dnl searching for signed 16 bit integer if test "$ac_cv_sizeof_short_int" = 2; then AC_DEFINE(TYPE_SWORD16,[short int],[type of signed word with 16 bits]) else if test "$ac_cv_sizeof_int" = 2; then AC_DEFINE(TYPE_SWORD16,[int],[type of signed word with 16 bits]) else AC_MSG_ERROR([[There is no signed integer type with a size of 16 bits on your system. Cannot compile.]]) fi fi dnl searching for unsigned 8 bit character if test "$ac_cv_sizeof_unsigned_char" = 1; then AC_DEFINE(TYPE_BYTE,[unsigned char],[type of unsigned byte]) else AC_MSG_ERROR([[There is no unsigned character type with a size of 8 bits on your system. Cannot compile.]]) fi dnl searching for signed 8 bit character if test "$ac_cv_sizeof_signed_char" = 1; then AC_DEFINE(TYPE_SBYTE,[signed char],[type of signed byte]) else AC_MSG_ERROR([[There is no signed character type with a size of 8 bits on your system. Cannot compile.]]) fi dnl check for doxygen AC_CHECK_PROG(ac_cv_prog_doxygen, "doxygen", yes, no) AM_CONDITIONAL(HAVE_DOXYGEN, test "$ac_cv_prog_doxygen" = yes) dnl check for perl AC_CHECK_PROG(ac_cv_prog_perl, "perl", yes, no) AM_CONDITIONAL(HAVE_PERL, test "$ac_cv_prog_perl" = yes) dnl Check for random sources AC_CHECK_FILE(/dev/urandom, [AC_DEFINE(HAVE_DEV_URANDOM,1,/dev/urandom is available)]) AC_CHECK_FILE(/dev/random, [AC_DEFINE(HAVE_DEV_RANDOM,1,/dev/random is available)]) dnl Checks for library functions. AC_FUNC_VPRINTF AC_CHECK_FUNCS(tcgetattr tcsetattr strtoul) dnl system-specific settings case "${target}" in *-cygwin*) AC_DEFINE(WIN32,1,target system is win32) ;; esac dnl Check for zlib AC_CHECK_LIB(z, zlibVersion) AC_CHECK_HEADER(zlib.h) dnl Check for libmhash AC_CHECK_LIB(mhash, mhash_init) AC_CHECK_HEADER(mhash.h) dnl Check for libmcrypt AC_CHECK_LIB(mcrypt, mcrypt_generic, , ,) AC_CHECK_HEADER(mcrypt.h) dnl Check for libjpeg AC_CHECK_LIB(jpeg, jpeg_read_coefficients) AC_CHECK_HEADER(jpeglib.h) dnl evaluate library tests if test "$ac_cv_header_jpeglib_h" = no || test "$ac_cv_lib_jpeg_jpeg_read_coefficients" = no ; then echo "**********"; echo "libjpeg could not be found on your system. Steghide will be compiled without"; echo "support for jpeg files. You will not be able to read or write jpeg files!"; echo "libjpeg can be downloaded from http://www.ijg.org/"; echo "**********"; else AC_DEFINE(USE_LIBJPEG,1,[use the libjpeg library (header and lib are present)]) fi if test "$ac_cv_header_mcrypt_h" = no || test "$ac_cv_lib_mcrypt_mcrypt_module_open" = no ; then echo "**********"; echo "libmcrypt could not be found on your system. Steghide will be compiled without"; echo "support for encryption. You will not be able to extract encrypted data!"; echo "libmcrypt can be downloaded from http://mcrypt.sourceforge.net/"; echo "**********"; else AC_DEFINE(USE_LIBMCRYPT,1,[use the libmcrypt library (header and lib are present)]) fi if test "$ac_cv_header_zlib_h" = no || test "$ac_cv_lib_z_zlibVersion" = no ; then echo "**********"; echo "zlib could not be found on your system. Steghide will be compiled without"; echo "the ability to compress and uncompress embedded data!"; echo "zlib can be downloaded from http://www.gzip.org/zlib/"; echo "**********"; else AC_DEFINE(USE_ZLIB,1,[use the z compression library (header and lib are present)]) fi if test "$ac_cv_header_mhash_h" = no || test "$ac_cv_lib_mhash_mhash_init" = no ; then echo "**********"; echo "libmhash could not be found on your system but is needed to compile steghide."; echo "libmhash can be downloaded from http://mhash.sourceforge.net/."; echo "**********"; AC_MSG_ERROR([[libmhash not found]]) fi dnl create Makefiles AC_OUTPUT([Makefile steghide.spec steghide.doxygen doc/Makefile po/Makefile.in src/Makefile tests/Makefile tests/data/Makefile m4/Makefile intl/Makefile]) steghide-0.5.1/config.guess0000755000076400001440000012031607634203260011317 #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. timestamp='2002-11-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # This shell variable is my proudest work .. or something. --bje set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; (old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; dummy=$tmpdir/dummy ; files="$dummy.c $dummy.o $dummy.rel $dummy" ; trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; rm -f $files ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; unset files' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}" in i?86) test -z "$VENDOR" && VENDOR=pc ;; *) test -z "$VENDOR" && VENDOR=unknown ;; esac test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. eval $set_cc_for_build cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null if test "$?" = 0 ; then case `$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; 2-1307) UNAME_MACHINE="alphaev68" ;; 3-1307) UNAME_MACHINE="alphaev7" ;; esac fi rm -f $dummy.s $dummy && rmdir $tmpdir echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 rm -f $dummy.c $dummy && rmdir $tmpdir echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 rm -f $dummy.c $dummy && rmdir $tmpdir echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy && rmdir $tmpdir fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 rm -f $dummy.c $dummy && rmdir $tmpdir echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` rm -f $dummy.c && rmdir $tmpdir echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:3*) echo i586-pc-interix3 exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` rm -f $dummy.c && rmdir $tmpdir test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` rm -f $dummy.c && rmdir $tmpdir test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0 ;; ppc:Linux:*:*) echo powerpc-${VENDOR}-linux exit 0 ;; ppc64:Linux:*:*) echo powerpc64-${VENDOR}-linux exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-${VENDOR}-linux ;; PA8*) echo hppa2.0-${VENDOR}-linux ;; *) echo hppa-${VENDOR}-linux ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-${VENDOR}-linux exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux exit 0 ;; x86_64:Linux:*:*) echo x86_64-${VENDOR}-linux exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-${VENDOR}-linuxaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linuxoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` rm -f $dummy.c && rmdir $tmpdir test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 rm -f $dummy.c $dummy && rmdir $tmpdir # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: steghide-0.5.1/config.rpath0000755000076400001440000003343407735006035011316 #! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2002 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a shlibext= host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix3* | aix4* | aix5*) wl='-Wl,' ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6*) wl='-Wl,' ;; linux*) echo '__INTEL_COMPILER' > conftest.$ac_ext if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null then : else # Intel icc wl='-Qoption,ld,' fi ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) if test "x$host_vendor" = xsni; then wl='-LD' else wl='-Wl,' fi ;; esac fi hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then case "$host_os" in aix3* | aix4* | aix5*) # On AIX, the GNU linker is very broken ld_shlibs=no ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' ;; solaris* | sysv5*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac fi if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=yes ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9* | hpux10* | hpux11*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_minus_L=yes # Not in the search PATH, but as the default # location of the library. ;; irix5* | irix6*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) if test "x$host_vendor" = xsno; then hardcode_direct=yes # is this really true??? else hardcode_direct=no # Motorola manual says yes, but my tests say they lie fi ;; sysv4.3*) ;; sysv5*) hardcode_libdir_flag_spec= ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4.2uw2*) hardcode_direct=yes hardcode_minus_L=no ;; sysv5uw7* | unixware7*) ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics libname_spec='lib$name' sys_lib_dlsearch_path_spec="/lib /usr/lib" sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" case "$host_os" in aix3*) shlibext=so ;; aix4* | aix5*) shlibext=so ;; amigaos*) shlibext=ixlibrary ;; beos*) shlibext=so ;; bsdi4*) shlibext=so sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" ;; cygwin* | mingw* | pw32*) case $GCC,$host_os in yes,cygwin*) shlibext=dll.a ;; yes,mingw*) shlibext=dll sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` ;; yes,pw32*) shlibext=dll ;; *) shlibext=dll ;; esac ;; darwin* | rhapsody*) shlibext=dylib ;; freebsd1*) ;; freebsd*) shlibext=so ;; gnu*) shlibext=so ;; hpux9* | hpux10* | hpux11*) shlibext=sl ;; irix5* | irix6*) shlibext=so case "$host_os" in irix5*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 ") libsuff= shlibsuff= ;; *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ;; linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) ;; linux-gnu*) shlibext=so ;; netbsd*) shlibext=so ;; newsos6) shlibext=so ;; openbsd*) shlibext=so ;; os2*) libname_spec='$name' shlibext=dll ;; osf3* | osf4* | osf5*) shlibext=so sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) shlibext=so ;; solaris*) shlibext=so ;; sunos4*) shlibext=so ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) shlibext=so case "$host_vendor" in motorola) sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; uts4*) shlibext=so ;; dgux*) shlibext=so ;; sysv4*MP*) if test -d /usr/nec; then shlibext=so fi ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <&2 exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d "$dst" ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "$0: $src does not exist" >&2 exit 1 fi if [ x"$dst" = x ] then echo "$0: no destination specified" >&2 exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d "$dst" ] then dst=$dst/`basename "$src"` else : fi fi ## this sed command emulates the dirname command dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp='' while [ $# -ne 0 ] ; do pathcomp=$pathcomp$1 shift if [ ! -d "$pathcomp" ] ; then $mkdirprog "$pathcomp" else : fi pathcomp=$pathcomp/ done fi if [ x"$dir_arg" != x ] then $doit $instcmd "$dst" && if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename "$dst"` else : fi # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/#inst.$$# rmtmp=$dstdir/#rm.$$# # Trap to clean up temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$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 $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && # Now 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. { if [ -f "$dstdir/$dstfile" ] then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } steghide-0.5.1/steghide.spec.in0000644000076400001440000000147707743176001012065 Name: steghide Summary: a steganography program Version: @VERSION@ Release: 1 Copyright: GPL Group: Applications/File Source: http://prdownloads.sourceforge.net/steghide/steghide-%{version}.tar.gz %description Steghide is a steganography program that is able to hide data in various kinds of image- and audio-files. The color- respectivly sample-frequencies are not changed thus making the embedding resistant against first-order statistical tests. Features of steghide include compression and encryption of embedded data, embedding of a checksum to verify the integrity of the extracted data and support for jpeg, bmp, wav and au files. %prep %setup ./configure --prefix=/usr %build make %install make install %files %doc ABOUT-NLS BUGS COPYING CREDITS HISTORY INSTALL README TODO /usr/bin/steghide /usr/man/man1/steghide.1 steghide-0.5.1/config.sub0000755000076400001440000007160307634203260010766 #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. timestamp='2002-11-30' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa64 | mipsisa64el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39 | mipstx39el \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3d) basic_machine=alpha-cray os=-unicos ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic4x | c4x*) basic_machine=tic4x-unknown os=-coff ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: steghide-0.5.1/missing0000755000076400001440000002403607634203260010400 #! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 steghide-0.5.1/mkinstalldirs0000755000076400001440000000370407634203260011606 #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here steghide-0.5.1/Makefile.am0000644000076400001440000000076607742462634011055 AUTOMAKE_OPTIONS = dist-bzip2 dist-zip SUBDIRS = m4 intl po doc src tests docdir = $(prefix)/share/doc/$(PACKAGE) EXTRA_DIST = config.rpath mkinstalldirs ABOUT-NLS BUGS CREDITS HISTORY LEAME depcomp doc_DATA = ABOUT-NLS BUGS COPYING CREDITS HISTORY INSTALL LEAME README TODO MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ config.sub configure depcomp install-sh missing mkinstalldirs steghide.doxygen steghide.spec ACLOCAL_AMFLAGS = -I m4 uninstall-local: rmdir $(docdir) steghide-0.5.1/Makefile.in0000644000076400001440000004661307743177330011064 # Makefile.in generated by automake 1.7.2 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_INTLDIR_FALSE = @USE_INTLDIR_FALSE@ USE_INTLDIR_TRUE = @USE_INTLDIR_TRUE@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_cv_prog_doxygen = @ac_cv_prog_doxygen@ ac_cv_prog_perl = @ac_cv_prog_perl@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ AUTOMAKE_OPTIONS = dist-bzip2 dist-zip SUBDIRS = m4 intl po doc src tests docdir = $(prefix)/share/doc/$(PACKAGE) EXTRA_DIST = config.rpath mkinstalldirs ABOUT-NLS BUGS CREDITS HISTORY LEAME depcomp doc_DATA = ABOUT-NLS BUGS COPYING CREDITS HISTORY INSTALL LEAME README TODO MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ config.sub configure depcomp install-sh missing mkinstalldirs steghide.doxygen steghide.spec ACLOCAL_AMFLAGS = -I m4 subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = steghide.spec steghide.doxygen intl/Makefile DIST_SOURCES = DATA = $(doc_DATA) RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive DIST_COMMON = README ABOUT-NLS COPYING INSTALL Makefile.am Makefile.in \ TODO aclocal.m4 config.guess config.h.in config.rpath \ config.sub configure configure.in depcomp install-sh missing \ mkinstalldirs steghide.doxygen.in steghide.spec.in DIST_SUBDIRS = $(SUBDIRS) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): configure.in m4/codeset.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/intdiv0.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/inttypes_h.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/progtest.m4 m4/stdint_h.m4 m4/uintmax_t.m4 m4/ulonglong.m4 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOHEADER) touch $(srcdir)/config.h.in distclean-hdr: -rm -f config.h stamp-h1 steghide.spec: $(top_builddir)/config.status steghide.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ steghide.doxygen: $(top_builddir)/config.status steghide.doxygen.in cd $(top_builddir) && $(SHELL) ./config.status $@ intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ uninstall-info-am: docDATA_INSTALL = $(INSTALL_DATA) install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(docdir) @list='$(doc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(docDATA_INSTALL) $$d$$p $(DESTDIR)$(docdir)/$$f"; \ $(docDATA_INSTALL) $$d$$p $(DESTDIR)$(docdir)/$$f; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(docdir)/$$f"; \ rm -f $(DESTDIR)$(docdir)/$$f; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = . distdir = $(PACKAGE)-$(VERSION) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkinstalldirs) $(distdir)/. $(distdir)/intl $(distdir)/po @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist $(am__remove_distdir) GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/=build mkdir $(distdir)/=inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ --with-included-gettext \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && $(mkinstalldirs) "$$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-gzip \ && rm -f $(distdir).tar.gz \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' distuninstallcheck: cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: $(mkinstalldirs) $(DESTDIR)$(docdir) install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-docDATA install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf autom4te.cache maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-docDATA uninstall-info-am uninstall-local uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ clean-generic clean-recursive ctags ctags-recursive dist \ dist-all dist-bzip2 dist-gzip dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-recursive \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am dvi-recursive info info-am info-recursive install \ install-am install-data install-data-am install-data-recursive \ install-docDATA install-exec install-exec-am \ install-exec-recursive install-info install-info-am \ install-info-recursive install-man install-recursive \ install-strip installcheck installcheck-am installdirs \ installdirs-am installdirs-recursive maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive mostlyclean \ mostlyclean-generic mostlyclean-recursive pdf pdf-am \ pdf-recursive ps ps-am ps-recursive tags tags-recursive \ uninstall uninstall-am uninstall-docDATA uninstall-info-am \ uninstall-info-recursive uninstall-local uninstall-recursive uninstall-local: rmdir $(docdir) # 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: steghide-0.5.1/HISTORY0000644000076400001440000000364507741743557010111 steghide 0.5.1 : ================ * new algorithm that maintains first-order statistics for all file formats * support for all types of jpeg files (using libjpeg) * compression of embedded data (using zlib) * use of permutation as distribution function * a 'info' command to display the information about a cover- or stego- file (including it's capacity) * random data can be taken from /dev/urandom * spanish translation * romanian translation steghide 0.4.6b : ================= * bugfix (did not compile on some systems) steghide 0.4.6 : ================ * support for the jpeg file format * switched from C to C++ (partial rewrite) * bugfixes steghide 0.4.5 : ================ * internationalization (GNU gettext) * german locale * french locale steghide 0.4.4 : ================ * performance rewrite of memory management code steghide 0.4.3 : ================ * support for crc32 checksum of the plain data * switch to enable/disable embedding of plain file name * rewrite of some parts steghide 0.4.2 : ================ * interval length defaults to the maximum possible * verbosity, quiet and force switches * prompt for passphrase if not given on command line steghide 0.4.1 : ================ * more secure embedding algorithm * libmcrypt is used for encryption * libmhash is used for hashing * command line syntax revision * reorganisation and partial rewrite * bugfixes steghide 0.3 : ============== * blowfish encryption * md5 for generating 128 bit keys from passphrase * autconf and automake * rpm packages * support for au files * man page * interactive mode * command line syntax revision * fixed a bug that prevented the use of stdin as cover or stego data stream steghide 0.2 : ============== * support for wav (pcm) files * support for bmp files that use color tables * support for OS/2 1.x bmp files * file format auto-detection * internal changes (better buffer-management) steghide-0.5.1/config.h.in0000644000076400001440000002073407743177324011041 /* config.h.in. Generated from configure.in by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* enable code used only for debugging */ #undef DEBUG /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_ARGZ_H /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* /dev/random is available */ #undef HAVE_DEV_RANDOM /* /dev/urandom is available */ #undef HAVE_DEV_URANDOM /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the `feof_unlocked' function. */ #undef HAVE_FEOF_UNLOCKED /* Define to 1 if you have the `fgets_unlocked' function. */ #undef HAVE_FGETS_UNLOCKED /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `getc_unlocked' function. */ #undef HAVE_GETC_UNLOCKED /* Define to 1 if you have the `getegid' function. */ #undef HAVE_GETEGID /* Define to 1 if you have the `geteuid' function. */ #undef HAVE_GETEUID /* Define to 1 if you have the `getgid' function. */ #undef HAVE_GETGID /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the `getuid' function. */ #undef HAVE_GETUID /* Define if you have the iconv() function. */ #undef HAVE_ICONV /* Define if exists and doesn't clash with . */ #undef HAVE_INTTYPES_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_INTTYPES_H_WITH_UINTMAX /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the `jpeg' library (-ljpeg). */ #undef HAVE_LIBJPEG /* Define to 1 if you have the `mcrypt' library (-lmcrypt). */ #undef HAVE_LIBMCRYPT /* Define to 1 if you have the `mhash' library (-lmhash). */ #undef HAVE_LIBMHASH /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mempcpy' function. */ #undef HAVE_MEMPCPY /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP /* Define to 1 if you have the header file. */ #undef HAVE_NL_TYPES_H /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `stpcpy' function. */ #undef HAVE_STPCPY /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the `tcgetattr' function. */ #undef HAVE_TCGETATTR /* Define to 1 if you have the `tcsetattr' function. */ #undef HAVE_TCSETATTR /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if you have the `tsearch' function. */ #undef HAVE_TSEARCH /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the unsigned long long type. */ #undef HAVE_UNSIGNED_LONG_LONG /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the `__argz_count' function. */ #undef HAVE___ARGZ_COUNT /* Define to 1 if you have the `__argz_next' function. */ #undef HAVE___ARGZ_NEXT /* Define to 1 if you have the `__argz_stringify' function. */ #undef HAVE___ARGZ_STRINGIFY /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Define if integer division by zero raises signal SIGFPE. */ #undef INTDIV0_RAISES_SIGFPE /* disable randomness making every run exactly reproducible */ #undef NORANDOM /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define if exists and defines unusable PRI* macros. */ #undef PRI_MACROS_BROKEN /* The size of a `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of a `long int', as computed by sizeof. */ #undef SIZEOF_LONG_INT /* The size of a `short int', as computed by sizeof. */ #undef SIZEOF_SHORT_INT /* The size of a `signed char', as computed by sizeof. */ #undef SIZEOF_SIGNED_CHAR /* The size of a `unsigned char', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_CHAR /* The size of a `unsigned int', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_INT /* The size of a `unsigned long int', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG_INT /* The size of a `unsigned short int', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_SHORT_INT /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* type of unsigned byte */ #undef TYPE_BYTE /* type of signed byte */ #undef TYPE_SBYTE /* type of signed word with 16 bits */ #undef TYPE_SWORD16 /* type of signed word with 32 bits */ #undef TYPE_SWORD32 /* type of unsigned word with 16 bits */ #undef TYPE_UWORD16 /* type of unsigned word with 32 bits */ #undef TYPE_UWORD32 /* use the libjpeg library (header and lib are present) */ #undef USE_LIBJPEG /* use the libmcrypt library (header and lib are present) */ #undef USE_LIBMCRYPT /* use the z compression library (header and lib are present) */ #undef USE_ZLIB /* Version number of package */ #undef VERSION /* target system is win32 */ #undef WIN32 /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define as `__inline' if that's what the C compiler calls it, or to nothing if it is not supported. */ #undef inline /* Define to `long' if does not define. */ #undef off_t /* Define to `unsigned' if does not define. */ #undef size_t /* Define to unsigned long or unsigned long long if and don't define. */ #undef uintmax_t steghide-0.5.1/INSTALL0000644000076400001440000001722707371045272010043 Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. steghide-0.5.1/ABOUT-NLS0000644000076400001440000006015707735006035010237 Notes on the Free Translation Project ************************************* Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work at translations should contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. Quick configuration advice ========================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. INSTALL Matters =============== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the GNU `gettext' own library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will respectively bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might be not what is desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages have usually many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. Using This Package ================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your country by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. Translating Teams ================= For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `translation@iro.umontreal.ca' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skill are praised more than programming skill, here. Available Packages ================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of August 2002. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files be bg ca cs da de el en eo es et fi fr +----------------------------------------+ a2ps | [] [] [] [] | ap-utils | | bash | [] [] [] [] | bfd | [] [] | binutils | [] [] | bison | [] [] [] [] | clisp | | clisp | [] [] [] [] | clisplow | | cpio | [] [] [] [] | darkstat | () | diffutils | [] [] [] [] [] [] | enscript | [] [] | error | [] [] [] | fetchmail | [] () [] [] [] () | fileutils | [] [] [] [] [] | findutils | [] [] [] [] [] [] | flex | [] [] [] [] [] | gas | [] [] | gawk | [] [] [] | gcal | [] [] | gcc | [] [] | gettext | [] [] [] [] [] | gnupg | [] [] [] [] [] [] [] | gprof | [] [] | gpsdrive | () () () () () | grep | [] [] [] [] [] [] [] [] | gretl | [] | gthumb | () () () | hello | [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] | indent | [] [] [] [] [] | jpilot | () [] [] [] | jwhois | [] [] | kbd | [] [] [] | ld | [] [] | libc | [] [] [] [] [] [] [] [] | libiconv | [] [] [] [] | lifelines | () () | lilypond | [] [] | lingoteach | [] [] | lingoteach_lessons| () () | lynx | [] [] [] [] [] | m4 | [] [] [] [] [] | make | [] [] [] [] | man-db | [] () () [] () () | mysecretdiary | [] [] [] | nano | [] () [] [] [] [] | nano_1_0 | [] () [] [] [] [] | opcodes | [] [] [] | parted | [] [] [] [] [] | ptx | [] [] [] [] [] [] [] | python | | recode | [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] [] | sh-utils | [] [] [] [] | sharutils | [] [] [] [] [] [] [] | sketch | () [] () | soundtracker | [] [] [] | sp | [] | tar | [] [] [] [] [] [] | texinfo | [] [] [] [] [] | textutils | [] [] [] [] [] | util-linux | [] [] [] [] [] [] | vorbis-tools | [] | wastesedge | | wdiff | [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] [] [] [] | +----------------------------------------+ be bg ca cs da de el en eo es et fi fr 0 2 19 10 30 44 9 1 12 44 17 6 53 gl he hr hu id it ja ko lv nb nl nn +-------------------------------------+ a2ps | () () [] | ap-utils | | bash | [] | bfd | [] | binutils | [] | bison | [] [] [] [] | clisp | | clisp | [] | clisplow | | cpio | [] [] [] [] | darkstat | | diffutils | [] [] [] [] [] | enscript | [] [] | error | [] | fetchmail | [] | fileutils | [] [] [] | findutils | [] [] [] [] [] [] [] [] | flex | [] | gas | | gawk | [] | gcal | | gcc | [] | gettext | [] [] | gnupg | [] [] [] [] | gprof | [] | gpsdrive | [] () () | grep | [] [] [] [] [] [] [] | gretl | | gthumb | () () | hello | [] [] [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] | indent | [] [] [] [] | jpilot | () () | jwhois | [] [] | kbd | | ld | | libc | [] [] [] [] | libiconv | [] [] [] | lifelines | | lilypond | [] | lingoteach | [] | lingoteach_lessons| | lynx | [] [] [] [] | m4 | [] [] [] [] | make | [] [] [] [] [] [] | man-db | () () | mysecretdiary | [] | nano | [] [] [] [] | nano_1_0 | [] [] [] [] [] | opcodes | [] [] | parted | [] [] [] | ptx | [] [] [] [] [] | python | | recode | [] [] [] | sed | [] [] [] [] [] [] [] [] | sh-utils | [] [] [] | sharutils | [] [] [] | sketch | () | soundtracker | [] [] | sp | | tar | [] [] [] [] [] [] | texinfo | [] [] [] | textutils | [] [] [] [] | util-linux | () [] | vorbis-tools | [] | wastesedge | | wdiff | [] [] [] | wget | [] [] [] [] [] [] | +-------------------------------------+ gl he hr hu id it ja ko lv nb nl nn 23 9 12 19 16 13 26 9 1 7 19 3 no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW +----------------------------------------------+ a2ps | () () () [] [] [] [] [] | 10 ap-utils | () | 0 bash | [] | 6 bfd | [] [] | 5 binutils | [] [] | 5 bison | [] [] [] [] | 12 clisp | | 0 clisp | | 5 clisplow | | 0 cpio | [] [] [] [] | 12 darkstat | [] [] () () | 2 diffutils | [] [] [] [] [] [] | 17 enscript | [] [] [] [] | 8 error | [] [] [] | 7 fetchmail | () () [] | 6 fileutils | [] [] [] [] [] [] | 14 findutils | [] [] [] [] [] [] [] | 21 flex | [] [] [] | 9 gas | [] | 3 gawk | [] [] | 6 gcal | [] [] | 4 gcc | [] | 4 gettext | [] [] [] [] [] [] | 13 gnupg | [] [] [] | 14 gprof | [] [] | 5 gpsdrive | [] [] | 3 grep | [] [] [] [] [] | 20 gretl | | 1 gthumb | () () [] | 1 hello | [] [] [] [] [] [] [] | 28 id-utils | [] [] [] [] | 9 indent | [] [] [] [] [] | 14 jpilot | () () [] [] | 5 jwhois | [] () () [] [] | 7 kbd | [] [] | 5 ld | [] [] | 4 libc | [] [] [] [] [] [] | 18 libiconv | [] [] [] [] [] | 12 lifelines | [] | 1 lilypond | [] | 4 lingoteach | [] [] | 5 lingoteach_lessons| () | 0 lynx | [] [] [] [] | 13 m4 | [] [] [] [] | 13 make | [] [] [] [] [] | 15 man-db | | 3 mysecretdiary | [] [] [] | 7 nano | [] [] [] [] | 13 nano_1_0 | [] [] [] [] | 14 opcodes | [] [] [] | 8 parted | [] [] [] [] | 12 ptx | [] [] [] [] [] [] [] | 19 python | | 0 recode | [] [] [] [] [] [] | 15 sed | [] [] [] [] [] [] | 24 sh-utils | [] [] | 9 sharutils | [] [] [] [] | 14 sketch | [] () [] | 4 soundtracker | [] | 6 sp | | 1 tar | [] [] [] [] [] [] [] | 19 texinfo | [] [] | 10 textutils | [] [] [] [] [] | 14 util-linux | [] [] [] | 10 vorbis-tools | [] | 3 wastesedge | | 0 wdiff | [] [] [] [] [] | 14 wget | [] [] [] [] [] [] [] [] | 24 +----------------------------------------------+ 37 teams no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW 68 domains 4 15 2 28 28 12 10 49 43 4 1 9 609 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If August 2002 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. Using `gettext' in new packages =============================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle to use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `translation@iro.umontreal.ca' to make the `.pot' files available to the translation teams. steghide-0.5.1/COPYING0000644000076400001440000004307207371045270010040 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. steghide-0.5.1/CREDITS0000644000076400001440000000157707741743627010045 Stefan Hetzl author, maintainer I would like to thank... Petra Mutzel for being a great guide trough graph theory Christine Pippan for designing the logo Trimbitas Sorin romanian translation Alberto A. Schiano spanish translation Cedric Gross french translation Julien Catanese french translation Tilman Linneweh freebsd port Rasputin freebsd port Brian Russo debian package Guenter Bechly debian package and numerous others who have contributed by sending bug reports or interesting suggestions.